<UserControl x:Class="PDF_Office.Views.EditTools.HeaderFooter.HeaderFooterCreateContent"
             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_Office.CustomControl"
             xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
             xmlns:CompositeControl="clr-namespace:PDF_Office.CustomControl.CompositeControl"
             mc:Ignorable="d"
             d:DesignHeight="720"
             d:DesignWidth="260" >
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="40"></RowDefinition>
            <RowDefinition></RowDefinition>
        </Grid.RowDefinitions>
        <Grid Grid.Row="0" Visibility="{Binding CreateBaseVisible, Mode=TwoWay}">
            <Button  Height="24" Width="90" HorizontalAlignment="Left" Margin="16,0,0,0"  Command="{Binding EnterTemplateListCommand}">
                <StackPanel Orientation="Horizontal">
                    <TextBlock Text="&lt;" Margin="0,0,9,0" FontSize="16"></TextBlock>
                    <TextBlock Text="创建页眉页脚" FontSize="16"></TextBlock>
                </StackPanel>
            </Button>
            <Button  Height="20" Width="64" Margin="0,0,16,0" HorizontalAlignment="Right" Command="{Binding SaveToTemplateListCommand}">
                <StackPanel>
                    <TextBlock Text="保存至模板"  Foreground="#18A0FB"></TextBlock>
                    <Rectangle Height="1" Fill="#18A0FB"></Rectangle>
                </StackPanel>
            </Button>
        </Grid>
        <Grid Grid.Row="0" Visibility="{Binding EditBaseVisible, Mode=TwoWay}">
            <Button  Height="24" Width="90" HorizontalAlignment="Left" Margin="16,0,0,0"  Command="{Binding EnterTemplateListCommand}">
                <StackPanel Orientation="Horizontal">
                    <TextBlock Text="&lt;" Margin="0,0,9,0" FontSize="16"></TextBlock>
                    <TextBlock Text="编辑模板" FontSize="16"></TextBlock>
                </StackPanel>
            </Button>
            <Button  Height="20" Width="64" Margin="0,0,16,0" HorizontalAlignment="Right" Command="{Binding SaveToCurrentTemplateListCommand}">
                <StackPanel>
                    <TextBlock Text="保存"  Foreground="#18A0FB"></TextBlock>
                    <Rectangle Height="1" Fill="#18A0FB"></Rectangle>
                </StackPanel>
            </Button>
        </Grid>
        <Grid Grid.Row="1">
            <Grid.RowDefinitions>
                <RowDefinition Height="116"></RowDefinition>
                <RowDefinition Height="116"></RowDefinition>
                <RowDefinition Height="128"></RowDefinition>
                <RowDefinition Height="172"></RowDefinition>
                <RowDefinition></RowDefinition>
            </Grid.RowDefinitions>
            <Grid Grid.Row="0" Margin="0,16,0,0" Width="228">
                <StackPanel>
                    <TextBlock Text="外观" FontSize="12" Foreground="#666666" Height="20" Width="24" HorizontalAlignment="Left"></TextBlock>
                    <StackPanel Orientation="Horizontal" Margin="0,8,0,0">
                        <ComboBox Width="154" Height="32" ></ComboBox>
                        <ComboBox Width="66" Height="32" Margin="8,0,0,0" ></ComboBox>
                    </StackPanel>
                    <CompositeControl:ColorContent x:Name="cusColor" Height="32" Width="66"  Margin="0,8,0,0"  HorizontalAlignment="Left">
                    </CompositeControl:ColorContent>
                </StackPanel>
            </Grid>
            <Grid Grid.Row="1" Margin="0,16,0,0" Width="228">
                <StackPanel>
                    <TextBlock Text="页边距" FontSize="12" Foreground="#666666" Height="20" Width="36" HorizontalAlignment="Left"></TextBlock>
                    <StackPanel Orientation="Horizontal" Margin="0,8,0,0">
                        <StackPanel Orientation="Vertical" Margin="0,0,0,0">
                            <StackPanel Orientation="Horizontal">
                                <TextBlock Text="上"  Width="14" Height="20" VerticalAlignment="Center"/>
                                <cus:NumericUpDown Width="66" Height="32" Margin="9,0,0,0" ></cus:NumericUpDown>
                            </StackPanel>
                            <StackPanel Orientation="Horizontal" Margin="0,8,0,0">
                                <TextBlock Text="左" Width="14" Height="20" VerticalAlignment="Center"/>
                                <cus:NumericUpDown Width="66" Height="32" Margin="9,0,0,0"  ></cus:NumericUpDown>
                            </StackPanel>
                        </StackPanel>
                        <StackPanel Orientation="Vertical" Margin="51,0,0,0">
                            <StackPanel Orientation="Horizontal">
                                <TextBlock Text="下"  Width="14" Height="20" VerticalAlignment="Center"/>
                                <cus:NumericUpDown Width="66" Height="32" Margin="9,0,0,0"  ></cus:NumericUpDown>
                            </StackPanel>
                            <StackPanel Orientation="Horizontal" Margin="0,8,0,0">
                                <TextBlock Text="右" Width="14" 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>
                </StackPanel>
            </Grid>
            <Grid Grid.Row="2" Margin="0,16,0,0" Width="228">
                <StackPanel>
                    <StackPanel>
                        <TextBlock Text="日期" FontSize="12" Foreground="#666666" Height="20" Width="24" HorizontalAlignment="Left"></TextBlock>
                        <ComboBox  Height="32"></ComboBox>
                    </StackPanel>
                    <StackPanel Orientation="Horizontal" Margin="0,8,0,0">
                        <StackPanel>
                            <TextBlock Text="页面" FontSize="12" Foreground="#666666" Height="20" Width="24" HorizontalAlignment="Left"></TextBlock>
                            <ComboBox Height="32" Width="110"></ComboBox>
                        </StackPanel>
                        <StackPanel Margin="8,0,0,0">
                            <TextBlock Text="起始页" FontSize="12" Foreground="#666666" Height="20" Width="36" HorizontalAlignment="Left"></TextBlock>
                            <ComboBox Height="32" Width="110"></ComboBox>
                        </StackPanel>
                    </StackPanel>
                </StackPanel>
            </Grid>
            <Grid Grid.Row="3" Margin="0,16,0,0" Width="228">
                <StackPanel>
                    <StackPanel Orientation="Horizontal">
                    <TextBlock Text="布局&amp;内容" FontSize="12" Foreground="#666666" Height="20" Width="60"></TextBlock>
                        <Button Width="22" Height="22" Margin="146,0,0,0">
                            <TextBlock Text="+" FontSize="19" HorizontalAlignment="Center" VerticalAlignment="Center"  Block.TextAlignment="Center" ></TextBlock>
                        </Button>
                    </StackPanel>
                    <Grid Width="228" Height="46" Margin="0,6,0,0">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="75"></ColumnDefinition>
                            <ColumnDefinition Width="75"></ColumnDefinition>
                            <ColumnDefinition Width="75"></ColumnDefinition>
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="23"></RowDefinition>
                            <RowDefinition Height="23"></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>
                    </Grid>
                    <TextBox Name="TextValueTextBox" Height="72" Margin="0,8,0,0"  FontSize="14"  AcceptsReturn="True">
                       
                    </TextBox>
                </StackPanel>
            </Grid>
            <Grid Grid.Row="4" Margin="0,16,0,0" Width="228">
                <StackPanel>
                    <TextBlock Text="页面范围" FontSize="12" Foreground="#666666" Height="20" Width="48" HorizontalAlignment="Left"></TextBlock>
                    <cus:WritableComboBox Height="32" Margin="0,8,0,0"></cus:WritableComboBox>
                </StackPanel>
            </Grid>
        </Grid>
    </Grid>
</UserControl>
