<dx:ThemedWindow x:Class="VIZ.Package.Module.PageAddWindow"
                 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:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
                 xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
                 xmlns:dxmvvm="http://schemas.devexpress.com/winfx/2008/xaml/mvvm"
                 xmlns:fcore="clr-namespace:VIZ.Framework.Core;assembly=VIZ.Framework.Core"
                 xmlns:domain="clr-namespace:VIZ.Package.Domain;assembly=VIZ.Package.Domain"
                 xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
                 xmlns:local="clr-namespace:VIZ.Package.Module"
                 d:DataContext="{d:DesignInstance Type=local:PageAddViewModel}" 
                 mc:Ignorable="d" WindowStartupLocation="CenterScreen"
                 Title="添加页" Height="330" Width="600">

    <dxmvvm:Interaction.Behaviors>
        <dxmvvm:EventToCommand EventName="Loaded" Command="{Binding Path=LoadedCommand}"></dxmvvm:EventToCommand>
    </dxmvvm:Interaction.Behaviors>

    <Grid Margin="20">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="120"></ColumnDefinition>
            <ColumnDefinition Width="*"></ColumnDefinition>
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="50"></RowDefinition>
            <RowDefinition Height="50"></RowDefinition>
            <RowDefinition Height="50"></RowDefinition>
            <RowDefinition Height="50"></RowDefinition>
            <RowDefinition Height="50"></RowDefinition>
        </Grid.RowDefinitions>
        <!-- 场景 -->
        <TextBlock Text="场景:" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="0,0,10,0"></TextBlock>
        <dxe:TextEdit Grid.Column="1" Height="30" IsReadOnly="True"
                      EditValue="{Binding Path=Scene}"></dxe:TextEdit>

        <!-- 备注 -->
        <TextBlock Text="备注:" Grid.Row="1" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="0,0,10,0"></TextBlock>
        <dxe:TextEdit Grid.Row="1" Grid.Column="1" Height="30"
                      EditValue="{Binding Path=Remark,Mode=TwoWay}"></dxe:TextEdit>

        <!-- 层 -->
        <TextBlock Text="层:" Grid.Row="2" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="0,0,10,0"></TextBlock>
        <dxe:ComboBoxEdit Grid.Row="2" Grid.Column="1" Height="30" IsTextEditable="False"
                          ItemsSource="{Binding Source={x:Static domain:ApplicationConstants.VIZ_LAYERS}}"
                          SelectedItem="{Binding Path=Layer,Mode=TwoWay}"></dxe:ComboBoxEdit>

        <!-- 插件 -->
        <TextBlock Text="插件:" Grid.Row="3" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="0,0,10,0"></TextBlock>
        <dxe:ComboBoxEdit Grid.Row="3" Grid.Column="1" Height="30" IsTextEditable="False"
                          ItemsSource="{Binding Path=TemplatePlugins}" DisplayMember="Name"
                          SelectedItem="{Binding Path=SelectedTemplatePlugin,Mode=TwoWay}"></dxe:ComboBoxEdit>

        <!-- 按钮组 -->
        <StackPanel Grid.Row="4" Grid.Column="1" HorizontalAlignment="Right" VerticalAlignment="Center" Orientation="Horizontal">
            <Button Width="80" Height="30" Content="確定" Margin="0" Command="{Binding Path=EnterCommand}"></Button>
            <Button Width="80" Height="30" Content="取消" Margin="20,0,0,0" Command="{Binding Path=CancelCommand}"></Button>
        </StackPanel>
    </Grid>

</dx:ThemedWindow>
