<UserControl
    x:Class="PDF_Office.Views.Dialog.PageEditDialogs.SplitDialog"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:cus="clr-namespace:PDF_Office.CustomControl"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:local="clr-namespace:PDF_Office.Views.Dialog.PageEditDialogs"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:pageeditdialogs="clr-namespace:PDF_Office.ViewModels.Dialog.PageEditDialogs"
    xmlns:prism="http://prismlibrary.com/"
    Width="480"
    Height="481"
    d:DataContext="{d:DesignInstance Type=pageeditdialogs:SplitDialogViewModel}"
    d:DesignHeight="450"
    d:DesignWidth="800"
    prism:Dialog.WindowStyle="{StaticResource DialogWindowStyle}"
    prism:ViewModelLocator.AutoWireViewModel="True"
    mc:Ignorable="d">
    <cus:DialogContent Header="拆分页面">
        <cus:DialogContent.Content>
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition />
                    <RowDefinition />
                </Grid.RowDefinitions>
                <StackPanel Margin="16,4,16,0">
                    <TextBlock
                        Margin="0,12"
                        FontSize="14"
                        FontWeight="SemiBold"
                        Text="拆分方式" />
                    <StackPanel Orientation="Horizontal">
                        <RadioButton
                            Name="RbtnPage"
                            Margin="0,12,0,0"
                            Content="平均每"
                            IsChecked="True" />
                        <TextBox
                            Width="110"
                            Height="32"
                            Margin="8,0"
                            IsEnabled="{Binding ElementName=RbtnPage, Path=IsChecked}" />
                        <TextBlock VerticalAlignment="Center" Text="页拆分为一个PDF文件" />
                    </StackPanel>
                    <StackPanel Margin="0,12" Orientation="Horizontal">
                        <RadioButton
                            Name="RbtnPdf"
                            VerticalAlignment="Center"
                            Content="平均拆分为" />
                        <ComboBox
                            Width="110"
                            Margin="8,0"
                            IsEnabled="{Binding ElementName=RbtnPdf, Path=IsChecked}" />
                        <TextBlock VerticalAlignment="Center" Text="个PDF文件" />
                    </StackPanel>
                    <StackPanel Margin="0,0,0,12" Orientation="Horizontal">
                        <RadioButton
                            x:Name="RbtnPagerange"
                            VerticalAlignment="Center"
                            Content="按页面范围拆分" />
                        <ComboBox
                            Width="110"
                            Margin="8,0"
                            IsEnabled="{Binding ElementName=RbtnPagerange, Path=IsChecked}" />
                    </StackPanel>
                </StackPanel>
                <StackPanel Grid.Row="1" Margin="16,0">
                    <TextBlock
                        FontSize="14"
                        FontWeight="SemiBold"
                        Text="文档命名" />
                    <TextBox
                        Width="346"
                        Height="32"
                        HorizontalAlignment="Left"
                        Focusable="False"
                        IsReadOnly="True" />
                    <CheckBox
                        Margin="0,6"
                        Content="将原始文档名前置"
                        IsChecked="True" />


                    <StackPanel Orientation="Horizontal">
                        <CheckBox
                            Name="ChkSign"
                            Width="{Binding ElementName=ChkSeparator, Path=ActualWidth}"
                            Margin="0,6"
                            Content="标签"
                            IsChecked="True" />
                        <TextBox
                            Width="110"
                            Height="32"
                            Margin="16,0"
                            IsEnabled="{Binding ElementName=ChkSign, Path=IsChecked}" />
                    </StackPanel>
                    <StackPanel Orientation="Horizontal">
                        <CheckBox
                            Name="ChkSeparator"
                            Margin="0,6"
                            Content="分隔符"
                            IsChecked="True" />
                        <TextBox
                            Width="110"
                            Height="32"
                            Margin="16,0"
                            IsEnabled="{Binding ElementName=ChkSeparator, Path=IsChecked}" />
                    </StackPanel>
                </StackPanel>
            </Grid>
        </cus:DialogContent.Content>
        <cus:DialogContent.BottmBar>
            <Grid>
                <Button
                    Width="98"
                    Height="32"
                    Margin="16,0"
                    HorizontalAlignment="Right"
                    Command="{Binding CancelCommand}"
                    Content="取消" />
                <Button
                    Width="98"
                    Height="32"
                    Margin="124,0"
                    HorizontalAlignment="Right"
                    Command="{Binding SplitCommnad}"
                    Content="拆分" />
            </Grid>
        </cus:DialogContent.BottmBar>
    </cus:DialogContent>
</UserControl>
