WatermarkCreateFileContent.xaml 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. <UserControl x:Class="PDF_Office.Views.EditTools.Watermark.WatermarkCreateFileContent"
  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_Office.CustomControl"
  8. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  9. mc:Ignorable="d"
  10. d:DesignHeight="632"
  11. d:DesignWidth="260" >
  12. <Grid>
  13. <Grid.RowDefinitions>
  14. <RowDefinition Height="48"/>
  15. <RowDefinition Height="584"/>
  16. </Grid.RowDefinitions>
  17. <Grid Grid.Row="0" Width="228" Margin="0,16,0,0">
  18. <StackPanel Orientation="Horizontal">
  19. <TextBox Name="FileNameTextBox" IsReadOnly="True" Text="{Binding FileNameText}" FontSize="14" VerticalContentAlignment="Center" Width="188"></TextBox>
  20. <Button Content="+" Width="32" Height="32" Margin="8,0,0,0" Command="{Binding OpenFileCommand}"></Button>
  21. </StackPanel>
  22. </Grid>
  23. <Grid Grid.Row="1" Visibility="{Binding CreatFileVisible}">
  24. <Grid.RowDefinitions>
  25. <RowDefinition Height="197"/>
  26. <RowDefinition Height="200"/>
  27. <RowDefinition Height="*"/>
  28. </Grid.RowDefinitions>
  29. <Grid Grid.Row="0" Margin="16,23,16,0" Width="228">
  30. <StackPanel Orientation="Vertical">
  31. <TextBlock Text="外观" FontSize="12" Foreground="#666666" Height="20" Width="24" HorizontalAlignment="Left"></TextBlock>
  32. <StackPanel Orientation="Horizontal" Margin="0,8,0,0">
  33. <StackPanel Orientation="Horizontal">
  34. <TextBlock Width="24" Height="24" Background="CadetBlue"></TextBlock>
  35. <cus:CommonWritableComboBox Width="66" Height="32" Margin="8,0,0,0" TypeSouce="{Binding RotationList}" Minimum="-360" Maximum="360" Unit=" " Text="0" Value="{Binding RotationValue,Mode=TwoWay}"></cus:CommonWritableComboBox>
  36. </StackPanel>
  37. <StackPanel Orientation="Horizontal" Margin="28,0,0,0">
  38. <TextBlock Width="24" Height="24" Background="CadetBlue"></TextBlock>
  39. <cus:CommonWritableComboBox Width="66" Height="32" Margin="8,0,0,0" TypeSouce="{Binding OpacityList,Mode=TwoWay}" Text="100 %" Value="{Binding OpacityValue,Mode=TwoWay}"></cus:CommonWritableComboBox>
  40. </StackPanel>
  41. </StackPanel>
  42. <ComboBox Height="32" Margin="0,8,0,0" ItemsSource="{Binding IsFrontList}" SelectedIndex="{Binding IsFrontSelectedIndex}"></ComboBox>
  43. <CheckBox Margin="0,11,0,0" Name="RelativeScaleCheckBox">
  44. <TextBlock Text="相对于页面目标的比例" Width="144" Height="22" FontSize="14"/>
  45. </CheckBox>
  46. <cus:CommonWritableComboBox Width="66" Height="32" HorizontalAlignment="Left" Margin="0,9,0,0" TypeSouce="{Binding ScaleList}" IsEnabled="{Binding ElementName=RelativeScaleCheckBox,Path=IsChecked}" Text="50 %" Value="{Binding RelativeScaleValue,Mode=TwoWay}"></cus:CommonWritableComboBox>
  47. </StackPanel>
  48. </Grid>
  49. <Grid Grid.Row="1" Margin="16,10,16,0" Width="228">
  50. <StackPanel>
  51. <TextBlock Text="位置" FontSize="12" Foreground="#666666" Height="20" Width="24" HorizontalAlignment="Left"></TextBlock>
  52. <StackPanel Orientation="Horizontal" Margin="0,8,0,0">
  53. <Grid Width="74" Height="74">
  54. <Grid.ColumnDefinitions>
  55. <ColumnDefinition></ColumnDefinition>
  56. <ColumnDefinition></ColumnDefinition>
  57. <ColumnDefinition></ColumnDefinition>
  58. </Grid.ColumnDefinitions>
  59. <Grid.RowDefinitions>
  60. <RowDefinition></RowDefinition>
  61. <RowDefinition></RowDefinition>
  62. <RowDefinition></RowDefinition>
  63. </Grid.RowDefinitions>
  64. <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>
  65. <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>
  66. <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>
  67. <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>
  68. <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>
  69. <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>
  70. <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>
  71. <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>
  72. <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>
  73. </Grid>
  74. <StackPanel Orientation="Vertical" Margin="70,0,0,0">
  75. <StackPanel Orientation="Horizontal">
  76. <TextBlock Text="X" Width="9" Height="20" VerticalAlignment="Center"/>
  77. <cus:NumericUpDown Width="66" Height="32" Margin="9,0,0,0" Text="{Binding HorizOffsetValue,Mode=TwoWay}"></cus:NumericUpDown>
  78. </StackPanel>
  79. <StackPanel Orientation="Horizontal" Margin="0,8,0,0">
  80. <TextBlock Text="Y" Width="9" Height="20" VerticalAlignment="Center"/>
  81. <cus:NumericUpDown Width="66" Height="32" Margin="9,0,0,0" Text="{Binding VertOffsetValue,Mode=TwoWay}"></cus:NumericUpDown>
  82. </StackPanel>
  83. </StackPanel>
  84. </StackPanel>
  85. <CheckBox Margin="0,24,0,0" Name="IsFullCheckBox">
  86. <TextBlock Text="平铺" Width="144" Height="22" FontSize="14"/>
  87. </CheckBox>
  88. <StackPanel Orientation="Horizontal" Margin="0,8,0,0">
  89. <StackPanel Orientation="Horizontal">
  90. <TextBlock Text="" Background="Aquamarine" Width="25" Height="9" VerticalAlignment="Center"/>
  91. <cus:NumericUpDown Width="66" Height="32" Margin="9,0,0,0" Text="{Binding HorizontalSpacingValue,Mode=TwoWay}" IsEnabled="{Binding ElementName=IsFullCheckBox,Path=IsChecked}"></cus:NumericUpDown>
  92. </StackPanel>
  93. <StackPanel Orientation="Horizontal" Margin="32,0,0,0">
  94. <TextBlock Background="AntiqueWhite" Width="9" Height="25" VerticalAlignment="Center"/>
  95. <cus:NumericUpDown Width="66" Height="32" Margin="9,0,0,0" Text="{Binding VerticalSpacingValue,Mode=TwoWay}" IsEnabled="{Binding ElementName=IsFullCheckBox,Path=IsChecked}"></cus:NumericUpDown>
  96. </StackPanel>
  97. </StackPanel>
  98. </StackPanel>
  99. </Grid>
  100. <Grid Width="228" Grid.Row="2" Margin="16,10,16,4" Grid.RowSpan="2">
  101. <StackPanel Orientation="Vertical">
  102. <TextBlock Text="页面范围" FontSize="12" Foreground="#666666" Height="20" Width="48" HorizontalAlignment="Left"></TextBlock>
  103. <cus:WritableComboBox Height="32" Margin="0,8,0,0" Text="{Binding PageRangeText,Mode=TwoWay}" SelectedIndex="{Binding PageRangeSelectIndex,Mode=TwoWay}"></cus:WritableComboBox>
  104. </StackPanel>
  105. </Grid>
  106. </Grid>
  107. </Grid>
  108. </UserControl>