WatermarkCreateTextContent.xaml 11 KB

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