HomePageWatermarkCreateFileContent.xaml 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. <UserControl x:Class="PDF_Master.Views.Dialog.HomePageToolsDialogs.HomePageBatchProcessing.HomePageWatermark.HomePageWatermarkCreateFileContent"
  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:cus="clr-namespace:PDF_Master.CustomControl"
  8. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:watermark="clr-namespace:PDF_Master.ViewModels.EditTools.Watermark" d:DataContext="{d:DesignInstance Type=watermark:WatermarkCreateFileContentViewModel}"
  9. mc:Ignorable="d"
  10. d:DesignHeight="632"
  11. d:DesignWidth="260" >
  12. <UserControl.Resources>
  13. <ResourceDictionary>
  14. <ResourceDictionary.MergedDictionaries>
  15. <ResourceDictionary Source="../../../../../Styles/CheckBoxStyle.xaml"/>
  16. </ResourceDictionary.MergedDictionaries>
  17. </ResourceDictionary>
  18. </UserControl.Resources>
  19. <Grid>
  20. <Grid.RowDefinitions>
  21. <RowDefinition Height="48"/>
  22. <RowDefinition Height="584"/>
  23. </Grid.RowDefinitions>
  24. <Grid Grid.Row="0" Width="228" Margin="0,16,0,0">
  25. <StackPanel Orientation="Horizontal">
  26. <TextBox Name="FileNameTextBox" IsReadOnly="True" Text="{Binding FileNameText}" FontSize="14" VerticalContentAlignment="Center" Width="188"></TextBox>
  27. <Button Content="+" Width="32" Height="32" Margin="8,0,0,0" Command="{Binding OpenFileCommand}"></Button>
  28. </StackPanel>
  29. </Grid>
  30. <Grid Grid.Row="1" Visibility="{Binding CreateFileVisible}">
  31. <Grid.RowDefinitions>
  32. <RowDefinition Height="199"/>
  33. <RowDefinition Height="200"/>
  34. <RowDefinition Height="*"/>
  35. </Grid.RowDefinitions>
  36. <Grid Grid.Row="0" Margin="16,23,16,0" Width="228">
  37. <StackPanel Orientation="Vertical">
  38. <TextBlock Text="外观" FontSize="12" Foreground="#666666" Height="20" Width="24" HorizontalAlignment="Left"></TextBlock>
  39. <StackPanel Orientation="Horizontal" Margin="0,8,0,0">
  40. <StackPanel Orientation="Horizontal">
  41. <TextBlock Width="24" Height="24" Background="CadetBlue"></TextBlock>
  42. <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>
  43. </StackPanel>
  44. <StackPanel Orientation="Horizontal" Margin="28,0,0,0">
  45. <TextBlock Width="24" Height="24" Background="Black"></TextBlock>
  46. <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>
  47. </StackPanel>
  48. </StackPanel>
  49. <ComboBox Height="32" Margin="0,8,0,0" ItemsSource="{Binding IsFrontList}" SelectedIndex="{Binding IsFrontSelectedIndex}"></ComboBox>
  50. <CheckBox Style="{StaticResource EditToolsCheckBoxStyle}" Content="相对目标页面的比例" Margin="0,11,0,0" Name="RelativeScaleCheckBox" IsChecked="{Binding IsRelativeScaleValue}">
  51. </CheckBox>
  52. <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>
  53. </StackPanel>
  54. </Grid>
  55. <Grid Grid.Row="1" Margin="16,8,16,0" Width="228">
  56. <StackPanel>
  57. <TextBlock Text="位置" FontSize="12" Foreground="#666666" Height="20" Width="24" HorizontalAlignment="Left"></TextBlock>
  58. <StackPanel Orientation="Horizontal" Margin="0,8,0,0">
  59. <Grid Width="74" Height="74">
  60. <Grid.ColumnDefinitions>
  61. <ColumnDefinition></ColumnDefinition>
  62. <ColumnDefinition></ColumnDefinition>
  63. <ColumnDefinition></ColumnDefinition>
  64. </Grid.ColumnDefinitions>
  65. <Grid.RowDefinitions>
  66. <RowDefinition></RowDefinition>
  67. <RowDefinition></RowDefinition>
  68. <RowDefinition></RowDefinition>
  69. </Grid.RowDefinitions>
  70. <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>
  71. <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>
  72. <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>
  73. <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>
  74. <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>
  75. <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>
  76. <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>
  77. <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>
  78. <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>
  79. </Grid>
  80. <StackPanel Orientation="Vertical" Margin="70,0,0,0">
  81. <StackPanel Orientation="Horizontal">
  82. <TextBlock Text="X" Width="9" Height="20" VerticalAlignment="Center"/>
  83. <cus:NumericUpDown Width="66" Height="32" Margin="9,0,0,0" Text="{Binding HorizOffsetValue,Mode=TwoWay}"></cus:NumericUpDown>
  84. </StackPanel>
  85. <StackPanel Orientation="Horizontal" Margin="0,8,0,0">
  86. <TextBlock Text="Y" Width="9" Height="20" VerticalAlignment="Center"/>
  87. <cus:NumericUpDown Width="66" Height="32" Margin="9,0,0,0" Text="{Binding VertOffsetValue,Mode=TwoWay}"></cus:NumericUpDown>
  88. </StackPanel>
  89. </StackPanel>
  90. </StackPanel>
  91. <CheckBox Style="{StaticResource EditToolsCheckBoxStyle}" Content="平铺" Margin="0,24,0,0" Name="IsFullCheckBox" IsChecked="{Binding IsFullValue}">
  92. </CheckBox>
  93. <StackPanel Orientation="Horizontal" Margin="0,8,0,0">
  94. <StackPanel Orientation="Horizontal">
  95. <TextBlock Text="" Background="Aquamarine" Width="25" Height="9" VerticalAlignment="Center"/>
  96. <cus:NumericUpDown Width="66" Height="32" Margin="9,0,0,0" Text="{Binding HorizontalSpacingValue,Mode=TwoWay}" IsEnabled="{Binding ElementName=IsFullCheckBox,Path=IsChecked}"></cus:NumericUpDown>
  97. </StackPanel>
  98. <StackPanel Orientation="Horizontal" Margin="32,0,0,0">
  99. <TextBlock Background="AntiqueWhite" Width="9" Height="25" VerticalAlignment="Center"/>
  100. <cus:NumericUpDown Width="66" Height="32" Margin="9,0,0,0" Text="{Binding VerticalSpacingValue,Mode=TwoWay}" IsEnabled="{Binding ElementName=IsFullCheckBox,Path=IsChecked}"></cus:NumericUpDown>
  101. </StackPanel>
  102. </StackPanel>
  103. </StackPanel>
  104. </Grid>
  105. <Grid Width="228" Grid.Row="2" Margin="16,10,16,4" Grid.RowSpan="2">
  106. <StackPanel Orientation="Vertical">
  107. <TextBlock Text="页面范围" FontSize="12" Foreground="#666666" Height="20" Width="48" HorizontalAlignment="Left"></TextBlock>
  108. <cus:WritableComboBox Height="32" Margin="0,8,0,0" Text="{Binding PageRangeText,Mode=TwoWay}" SelectedIndex="{Binding PageRangeSelectIndex,Mode=TwoWay}" MaxPageRange="9999"></cus:WritableComboBox>
  109. </StackPanel>
  110. </Grid>
  111. </Grid>
  112. </Grid>
  113. </UserControl>