<UserControl x:Class="VIZ.Package.Module.FieldEditView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:fcommon="clr-namespace:VIZ.Framework.Common;assembly=VIZ.Framework.Common"
             xmlns:local="clr-namespace:VIZ.Package.Module"
             d:DataContext="{d:DesignInstance Type=local:FieldEditViewModel}" 
             d:Background="Black"
             mc:Ignorable="d" 
             d:DesignHeight="450" d:DesignWidth="800">

    <UserControl.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="/VIZ.Package.Module.Resource;component/Style/IconButton/IconButton_Default.xaml"></ResourceDictionary>
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </UserControl.Resources>

    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="25"></RowDefinition>
            <RowDefinition Height="35"></RowDefinition>
            <RowDefinition Height="*"></RowDefinition>
        </Grid.RowDefinitions>
        <!-- 描述 -->
        <Border Background="#11FFFFFF" Grid.Row="0">
            <StackPanel  Orientation="Horizontal" VerticalAlignment="Center" >
                <TextBlock Text="页:" Margin="8,0,0,0" d:Foreground="White" Opacity="0.7"></TextBlock>
                <TextBlock Text="{Binding PageID}" Margin="10,0,0,0" MinWidth="40" d:Foreground="White"></TextBlock>
                <TextBlock Text="场景:" Margin="40,0,0,0" d:Foreground="White" Opacity="0.7"></TextBlock>
                <TextBlock Text="{Binding Scene}" Margin="10,0,0,0" MinWidth="80" d:Foreground="White"></TextBlock>
                <TextBlock Text="字段:" Margin="40,0,0,0" d:Foreground="White" Opacity="0.7"></TextBlock>
                <TextBlock Text="{Binding Path=ControlField.FieldIdentifier}" MinWidth="80" Margin="10,0,0,0" d:Foreground="White"></TextBlock>
                <TextBlock Text="字段描述:" Margin="40,0,0,0" d:Foreground="White" Opacity="0.7"></TextBlock>
                <TextBlock Text="{Binding Path=ControlField.Description}" Margin="10,0,0,0" d:Foreground="White"></TextBlock>
            </StackPanel>
        </Border>
        <!-- 按钮组 -->
        <Border Background="#11FFFFFF" Grid.Row="1">
            <StackPanel Orientation="Horizontal" VerticalAlignment="Center">
                <!-- 保存 -->
                <fcommon:IconButton Icon="/VIZ.Package.Module.Resource;component/Icons/icon_save_30x30.png"
                                    IconHover="/VIZ.Package.Module.Resource;component/Icons/icon_save_hover_30x30.png"
                                    Style="{StaticResource IconButton_Menu}"
                                    ToolTip="保存" Margin="5,0,0,0" 
                                    IconWidth="24" IconHeight="24" Width="24" Height="24"
                                    Command="{Binding SaveCommand}"></fcommon:IconButton>
                <!-- 另存为 -->
                <fcommon:IconButton Icon="/VIZ.Package.Module.Resource;component/Icons/icon_save_as_30x30.png"
                                    IconHover="/VIZ.Package.Module.Resource;component/Icons/icon_save_as_hover_30x30.png"
                                    Style="{StaticResource IconButton_Menu}"
                                    ToolTip="另存为" Margin="5,0,0,0" 
                                    IconWidth="24" IconHeight="24" Width="24" Height="24"
                                    Command="{Binding SaveAsCommand}"></fcommon:IconButton>
            </StackPanel>
        </Border>
        <!-- 字段编辑 -->
        <fcommon:NavigationControl ItemsSource="{Binding Path=NavigationConfigs}" Grid.Row="2" Margin="0,5,0,0" PreviewMouseLeftButtonDown="NavigationControl_PreviewMouseLeftButtonDown"
                                   SelectedValue="{Binding Path=SelectedNavigationConfig,Mode=OneWay}"></fcommon:NavigationControl>
    </Grid>
</UserControl>
