PDFTextEditControl.xaml 4.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. <UserControl x:Class="Compdfkit_Tools.Edit.PDFTextEditControl"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:local="clr-namespace:Compdfkit_Tools.Edit"
  7. xmlns:common="clr-namespace:Compdfkit_Tools.Common"
  8. mc:Ignorable="d"
  9. d:DesignHeight="800" d:DesignWidth="292" Width="260" Padding="16,0,16,0" Background="#FAFCFF">
  10. <UserControl.Resources>
  11. <ResourceDictionary>
  12. <ResourceDictionary.MergedDictionaries>
  13. <ResourceDictionary Source="../../../Asset/Styles/SliderStyle.xaml"></ResourceDictionary>
  14. </ResourceDictionary.MergedDictionaries>
  15. </ResourceDictionary>
  16. </UserControl.Resources>
  17. <Grid>
  18. <Grid.RowDefinitions>
  19. <RowDefinition Height="auto"></RowDefinition>
  20. <RowDefinition Height="auto"></RowDefinition>
  21. </Grid.RowDefinitions>
  22. <Border Height="36" Background="White">
  23. <TextBlock FontSize="14" FontWeight="Bold" HorizontalAlignment="Center" LineHeight="17" VerticalAlignment="Center">Text Properties</TextBlock>
  24. </Border>
  25. <Grid Grid.Row="1">
  26. <Grid.RowDefinitions>
  27. <RowDefinition Height="auto"></RowDefinition>
  28. <RowDefinition Height="auto"></RowDefinition>
  29. <RowDefinition Height="auto"></RowDefinition>
  30. <RowDefinition Height="auto"></RowDefinition>
  31. <RowDefinition Height="auto"></RowDefinition>
  32. <RowDefinition Height="auto"></RowDefinition>
  33. </Grid.RowDefinitions>
  34. <TextBlock Margin="0,20,0,0" Foreground="#0E1114" FontSize="14">Font Color:</TextBlock>
  35. <common:ColorPickerControl x:Name="FontColorUI" Grid.Row="1" Margin="0,20,0,0" TransparentBtnProperty="Collapsed"></common:ColorPickerControl>
  36. <Grid Grid.Row="2" Margin="0,20,0,0" Visibility="Visible">
  37. <Grid.ColumnDefinitions>
  38. <ColumnDefinition Width="*"></ColumnDefinition>
  39. <ColumnDefinition Width="auto"></ColumnDefinition>
  40. </Grid.ColumnDefinitions>
  41. <Grid.RowDefinitions>
  42. <RowDefinition Height="auto"></RowDefinition>
  43. <RowDefinition Height="auto"></RowDefinition>
  44. </Grid.RowDefinitions>
  45. <TextBlock FontSize="14" Foreground="#43474D">Opacity:</TextBlock>
  46. <Slider Style="{StaticResource SliderStyle}" Grid.Row="1" Width="148" Height="28"
  47. Name="FontOpacitySlider"
  48. Value="14"
  49. IsSelectionRangeEnabled="True"
  50. IsMoveToPointEnabled="True"
  51. Margin="2,20,2,0"
  52. Maximum="1"
  53. Minimum="0"
  54. TickFrequency="0.01"
  55. IsSnapToTickEnabled="True"
  56. Thumb.DragCompleted="SliderOpacity_DragCompleted"
  57. Thumb.DragStarted="Slider_DragStarted"
  58. ValueChanged="SliderOpacity_ValueChanged"
  59. Tag="true"
  60. />
  61. <Grid Grid.Row="1" Grid.Column="1" Margin="0,10,0,0">
  62. <ComboBox Name="OpacityComboBox" VerticalContentAlignment="Center" Width="72" Height="28" Foreground="#43474D" FontSize="14"
  63. SelectionChanged="OpacityComboBox_SelectionChanged" BorderBrush="#1E000000">
  64. <ComboBoxItem>25%</ComboBoxItem>
  65. <ComboBoxItem>50%</ComboBoxItem>
  66. <ComboBoxItem>75%</ComboBoxItem>
  67. <ComboBoxItem>100%</ComboBoxItem>
  68. </ComboBox>
  69. <TextBox Name="OpacityTextBox" IsHitTestVisible="False" Width="72" Height="30" VerticalContentAlignment="Center" HorizontalContentAlignment="Center"
  70. IsReadOnly="True" Background="White" Padding="0,0,15,0" FontSize="14">100%</TextBox>
  71. <Path Fill="#43474D" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="0,0,5,0" IsHitTestVisible="False">
  72. <Path.Data>
  73. M0.5 0.510248L4.5041 5.5L8.5 0.5L0.5 0.510248Z
  74. </Path.Data>
  75. </Path>
  76. </Grid>
  77. </Grid>
  78. <local:CPDFTextStyleUI x:Name="TextStyleUI" Grid.Row="3" FontSize="16" Margin="0,20,0,0"></local:CPDFTextStyleUI>
  79. <local:CPDFTextAlignUI x:Name="TextAlignUI" Grid.Row="4" FontSize="16" Margin="0,20,0,0" Width="150" HorizontalAlignment="Left"></local:CPDFTextAlignUI>
  80. </Grid>
  81. </Grid>
  82. </UserControl>