<UserControl x:Class="VIZ.Package.Module.PageCommandView"
             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:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
             xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
             xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars"
             xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
             xmlns:dxmvvm="http://schemas.devexpress.com/winfx/2008/xaml/mvvm"
             xmlns:fcore="clr-namespace:VIZ.Framework.Core;assembly=VIZ.Framework.Core"
             xmlns:fcommon="clr-namespace:VIZ.Framework.Common;assembly=VIZ.Framework.Common"
             xmlns:common="clr-namespace:VIZ.Package.Common;assembly=VIZ.Package.Common"
             xmlns:storage="clr-namespace:VIZ.Package.Storage;assembly=VIZ.Package.Storage"
             xmlns:resource="clr-namespace:VIZ.Package.Module.Resource;assembly=VIZ.Package.Module.Resource"
             xmlns:local="clr-namespace:VIZ.Package.Module"
             xmlns:domain="clr-namespace:VIZ.Package.Domain;assembly=VIZ.Package.Domain"
             d:DataContext="{d:DesignInstance Type=local:PageCommandViewModel}" 
             x:Name="uc"
             mc:Ignorable="d" 
             d:DesignHeight="450" d:DesignWidth="800">

    <dxmvvm:Interaction.Behaviors>
        <dxmvvm:EventToCommand EventName="PreviewKeyDown" Command="{Binding Path=PreviewKeyDownCommand}" PassEventArgsToCommand="True"></dxmvvm:EventToCommand>
    </dxmvvm:Interaction.Behaviors>

    <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 PageType}" Margin="10,0,0,0" MinWidth="80" 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>
            </StackPanel>
        </Border>
        <!-- 命令输入框 -->
        <dx:DXTabControl Grid.Row="2" Margin="0,10,0,0" Padding="0,5,0,0">
            <dx:DXTabItem Header="Take">
                <dxe:TextEdit AcceptsReturn="True" EditValue="{Binding Path=TakeCommand,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Margin="5"
                              VerticalContentAlignment="Top"></dxe:TextEdit>
            </dx:DXTabItem>
            <dx:DXTabItem Header="Continue">
                <dxe:TextEdit AcceptsReturn="True" EditValue="{Binding Path=TakeContinueCommand,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Margin="5"
                              VerticalContentAlignment="Top"></dxe:TextEdit>
            </dx:DXTabItem>
            <dx:DXTabItem Header="TakeOut">
                <dxe:TextEdit AcceptsReturn="True" EditValue="{Binding Path=TakeOutCommand,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Margin="5"
                              VerticalContentAlignment="Top"></dxe:TextEdit>
            </dx:DXTabItem>
            <dx:DXTabItem Header="Update">
                <dxe:TextEdit AcceptsReturn="True" EditValue="{Binding Path=TakeUpdateCommand,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Margin="5"
                              VerticalContentAlignment="Top"></dxe:TextEdit>
            </dx:DXTabItem>
        </dx:DXTabControl>

    </Grid>
</UserControl>
