WatermarkCreateTextContent.xaml 11 KB

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