<ui:ContentDialog x:Class="DMS.WPF.Views.Dialogs.VariableTableDialog"
                  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                  xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
                  xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
                  xmlns:ikw="http://schemas.inkore.net/lib/ui/wpf"
                  xmlns:ui="http://schemas.inkore.net/lib/ui/wpf/modern"
                  xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
                  xmlns:vmd="clr-namespace:DMS.WPF.ViewModels.Dialogs"
                  Title="{Binding Title}"
                  CloseButtonText="取消"
                  DefaultButton="Primary"
                  PrimaryButtonText="{Binding PrimaryButText}"
                  Background="#fff"
                  d:DataContext="{d:DesignInstance vmd:VariableTableDialogViewModel}"
                  mc:Ignorable="d">
    <i:Interaction.Triggers>
        <i:EventTrigger EventName="PrimaryButtonClick">
            <i:InvokeCommandAction Command="{Binding ParimaryButtonCommand}" />
        </i:EventTrigger>
        <i:EventTrigger EventName="CloseButtonClick">
            <i:InvokeCommandAction Command="{Binding CancleButtonCommand}" />
        </i:EventTrigger>
    </i:Interaction.Triggers>

    <ikw:SimpleStackPanel Width="300"
                          Grid.Column="0"
                          Margin="10 10 20 10 "
                          Spacing="12">
        <!-- 设备名称 -->
        <TextBlock Text="变量表名称"
                   HorizontalAlignment="Left"
                   Style="{StaticResource TextBlockSubTitle}" />
        <TextBox Text="{Binding VariableTable.Name, UpdateSourceTrigger=PropertyChanged}" />
        <!-- 设备IP地址 -->
        <TextBlock Text="变量表描述"
                   HorizontalAlignment="Left"
                   Style="{StaticResource TextBlockSubTitle}" />
        <TextBox AcceptsReturn="True"
                 Text="{Binding VariableTable.Description, UpdateSourceTrigger=PropertyChanged}" />
        
        <CheckBox FontSize="16"
                  Content="是否启用变量表"
                  Margin="0 30 0 0"
                  IsChecked="{Binding VariableTable.IsActive}" />


    </ikw:SimpleStackPanel>

</ui:ContentDialog>