<Window x:Class="YoseenPTZ.ViewDef.PresetRawView"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:local="clr-namespace:YoseenPTZ.ViewDef"
        
        xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
        xmlns:mdix="http://materialdesigninxaml.net/winfx/xaml/themes"
        xmlns:mvvm="clr-namespace:MVVM;assembly=MVVM"
        xmlns:mvvmhelpers="clr-namespace:MVVM.Helpers;assembly=MVVM"
        
        xmlns:resdef="clr-namespace:YoseenPTZ.ResourceDef"
        xmlns:coredef="clr-namespace:YoseenPTZ.CoreDef"

        WindowStartupLocation="CenterOwner"
        
        Background="{StaticResource MaterialDesignPaper}"
        TextElement.Foreground="{StaticResource MaterialDesignBody}"
        Style="{StaticResource MaterialDesignWindow}"
        mvvmhelpers:WindowHelper.ShowMinimizeButton="False"
        mvvmhelpers:WindowHelper.ShowMaximizeButton="False"
        
        Title="预置位-前端" Height="400" Width="400">

    <DataGrid x:Name="dgPreset" AutoGenerateColumns="False" CanUserSortColumns="False" CanUserAddRows="False"
              mdix:DataGridAssist.CellPadding="4,1,4,1"
              mdix:DataGridAssist.ColumnHeaderPadding="4,1,4,1" >
        <DataGrid.Resources>
            <Style TargetType="{x:Type TextBlock}" BasedOn="{StaticResource {x:Type TextBlock}}">
                <Setter Property="HorizontalAlignment" Value="Center"></Setter>
                <Setter Property="VerticalAlignment" Value="Center"></Setter>
                <Setter Property="FontWeight" Value="Bold"></Setter>
                <Setter Property="FontSize" Value="18"></Setter>
            </Style>
            <Style TargetType="{x:Type TextBox}" BasedOn="{StaticResource {x:Type TextBox}}">
                <Setter Property="HorizontalAlignment" Value="Center"></Setter>
                <Setter Property="VerticalAlignment" Value="Center"></Setter>
                <Setter Property="FontWeight" Value="Bold"></Setter>
                <Setter Property="Width" Value="100"></Setter>
            </Style>
        </DataGrid.Resources>
        
        <DataGrid.Columns>
            <DataGridTemplateColumn Width="*">
                <DataGridTemplateColumn.Header>
                    <TextBlock Text="索引"></TextBlock>
                </DataGridTemplateColumn.Header>
                <DataGridTemplateColumn.CellTemplate>
                    <DataTemplate>
                        <TextBlock Text="{Binding Path=ext_index}" HorizontalAlignment="Left" VerticalAlignment="Center"></TextBlock>
                    </DataTemplate>
                </DataGridTemplateColumn.CellTemplate>
            </DataGridTemplateColumn>

            <DataGridTemplateColumn Width="80">
                <DataGridTemplateColumn.CellTemplate>
                    <DataTemplate>
                        <Button Width="50" Height="25" VerticalAlignment="Center" Style="{StaticResource MaterialDesignIconButton}" x:Name="btnPresetGoto" Click="btnPresetGoto_Click">
                            <mdix:PackIcon Kind="Redo"></mdix:PackIcon>
                        </Button>
                    </DataTemplate>
                </DataGridTemplateColumn.CellTemplate>
            </DataGridTemplateColumn>
            <DataGridTemplateColumn Width="80">
                <DataGridTemplateColumn.CellTemplate>
                    <DataTemplate>
                        <Button Width="50" Height="25" VerticalAlignment="Center" Style="{StaticResource MaterialDesignIconButton}" x:Name="btnPresetSave" Click="btnPresetSave_Click">
                            <mdix:PackIcon Kind="Cog"></mdix:PackIcon>
                        </Button>
                    </DataTemplate>
                </DataGridTemplateColumn.CellTemplate>
            </DataGridTemplateColumn>

            <DataGridTemplateColumn Width="80">
                <DataGridTemplateColumn.CellTemplate>
                    <DataTemplate>
                        <Button Width="50" Height="25" VerticalAlignment="Center" Style="{StaticResource MaterialDesignIconButton}" x:Name="btnPresetClear" Click="btnPresetClear_Click">
                            <mdix:PackIcon Kind="Close"></mdix:PackIcon>
                        </Button>
                    </DataTemplate>
                </DataGridTemplateColumn.CellTemplate>
            </DataGridTemplateColumn>
        </DataGrid.Columns>
    </DataGrid>
</Window>
