HomePageBatesCreateContent.xaml 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188
  1. <UserControl x:Class="PDF_Office.Views.Dialog.HomePageToolsDialogs.HomePageBatchProcessing.HomePageBates.HomePageBatesCreateContent"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:prism="http://prismlibrary.com/"
  5. prism:ViewModelLocator.AutoWireViewModel="True"
  6. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  7. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  8. xmlns:cus="clr-namespace:PDF_Office.CustomControl"
  9. xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
  10. xmlns:CompositeControl="clr-namespace:PDF_Office.CustomControl.CompositeControl"
  11. mc:Ignorable="d"
  12. d:DesignHeight="751"
  13. d:DesignWidth="260" >
  14. <UserControl.Resources>
  15. <ResourceDictionary >
  16. <ResourceDictionary.MergedDictionaries>
  17. <ResourceDictionary Source="../../../../../Styles/RadioButtonStyle.xaml"></ResourceDictionary>
  18. </ResourceDictionary.MergedDictionaries>
  19. </ResourceDictionary>
  20. </UserControl.Resources>
  21. <Grid>
  22. <Grid.RowDefinitions>
  23. <RowDefinition Height="50"></RowDefinition>
  24. <RowDefinition></RowDefinition>
  25. </Grid.RowDefinitions>
  26. <Grid Grid.Row="0" Visibility="{Binding CreateBaseVisible, Mode=TwoWay}">
  27. <Button Height="24" Width="98" HorizontalAlignment="Left" Margin="16,0,0,0" Command="{Binding EnterTemplateListCommand}">
  28. <StackPanel Orientation="Horizontal">
  29. <TextBlock Text="&lt;" Margin="0,0,9,0" FontSize="16"></TextBlock>
  30. <TextBlock Text="创建Bates" FontSize="16"></TextBlock>
  31. </StackPanel>
  32. </Button>
  33. <Button Height="20" Width="64" Margin="0,0,16,0" HorizontalAlignment="Right" Command="{Binding SaveToTemplateListCommand}">
  34. <StackPanel>
  35. <TextBlock Text="保存至模板" Foreground="#18A0FB"></TextBlock>
  36. <Rectangle Height="1" Fill="#18A0FB"></Rectangle>
  37. </StackPanel>
  38. </Button>
  39. </Grid>
  40. <Grid Grid.Row="0" Visibility="{Binding EditBaseVisible, Mode=TwoWay}">
  41. <Button Height="24" Width="90" HorizontalAlignment="Left" Margin="16,0,0,0" Command="{Binding EnterTemplateListCommand}">
  42. <StackPanel Orientation="Horizontal">
  43. <TextBlock Text="&lt;" Margin="0,0,9,0" FontSize="16"></TextBlock>
  44. <TextBlock Text="编辑模板" FontSize="16"></TextBlock>
  45. </StackPanel>
  46. </Button>
  47. <Button Height="20" Width="64" Margin="0,0,16,0" HorizontalAlignment="Right" Command="{Binding SaveToCurrentTemplateListCommand}">
  48. <StackPanel>
  49. <TextBlock Text="保存" Foreground="#18A0FB"></TextBlock>
  50. <Rectangle Height="1" Fill="#18A0FB"></Rectangle>
  51. </StackPanel>
  52. </Button>
  53. </Grid>
  54. <ScrollViewer Grid.Row="1" >
  55. <Grid Grid.Row="1">
  56. <Grid.RowDefinitions>
  57. <RowDefinition Height="104"></RowDefinition>
  58. <RowDefinition Height="120"></RowDefinition>
  59. <RowDefinition Height="200"></RowDefinition>
  60. <RowDefinition Height="173"></RowDefinition>
  61. <RowDefinition ></RowDefinition>
  62. </Grid.RowDefinitions>
  63. <Grid Grid.Row="0" Width="228">
  64. <StackPanel>
  65. <TextBlock Text="外观" FontFamily="Segoe UI" FontStyle="Normal" FontSize="12" Height="20" Width="228" HorizontalAlignment="Left" Foreground="#616469"></TextBlock>
  66. <StackPanel Orientation="Horizontal" Margin="0,8,0,0">
  67. <ComboBox Width="228" Height="32" ItemsSource="{Binding FontNameList}" SelectedIndex="{Binding FontNameSelectedIndex}"></ComboBox>
  68. </StackPanel>
  69. <StackPanel Orientation="Horizontal" Margin="0,8,0,0">
  70. <ComboBox Width="164" Height="32" HorizontalAlignment="Left" ItemsSource="{Binding FontSizeList}" SelectedIndex="{Binding FontSizeSelectedIndex}"></ComboBox>
  71. <CompositeControl:ColorContent x:Name="cusColor" Height="32" Width="56" Margin="8,0,0,0" HorizontalAlignment="Left">
  72. </CompositeControl:ColorContent>
  73. </StackPanel>
  74. </StackPanel>
  75. </Grid>
  76. <Grid Grid.Row="1" Margin="0,18,0,0" Width="228">
  77. <StackPanel>
  78. <TextBlock Text="页边距" FontFamily="Segoe UI" FontStyle="Normal" FontSize="12" Height="20" Width="228" HorizontalAlignment="Left" Foreground="#616469"></TextBlock>
  79. <StackPanel Orientation="Horizontal" Margin="0,10,0,0">
  80. <StackPanel Orientation="Vertical" Margin="0,0,0,0">
  81. <StackPanel Orientation="Horizontal">
  82. <TextBlock Text="上" Width="14" Height="20" VerticalAlignment="Center"/>
  83. <cus:NumericUpDown Width="90" Height="32" Margin="4,0,0,0" Text="{Binding MarginTopValue,Mode=TwoWay}"></cus:NumericUpDown>
  84. </StackPanel>
  85. <StackPanel Orientation="Horizontal" Margin="0,8,0,0">
  86. <TextBlock Text="左" Width="14" Height="20" VerticalAlignment="Center"/>
  87. <cus:NumericUpDown Width="90" Height="32" Margin="4,0,0,0" Text="{Binding MarginLeftValue,Mode=TwoWay}"></cus:NumericUpDown>
  88. </StackPanel>
  89. </StackPanel>
  90. <StackPanel Orientation="Vertical" Margin="8,0,0,0">
  91. <StackPanel Orientation="Horizontal">
  92. <TextBlock Text="下" Width="14" Height="20" VerticalAlignment="Center"/>
  93. <cus:NumericUpDown Width="90" Height="32" Margin="4,0,0,0" Text="{Binding MarginDownValue,Mode=TwoWay}"></cus:NumericUpDown>
  94. </StackPanel>
  95. <StackPanel Orientation="Horizontal" Margin="0,8,0,0">
  96. <TextBlock Text="右" Width="14" Height="20" VerticalAlignment="Center"/>
  97. <cus:NumericUpDown Width="90" Height="32" Margin="4,0,0,0" Text="{Binding MarginRightValue,Mode=TwoWay}"></cus:NumericUpDown>
  98. </StackPanel>
  99. </StackPanel>
  100. </StackPanel>
  101. </StackPanel>
  102. </Grid>
  103. <Grid Grid.Row="2" Margin="0,18,0,0" Width="228">
  104. <StackPanel>
  105. <TextBlock Text="Page Number &amp; Date Format" Height="20" Width="228" FontFamily="Segoe UI" FontStyle="Normal" FontSize="12" Foreground="#616469"></TextBlock>
  106. <StackPanel Orientation="Horizontal" Margin="0,10,0,0">
  107. <TextBlock Text="前缀" FontSize="12" Foreground="#666666" Height="22" Width="38" HorizontalAlignment="Left" VerticalAlignment="Center"></TextBlock>
  108. <TextBox Name="PrefixTextValueTextBox" Height="32" Width="180" Margin="10,0,0,0">
  109. <i:Interaction.Triggers>
  110. <i:EventTrigger EventName="TextChanged">
  111. <i:InvokeCommandAction Command="{Binding TextValueChangedCommand}" CommandParameter="{Binding ElementName=PrefixTextValueTextBox}" />
  112. </i:EventTrigger>
  113. </i:Interaction.Triggers>
  114. </TextBox>
  115. </StackPanel>
  116. <StackPanel Margin="0,8,0,0" Orientation="Horizontal">
  117. <TextBlock Text="后缀" FontSize="12" Foreground="#666666" Height="22" Width="38" VerticalAlignment="Center" HorizontalAlignment="Left"></TextBlock>
  118. <TextBox Name="SuffixTextValueTextBox" Width="180" Height="32" Margin="10,0,0,0">
  119. <i:Interaction.Triggers>
  120. <i:EventTrigger EventName="TextChanged">
  121. <i:InvokeCommandAction Command="{Binding TextValueChangedCommand}" CommandParameter="{Binding ElementName=SuffixTextValueTextBox}" />
  122. </i:EventTrigger>
  123. </i:Interaction.Triggers>
  124. </TextBox>
  125. </StackPanel>
  126. <StackPanel Orientation="Vertical" Margin="0,8,0,0">
  127. <StackPanel Orientation="Horizontal">
  128. <TextBlock Text="位数" FontSize="12" Foreground="#666666" Height="22" Width="116" HorizontalAlignment="Left"></TextBlock>
  129. <cus:NumericUpDown Height="32" Width="102" Margin="10,0,0,0" Text="{Binding DigitNumberValue,Mode=TwoWay}"></cus:NumericUpDown>
  130. </StackPanel>
  131. <StackPanel Margin="0,8,0,0" Orientation="Horizontal">
  132. <TextBlock Text="起始页" FontSize="12" Foreground="#666666" Height="22" Width="66" HorizontalAlignment="Left"></TextBlock>
  133. <ComboBox Height="32" Width="152" Margin="10,0,0,0" ItemsSource="{Binding StarPagetNumberList}" SelectedIndex="{Binding StarPagetNumberIndex}"></ComboBox>
  134. </StackPanel>
  135. </StackPanel>
  136. </StackPanel>
  137. </Grid>
  138. <Grid Grid.Row="3" Margin="0,18,0,0" Width="228">
  139. <StackPanel>
  140. <StackPanel Orientation="Horizontal">
  141. <TextBlock Text="布局&amp;内容" FontFamily="Segoe UI" FontStyle="Normal" FontSize="12" Height="20" Width="198" Foreground="#616469"></TextBlock>
  142. <Button Width="22" Height="22" Margin="8,0,0,0" Click="Button_Click" >
  143. <TextBlock Text="+" FontSize="19" HorizontalAlignment="Center" VerticalAlignment="Center" Block.TextAlignment="Center" ></TextBlock>
  144. <Button.ContextMenu>
  145. <ContextMenu Name="contextMenu">
  146. <MenuItem Name="ADDPages" Header="插入Bates" Click="ADDBates_Click" >
  147. </MenuItem>
  148. </ContextMenu>
  149. </Button.ContextMenu>
  150. </Button>
  151. </StackPanel>
  152. <Grid Width="228" Height="46" Margin="0,6,0,0">
  153. <Grid.ColumnDefinitions>
  154. <ColumnDefinition Width="76"></ColumnDefinition>
  155. <ColumnDefinition Width="76"></ColumnDefinition>
  156. <ColumnDefinition Width="76"></ColumnDefinition>
  157. </Grid.ColumnDefinitions>
  158. <Grid.RowDefinitions>
  159. <RowDefinition Height="23"></RowDefinition>
  160. <RowDefinition Height="23"></RowDefinition>
  161. </Grid.RowDefinitions>
  162. <RadioButton Grid.Column="0" Grid.Row="0" Tag="0" GroupName="TextLocation" Height="23" Width="76" BorderThickness="1" BorderBrush="Black" Style="{StaticResource LocationRadioBtnStyle}" Command="{Binding ChangeLocationCommand}" CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Tag}" ></RadioButton>
  163. <RadioButton Grid.Column="1" Grid.Row="0" Tag="1" GroupName="TextLocation" Height="23" Width="76" BorderThickness="1" BorderBrush="Black" Style="{StaticResource LocationRadioBtnStyle}" Command="{Binding ChangeLocationCommand}" CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Tag}" ></RadioButton>
  164. <RadioButton Grid.Column="2" Grid.Row="0" Tag="2" GroupName="TextLocation" Height="23" Width="76" BorderThickness="1" BorderBrush="Black" Style="{StaticResource LocationRadioBtnStyle}" Command="{Binding ChangeLocationCommand}" CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Tag}" ></RadioButton>
  165. <RadioButton Grid.Column="0" Grid.Row="1" Tag="3" GroupName="TextLocation" Height="23" Width="76" BorderThickness="1" BorderBrush="Black" Style="{StaticResource LocationRadioBtnStyle}" Command="{Binding ChangeLocationCommand}" CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Tag}"></RadioButton>
  166. <RadioButton Grid.Column="1" Grid.Row="1" Tag="4" GroupName="TextLocation" Height="23" Width="76" BorderThickness="1" BorderBrush="Black" Style="{StaticResource LocationRadioBtnStyle}" Command="{Binding ChangeLocationCommand}" CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Tag}" ></RadioButton>
  167. <RadioButton Grid.Column="2" Grid.Row="1" Tag="5" GroupName="TextLocation" Height="23" Width="76" BorderThickness="1" BorderBrush="Black" Style="{StaticResource LocationRadioBtnStyle}" Command="{Binding ChangeLocationCommand}" CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Tag}"></RadioButton>
  168. </Grid>
  169. <TextBox Name="TextValueTextBox" Height="72" Margin="0,8,0,0" Text="{Binding TextValue}" Foreground="{Binding SolidColorBrush}" FontSize="14" AcceptsReturn="True" FontFamily="Segoe UI">
  170. <i:Interaction.Triggers>
  171. <i:EventTrigger EventName="TextChanged">
  172. <i:InvokeCommandAction Command="{Binding TextValueChangedCommand}" CommandParameter="{Binding ElementName=TextValueTextBox}" />
  173. </i:EventTrigger>
  174. </i:Interaction.Triggers>
  175. </TextBox>
  176. </StackPanel>
  177. </Grid>
  178. <Grid Grid.Row="4" Margin="0,16,0,0" Width="228">
  179. <StackPanel>
  180. <TextBlock Text="页面范围" FontSize="12" Foreground="#666666" Height="20" Width="48" HorizontalAlignment="Left"></TextBlock>
  181. <cus:WritableComboBox Height="32" Margin="0,8,0,0" Text="{Binding PageRangeText,Mode=TwoWay}" SelectedIndex="{Binding PageRangeSelectIndex,Mode=TwoWay}"></cus:WritableComboBox>
  182. </StackPanel>
  183. </Grid>
  184. </Grid>
  185. </ScrollViewer>
  186. </Grid>
  187. </UserControl>