PDFTextEditControl.xaml 6.2 KB

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