HomePageWatermarkCreateTextContent.xaml 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. <UserControl x:Class="PDF_Master.Views.Dialog.HomePageToolsDialogs.HomePageBatchProcessing.HomePageWatermark.HomePageWatermarkCreateTextContent"
  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:convert="clr-namespace:PDF_Master.DataConvert"
  8. xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
  9. xmlns:cus="clr-namespace:PDF_Master.CustomControl"
  10. xmlns:CompositeControl="clr-namespace:PDF_Master.CustomControl.CompositeControl"
  11. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:watermark="clr-namespace:PDF_Master.ViewModels.EditTools.Watermark" d:DataContext="{d:DesignInstance Type=watermark:WatermarkCreateTextContentViewModel}"
  12. mc:Ignorable="d"
  13. d:DesignHeight="632"
  14. d:DesignWidth="260" >
  15. <UserControl.Resources>
  16. <ResourceDictionary>
  17. <convert:InvertBoolConvert x:Key="InvertBoolConvert"/>
  18. <ResourceDictionary.MergedDictionaries>
  19. <ResourceDictionary Source="../../../../../Styles/CheckBoxStyle.xaml"/>
  20. </ResourceDictionary.MergedDictionaries>
  21. </ResourceDictionary>
  22. </UserControl.Resources>
  23. <Grid>
  24. <Grid.RowDefinitions>
  25. <RowDefinition Height="168"/>
  26. <RowDefinition Height="192"/>
  27. <RowDefinition Height="200"/>
  28. <RowDefinition Height="*"/>
  29. </Grid.RowDefinitions>
  30. <Grid Grid.Row="0" Width="228">
  31. <StackPanel Orientation="Vertical">
  32. <TextBox Name="TextValueTextBox" Height="72" Margin="0,16,0,0" Text="{Binding TextValue}" Foreground="{Binding SolidColorBrush}" FontSize="14" AcceptsReturn="True">
  33. <i:Interaction.Triggers>
  34. <i:EventTrigger EventName="TextChanged">
  35. <i:InvokeCommandAction Command="{Binding TextValueChangedCommand}" CommandParameter="{Binding ElementName=TextValueTextBox}" />
  36. </i:EventTrigger>
  37. </i:Interaction.Triggers>
  38. </TextBox>
  39. <StackPanel Orientation="Horizontal" Margin="0,8,0,0">
  40. <ComboBox Width="154" Height="32" SelectedIndex="{Binding FontNameSelectedIndex}" ItemsSource="{Binding FontNameList}"></ComboBox>
  41. <ComboBox Width="66" Height="32" Margin="8,0,0,0" ItemsSource="{Binding FontSizeList}" SelectedIndex="{Binding FontSizeSelectedIndex}" IsEnabled="{Binding ElementName=RelativeScaleCheckBox, Path=IsChecked, Converter={StaticResource InvertBoolConvert}}"></ComboBox>
  42. </StackPanel>
  43. <StackPanel Orientation="Horizontal" Margin="0,8,0,0">
  44. <!--<StackPanel Orientation="Horizontal">
  45. <Button Width="34.67" Height="32"></Button>
  46. <Button Width="34.67" Height="32"></Button>
  47. <Button Width="34.67" Height="32"></Button>
  48. </StackPanel>-->
  49. <CompositeControl:ColorContent x:Name="cusColor" Height="32" Width="66" Margin="8,0,0,0" >
  50. </CompositeControl:ColorContent>
  51. </StackPanel>
  52. </StackPanel>
  53. </Grid>
  54. <Grid Grid.Row="1" Margin="0,16,0,0" Width="228">
  55. <StackPanel Orientation="Vertical">
  56. <TextBlock Text="外观" FontSize="12" Foreground="#666666" Height="20" Width="24" HorizontalAlignment="Left"></TextBlock>
  57. <StackPanel Orientation="Horizontal" Margin="0,8,0,0">
  58. <StackPanel Orientation="Horizontal">
  59. <TextBlock Width="24" Height="24" Background="CadetBlue"></TextBlock>
  60. <cus:CommonWritableComboBox Width="66" Height="32" Margin="8,0,0,0" TypeSouce="{Binding RotationList,Mode=TwoWay}" Minimum="-360" Maximum="360" Unit=" " Text="{Binding RotationText,Mode=TwoWay}" Value="{Binding RotationValue,Mode=TwoWay}"></cus:CommonWritableComboBox>
  61. </StackPanel>
  62. <StackPanel Orientation="Horizontal" Margin="28,0,0,0">
  63. <TextBlock Width="24" Height="24" Background="Black"></TextBlock>
  64. <cus:CommonWritableComboBox Width="66" Height="32" Margin="8,0,0,0" TypeSouce="{Binding OpacityList,Mode=TwoWay}" Text="{Binding OpacityText,Mode=TwoWay}" Maximum="100" Value="{Binding OpacityValue,Mode=TwoWay}"></cus:CommonWritableComboBox>
  65. </StackPanel>
  66. </StackPanel>
  67. <ComboBox Height="32" Margin="0,8,0,0" ItemsSource="{Binding IsFrontList}" SelectedIndex="{Binding IsFrontSelectedIndex}"></ComboBox>
  68. <CheckBox Style="{StaticResource EditToolsCheckBoxStyle}" Content="相对目标页面的比例" Margin="0,11,0,0" Name="RelativeScaleCheckBox" IsChecked="{Binding IsRelativeScaleValue}" IsEnabled = "{Binding ElementName=IsFullCheckBox,Path=IsChecked,Converter={StaticResource InvertBoolConvert}}">
  69. </CheckBox>
  70. <cus:CommonWritableComboBox Width="66" Height="32" HorizontalAlignment="Left" Margin="0,9,0,0" TypeSouce="{Binding ScaleList,Mode=TwoWay}" IsEnabled="{Binding ElementName=RelativeScaleCheckBox,Path=IsChecked}" Text="{Binding RelativeScaleText,Mode=TwoWay}" Value="{Binding RelativeScaleValue,Mode=TwoWay}"></cus:CommonWritableComboBox>
  71. </StackPanel>
  72. </Grid>
  73. <Grid Grid.Row="2" Margin="0,8,0,0" Width="228">
  74. <StackPanel>
  75. <TextBlock Text="位置" FontSize="12" Foreground="#666666" Height="20" Width="48" HorizontalAlignment="Left"></TextBlock>
  76. <StackPanel Orientation="Horizontal" Margin="0,8,0,0">
  77. <Grid Width="74" Height="74">
  78. <Grid.ColumnDefinitions>
  79. <ColumnDefinition></ColumnDefinition>
  80. <ColumnDefinition></ColumnDefinition>
  81. <ColumnDefinition></ColumnDefinition>
  82. </Grid.ColumnDefinitions>
  83. <Grid.RowDefinitions>
  84. <RowDefinition></RowDefinition>
  85. <RowDefinition></RowDefinition>
  86. <RowDefinition></RowDefinition>
  87. </Grid.RowDefinitions>
  88. <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>
  89. <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>
  90. <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>
  91. <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>
  92. <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>
  93. <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>
  94. <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>
  95. <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>
  96. <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>
  97. </Grid>
  98. <StackPanel Orientation="Vertical" Margin="70,0,0,0">
  99. <StackPanel Orientation="Horizontal">
  100. <TextBlock Text="X" Width="9" Height="20" VerticalAlignment="Center"/>
  101. <cus:NumericUpDown Width="66" Height="32" Margin="9,0,0,0" Text="{Binding HorizOffsetValue,Mode=TwoWay}"></cus:NumericUpDown>
  102. </StackPanel>
  103. <StackPanel Orientation="Horizontal" Margin="0,8,0,0">
  104. <TextBlock Text="Y" Width="9" Height="20" VerticalAlignment="Center"/>
  105. <cus:NumericUpDown Width="66" Height="32" Margin="9,0,0,0" Text="{Binding VertOffsetValue,Mode=TwoWay}"></cus:NumericUpDown>
  106. </StackPanel>
  107. </StackPanel>
  108. </StackPanel>
  109. <CheckBox Style="{StaticResource EditToolsCheckBoxStyle}" Content="平铺" Margin="0,24,0,0" Name="IsFullCheckBox" IsChecked="{Binding IsFullValue}">
  110. </CheckBox>
  111. <StackPanel Orientation="Horizontal" Margin="0,8,0,0">
  112. <StackPanel Orientation="Horizontal">
  113. <TextBlock Text="" Background="Aquamarine" Width="25" Height="9" VerticalAlignment="Center"/>
  114. <cus:NumericUpDown Width="66" Height="32" Margin="9,0,0,0" Text="{Binding HorizontalSpacingValue,Mode=TwoWay}" IsEnabled="{Binding ElementName=IsFullCheckBox,Path=IsChecked}"></cus:NumericUpDown>
  115. </StackPanel>
  116. <StackPanel Orientation="Horizontal" Margin="32,0,0,0">
  117. <TextBlock Background="AntiqueWhite" Width="9" Height="25" VerticalAlignment="Center"/>
  118. <cus:NumericUpDown Width="66" Height="32" Margin="9,0,0,0" Text="{Binding VerticalSpacingValue,Mode=TwoWay}" IsEnabled="{Binding ElementName=IsFullCheckBox,Path=IsChecked}"></cus:NumericUpDown>
  119. </StackPanel>
  120. </StackPanel>
  121. </StackPanel>
  122. </Grid>
  123. <Grid Width="228" Grid.Row="4" Margin="0,8,0,4">
  124. <StackPanel Orientation="Vertical">
  125. <TextBlock Text="页面范围" FontSize="12" Foreground="#666666" Height="20" Width="24" HorizontalAlignment="Left"></TextBlock>
  126. <cus:WritableComboBox Height="32" Margin="0,8,0,0" Text="{Binding PageRangeText,Mode=TwoWay}" SelectedIndex="{Binding PageRangeSelectIndex,Mode=TwoWay}" MaxPageRange="9999"></cus:WritableComboBox>
  127. </StackPanel>
  128. </Grid>
  129. </Grid>
  130. </UserControl>