PDFTextEditControl.xaml 5.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  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. <common:PropertyPanelResourceConverter x:Key="PropertyPanelResourceConverter"></common:PropertyPanelResourceConverter>
  16. </ResourceDictionary>
  17. </UserControl.Resources>
  18. <Grid>
  19. <Grid.RowDefinitions>
  20. <RowDefinition Height="auto"></RowDefinition>
  21. <RowDefinition Height="auto"></RowDefinition>
  22. </Grid.RowDefinitions>
  23. <Border Height="36" Background="White">
  24. <TextBlock FontSize="14" FontWeight="Bold" HorizontalAlignment="Center" LineHeight="17" VerticalAlignment="Center"
  25. Text="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=Title_TextProperty}"></TextBlock>
  26. </Border>
  27. <Grid Grid.Row="1">
  28. <Grid.RowDefinitions>
  29. <RowDefinition Height="auto"></RowDefinition>
  30. <RowDefinition Height="auto"></RowDefinition>
  31. <RowDefinition Height="auto"></RowDefinition>
  32. <RowDefinition Height="auto"></RowDefinition>
  33. <RowDefinition Height="auto"></RowDefinition>
  34. <RowDefinition Height="auto"></RowDefinition>
  35. </Grid.RowDefinitions>
  36. <TextBlock Margin="0,20,0,0" Foreground="#0E1114" FontSize="14"
  37. Text="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=Property_FontColor}"></TextBlock>
  38. <common:ColorPickerControl x:Name="FontColorUI" Grid.Row="1" Margin="0,20,0,0" TransparentBtnProperty="Collapsed"></common:ColorPickerControl>
  39. <Grid Grid.Row="2" Margin="0,20,0,0" Visibility="Visible">
  40. <Grid.ColumnDefinitions>
  41. <ColumnDefinition Width="*"></ColumnDefinition>
  42. <ColumnDefinition Width="auto"></ColumnDefinition>
  43. </Grid.ColumnDefinitions>
  44. <Grid.RowDefinitions>
  45. <RowDefinition Height="auto"></RowDefinition>
  46. <RowDefinition Height="auto"></RowDefinition>
  47. </Grid.RowDefinitions>
  48. <TextBlock FontSize="14" Foreground="#43474D"
  49. Text="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=Property_Opacity}"></TextBlock>
  50. <Slider Style="{StaticResource SliderStyle}" Grid.Row="1" Width="148" Height="28"
  51. Name="FontOpacitySlider"
  52. Value="14"
  53. IsSelectionRangeEnabled="True"
  54. IsMoveToPointEnabled="True"
  55. Margin="2,20,2,0"
  56. Maximum="1"
  57. Minimum="0"
  58. TickFrequency="0.01"
  59. IsSnapToTickEnabled="True"
  60. Thumb.DragCompleted="SliderOpacity_DragCompleted"
  61. Thumb.DragStarted="Slider_DragStarted"
  62. ValueChanged="SliderOpacity_ValueChanged"
  63. Tag="true"
  64. />
  65. <Grid Grid.Row="1" Grid.Column="1" Margin="0,10,0,0">
  66. <ComboBox Name="OpacityComboBox" VerticalContentAlignment="Center" Width="72" Height="28" Foreground="#43474D" FontSize="14"
  67. SelectionChanged="OpacityComboBox_SelectionChanged" BorderBrush="#1E000000">
  68. <ComboBoxItem>25%</ComboBoxItem>
  69. <ComboBoxItem>50%</ComboBoxItem>
  70. <ComboBoxItem>75%</ComboBoxItem>
  71. <ComboBoxItem>100%</ComboBoxItem>
  72. </ComboBox>
  73. <TextBox Name="OpacityTextBox" IsHitTestVisible="False" Width="72" Height="30" VerticalContentAlignment="Center" HorizontalContentAlignment="Center"
  74. IsReadOnly="True" Background="White" Padding="0,0,15,0" FontSize="14">100%</TextBox>
  75. <Path Fill="#43474D" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="0,0,5,0" IsHitTestVisible="False">
  76. <Path.Data>
  77. M0.5 0.510248L4.5041 5.5L8.5 0.5L0.5 0.510248Z
  78. </Path.Data>
  79. </Path>
  80. </Grid>
  81. </Grid>
  82. <local:CPDFTextStyleUI x:Name="TextStyleUI" Grid.Row="3" FontSize="16" Margin="0,20,0,0"></local:CPDFTextStyleUI>
  83. <local:CPDFTextAlignUI x:Name="TextAlignUI" Grid.Row="4" FontSize="16" Margin="0,20,0,0" Width="150" HorizontalAlignment="Left"></local:CPDFTextAlignUI>
  84. </Grid>
  85. </Grid>
  86. </UserControl>