<UserControl x:Class="PDF_Office.Views.EditTools.Watermark.WatermarkCreateTextContent"
             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:i="http://schemas.microsoft.com/xaml/behaviors"
             xmlns:cus="clr-namespace:PDF_Office.CustomControl"
             xmlns:CompositeControl="clr-namespace:PDF_Office.CustomControl.CompositeControl"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:watermark="clr-namespace:PDF_Office.ViewModels.EditTools.Watermark" d:DataContext="{d:DesignInstance Type=watermark:WatermarkCreateTextContentViewModel}"
             mc:Ignorable="d"
             d:DesignHeight="632"
             d:DesignWidth="260" >
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="168"/>
            <RowDefinition Height="190"/>
            <RowDefinition Height="200"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <Grid Grid.Row="0" Width="228">
            <StackPanel Orientation="Vertical">
                <TextBox Name="TextValueTextBox" Height="72" Margin="0,16,0,0" Text="{Binding TextValue}"  Foreground="{Binding SolidColorBrush}" FontSize="14"  AcceptsReturn="True">
                    <i:Interaction.Triggers>
                        <i:EventTrigger EventName="TextChanged">
                            <i:InvokeCommandAction Command="{Binding TextValueChangedCommand}" CommandParameter="{Binding ElementName=TextValueTextBox}" />
                        </i:EventTrigger>
                    </i:Interaction.Triggers>
                </TextBox>
                <StackPanel Orientation="Horizontal" Margin="0,8,0,0">
                    <ComboBox Width="154" Height="32" SelectedIndex="{Binding FontNameSelectedIndex}" ItemsSource="{Binding FontNameList}"></ComboBox>
                    <ComboBox Width="66" Height="32" Margin="8,0,0,0" ItemsSource="{Binding FontSizeList}" SelectedIndex="{Binding FontSizeSelectedIndex}"></ComboBox>
                </StackPanel>
                <StackPanel Orientation="Horizontal" Margin="0,8,0,0">
                    <StackPanel Orientation="Horizontal">
                        <Button Width="34.67" Height="32"></Button>
                        <Button Width="34.67" Height="32"></Button>
                        <Button Width="34.67" Height="32"></Button>
                    </StackPanel>
                    <CompositeControl:ColorContent x:Name="cusColor" Height="32" Width="66"  Margin="8,0,0,0" >
                        
                    </CompositeControl:ColorContent>
                </StackPanel>
            </StackPanel>
        </Grid>
        <Grid Grid.Row="1" Margin="0,16,0,0" Width="228">
            <StackPanel Orientation="Vertical">
                <TextBlock Text="外观" FontSize="12" Foreground="#666666" Height="20" Width="24" HorizontalAlignment="Left"></TextBlock>
                <StackPanel Orientation="Horizontal" Margin="0,8,0,0">
                    <StackPanel Orientation="Horizontal">
                        <TextBlock Width="24" Height="24" Background="CadetBlue"></TextBlock>
                        <cus:CommonWritableComboBox  Width="66" Height="32" Margin="8,0,0,0" TypeSouce="{Binding RotationList}" Minimum="-360" Maximum="360" Unit=" " Text="{Binding RotationText,Mode=TwoWay}" Value="{Binding RotationValue,Mode=TwoWay}"></cus:CommonWritableComboBox>
                    </StackPanel>
                    <StackPanel Orientation="Horizontal" Margin="28,0,0,0">
                        <TextBlock Width="24" Height="24" Background="CadetBlue"></TextBlock>
                        <cus:CommonWritableComboBox Width="66" Height="32" Margin="8,0,0,0" TypeSouce="{Binding OpacityList,Mode=TwoWay}" Text="{Binding OpacityText,Mode=TwoWay}" Value="{Binding OpacityValue,Mode=TwoWay}"></cus:CommonWritableComboBox>
                    </StackPanel>
                </StackPanel>
                <ComboBox Height="32" Margin="0,8,0,0" ItemsSource="{Binding IsFrontList}" SelectedIndex="{Binding IsFrontSelectedIndex}"></ComboBox>
                <CheckBox Margin="0,11,0,0" Name="RelativeScaleCheckBox">
                    <TextBlock Text="相对于页面目标的比例" Width="144" Height="22" FontSize="14"/>
                </CheckBox>
                <cus:CommonWritableComboBox Width="66" Height="32" HorizontalAlignment="Left" Margin="0,9,0,0" TypeSouce="{Binding ScaleList}" IsEnabled="{Binding ElementName=RelativeScaleCheckBox,Path=IsChecked}" Text="{Binding RelativeScaleText,Mode=TwoWay}" Value="{Binding RelativeScaleValue,Mode=TwoWay}"></cus:CommonWritableComboBox>
            </StackPanel>
        </Grid>
        <Grid  Grid.Row="2"  Margin="0,10,0,0" Width="228">
            <StackPanel>
                <TextBlock Text="位置" FontSize="12" Foreground="#666666" Height="20" Width="48" 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 HorizOffsetValue,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 VertOffsetValue,Mode=TwoWay}"></cus:NumericUpDown>
                        </StackPanel>
                    </StackPanel>
                    
                </StackPanel>
                <CheckBox Margin="0,24,0,0" Name="IsFullCheckBox" IsChecked="{Binding IsFullValue}">
                    <TextBlock Text="平铺" Width="144" Height="22" FontSize="14"/>
                </CheckBox>
                <StackPanel Orientation="Horizontal" Margin="0,8,0,0">
                    <StackPanel Orientation="Horizontal">
                        <TextBlock Text="" Background="Aquamarine" Width="25" Height="9" VerticalAlignment="Center"/>
                        <cus:NumericUpDown Width="66" Height="32" Margin="9,0,0,0"  Text="{Binding HorizontalSpacingValue,Mode=TwoWay}" IsEnabled="{Binding ElementName=IsFullCheckBox,Path=IsChecked}"></cus:NumericUpDown>
                    </StackPanel>
                    <StackPanel Orientation="Horizontal" Margin="32,0,0,0">
                        <TextBlock Background="AntiqueWhite" Width="9" Height="25" VerticalAlignment="Center"/>
                        <cus:NumericUpDown Width="66" Height="32" Margin="9,0,0,0" Text="{Binding VerticalSpacingValue,Mode=TwoWay}" IsEnabled="{Binding ElementName=IsFullCheckBox,Path=IsChecked}"></cus:NumericUpDown>
                    </StackPanel>
                </StackPanel>
            </StackPanel>
        </Grid>
        <Grid Width="228" Grid.Row="4"  Margin="0,8,0,4">
            <StackPanel Orientation="Vertical">
                <TextBlock Text="页面范围" FontSize="12" Foreground="#666666" Height="20" Width="24" HorizontalAlignment="Left"></TextBlock>
                <cus:WritableComboBox Height="32" Margin="0,8,0,0" Text="{Binding PageRangeText,Mode=TwoWay}" SelectedIndex="{Binding PageRangeSelectIndex,Mode=TwoWay}"></cus:WritableComboBox>
            </StackPanel>
        </Grid>
    </Grid>
</UserControl>
