<UserControl x:Class="PDF_Master.Views.Dialog.HomePageToolsDialogs.HomePageBatchProcessing.HomePageBackground.HomePageBackgroundCreateFileContent"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:prism="http://prismlibrary.com/"             
             prism:ViewModelLocator.AutoWireViewModel="True"
              xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:cus="clr-namespace:PDF_Master.CustomControl" xmlns:background="clr-namespace:PDF_Master.ViewModels.EditTools.Background" d:DataContext="{d:DesignInstance Type=background:BackgroundCreateFileContentViewModel}"
             mc:Ignorable="d"
             d:DesignHeight="632"
             d:DesignWidth="260">
    <UserControl.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="../../../../../Styles/CheckBoxStyle.xaml"/>
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </UserControl.Resources>
    <Grid Margin="16,0,0,0">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="58*"/>
            <ColumnDefinition Width="3*"/>
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="48"></RowDefinition>
            <RowDefinition Height="423"></RowDefinition>
            <RowDefinition></RowDefinition>
        </Grid.RowDefinitions>
        <Grid Grid.Row="0" Grid.ColumnSpan="2">
            <StackPanel Orientation="Horizontal" VerticalAlignment="Bottom">
                <TextBox Height="32" Width="189" Margin="0,0,7,0" IsReadOnly="True"  Text="{Binding FileNameText}" FontSize="14" VerticalAlignment="Center"></TextBox>
                <Button Height="32" Width="32" Command="{Binding OpenFileCommand}"></Button>
            </StackPanel>
        </Grid>
        <Grid Grid.Row="1" Visibility="{Binding CreateModFileVisible}" Grid.ColumnSpan="2">
            <Grid.RowDefinitions>
                <RowDefinition Height="157"></RowDefinition>
                <RowDefinition Height="163"></RowDefinition>
                <RowDefinition Height="103"></RowDefinition>
                <RowDefinition></RowDefinition>
            </Grid.RowDefinitions>
            <Grid Grid.Row="0">
                <StackPanel Orientation="Vertical">
                    <TextBlock Text="外观" Margin="0,16,0,8" Foreground="#666666"></TextBlock>
                    <StackPanel Orientation="Horizontal">
                        <TextBlock Height="24" Width="24" Background= "Bisque" Margin="0,0,8,0"></TextBlock>
                        <cus:CommonWritableComboBox HorizontalAlignment="Left" Width="66" Height="32" Margin="0,0,28,0" TypeSouce="{Binding RotationList, Mode=TwoWay}" Text="{Binding RotationText,Mode=TwoWay}" Value="{Binding RotationValue,Mode=TwoWay}"></cus:CommonWritableComboBox>
                        <TextBlock Height="24" Width="24" Background="CadetBlue" Margin="0,0,8,0"></TextBlock>
                        <cus:CommonWritableComboBox HorizontalAlignment="Left" Width="66" Height="32" Margin="0,0,28,0" TypeSouce="{Binding OpacityList, Mode=TwoWay}" Maximum="100" Text="{Binding OpacityText,Mode=TwoWay}"  Value="{Binding OpacityValue,Mode=TwoWay}"></cus:CommonWritableComboBox>
                    </StackPanel>
                    <StackPanel Orientation="Horizontal"></StackPanel>
                    <Grid Margin="0,19,0,0">
                        <CheckBox Name="RelativeScaleCheckBox"  Grid.Column="0" Style="{StaticResource EditToolsCheckBoxStyle}" Content="相对目标页面的比例" Margin="0,0,0,0" Height="22"  IsChecked="{Binding IsRelativeScaleValue}"></CheckBox>
                    </Grid>
                    <cus:CommonWritableComboBox HorizontalAlignment="Left" Width="66" Height="32" Margin="0,11,28,0" TypeSouce="{Binding RelativeRatioList, Mode=TwoWay}" Value="{Binding RelativeRatioValue,Mode=TwoWay}"   Text="{Binding RelativeScaleText,Mode=TwoWay}"  IsEnabled="{Binding ElementName=RelativeScaleCheckBox,Path=IsChecked}"></cus:CommonWritableComboBox>
                </StackPanel>
            </Grid>
            <Grid  Grid.Row="1" Margin="0,16,0,0" VerticalAlignment="Bottom">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="3*"/>
                    <ColumnDefinition Width="241*"/>
                </Grid.ColumnDefinitions>
                <StackPanel Grid.ColumnSpan="2">
                    <TextBlock Text="位置" FontSize="12" Foreground="#666666" Height="20" Width="24" HorizontalAlignment="Left"></TextBlock>
                    <StackPanel Orientation="Horizontal" Margin="0,8,0,0">
                        <Grid Width="74" Height="74">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition></ColumnDefinition>
                                <ColumnDefinition></ColumnDefinition>
                                <ColumnDefinition></ColumnDefinition>
                            </Grid.ColumnDefinitions>
                            <Grid.RowDefinitions>
                                <RowDefinition></RowDefinition>
                                <RowDefinition></RowDefinition>
                                <RowDefinition></RowDefinition>
                            </Grid.RowDefinitions>
                            <Button Grid.Column="0" Grid.Row="0" Tag="0" Command="{Binding ChangeLocationCommand}" CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Tag}" IsEnabled="{Binding GetLocationFromNumber[0],Mode=TwoWay}"></Button>
                            <Button Grid.Column="1" Grid.Row="0" Tag="1" Command="{Binding ChangeLocationCommand}" CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Tag}"  IsEnabled="{Binding GetLocationFromNumber[1], Mode=TwoWay}"></Button>
                            <Button Grid.Column="2" Grid.Row="0" Tag="2" Command="{Binding ChangeLocationCommand}" CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Tag}"  IsEnabled="{Binding GetLocationFromNumber[2], Mode=TwoWay}"></Button>
                            <Button Grid.Column="0" Grid.Row="1" Tag="10" Command="{Binding ChangeLocationCommand}"  CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Tag}"  IsEnabled="{Binding GetLocationFromNumber[10], Mode=TwoWay}"></Button>
                            <Button Grid.Column="1" Grid.Row="1" Tag="11" Command="{Binding ChangeLocationCommand}"  CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Tag}"  IsEnabled="{Binding GetLocationFromNumber[11], Mode=TwoWay}"></Button>
                            <Button Grid.Column="2" Grid.Row="1" Tag="12" Command="{Binding ChangeLocationCommand}"  CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Tag}"  IsEnabled="{Binding GetLocationFromNumber[12], Mode=TwoWay}"></Button>
                            <Button Grid.Column="0" Grid.Row="2" Tag="20" Command="{Binding ChangeLocationCommand}"  CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Tag}"  IsEnabled="{Binding GetLocationFromNumber[20], Mode=TwoWay}"></Button>
                            <Button Grid.Column="1" Grid.Row="2" Tag="21" Command="{Binding ChangeLocationCommand}"  CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Tag}"  IsEnabled="{Binding GetLocationFromNumber[21], Mode=TwoWay}"></Button>
                            <Button Grid.Column="2" Grid.Row="2" Tag="22" Command="{Binding ChangeLocationCommand}"  CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Tag}"  IsEnabled="{Binding GetLocationFromNumber[22], Mode=TwoWay}"></Button>
                        </Grid>
                        <StackPanel Orientation="Vertical" Margin="70,0,0,0">
                            <StackPanel Orientation="Horizontal">
                                <TextBlock Text="X"  Width="9" Height="20" VerticalAlignment="Center"/>
                                <cus:NumericUpDown Width="66" Height="32" Margin="9,0,0,0"  Text="{Binding HorizontalOffsetValue, Mode=TwoWay}"></cus:NumericUpDown>
                            </StackPanel>
                            <StackPanel Orientation="Horizontal" Margin="0,8,0,0">
                                <TextBlock Text="Y" Width="9" Height="20" VerticalAlignment="Center"/>
                                <cus:NumericUpDown Width="66" Height="32" Margin="9,0,0,0"  Text="{Binding VerticalOffsetValue, Mode=TwoWay}"></cus:NumericUpDown>
                            </StackPanel>
                        </StackPanel>
                    </StackPanel>
                </StackPanel>
            </Grid>
            <Grid Grid.Row="2" Margin="0,16,0,0" VerticalAlignment="Bottom">
                <StackPanel Orientation="Vertical">
                    <TextBlock Text="页面范围" FontSize="12" Foreground="#666666" Height="20" Width="48" HorizontalAlignment="Left"></TextBlock>
                    <cus:WritableComboBox  Height="32" Width="228" Margin="0,8,0,0" HorizontalAlignment="Left" Text="{Binding PageRangeText,Mode=TwoWay}" SelectedIndex="{Binding PageRangeSelectIndex,Mode=TwoWay}" MaxPageRange="9999"></cus:WritableComboBox>
                </StackPanel>
            </Grid>
        </Grid>
    </Grid>
</UserControl>