CPDFBookmarkAddUI.xaml 5.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. <UserControl x:Class="Compdfkit_Tools.PDFControlUI.CPDFBookmarkAddUI"
  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.PDFControlUI"
  7. xmlns:common="clr-namespace:Compdfkit_Tools.Common"
  8. mc:Ignorable="d"
  9. d:DesignHeight="450" d:DesignWidth="800" Background="#FAFCFF">
  10. <UserControl.Resources>
  11. <ResourceDictionary>
  12. <local:BoolEnableConvert x:Key="BoolEnableCovert"/>
  13. <common:TextLengthToVisibilityConverter x:Key="TextLengthToVisibilityConverter"/>
  14. <common:InvertTextLengthToVisibilityConverter x:Key="InvertTextLengthToVisibilityConvert"/>
  15. <common:TextLengthToBoolConverter x:Key="TextLengthToBoolConvert"/>
  16. <ResourceDictionary.MergedDictionaries>
  17. <ResourceDictionary Source="../../../Asset/Styles/ButtonStyle.xaml"></ResourceDictionary>
  18. </ResourceDictionary.MergedDictionaries>
  19. </ResourceDictionary>
  20. </UserControl.Resources>
  21. <Grid>
  22. <Grid.RowDefinitions>
  23. <RowDefinition Height="auto"></RowDefinition>
  24. <RowDefinition Height="auto"></RowDefinition>
  25. </Grid.RowDefinitions>
  26. <Border Height="36">
  27. <Grid>
  28. <Grid.ColumnDefinitions>
  29. <ColumnDefinition Width="*"></ColumnDefinition>
  30. <ColumnDefinition Width="*"></ColumnDefinition>
  31. </Grid.ColumnDefinitions>
  32. <TextBlock Foreground="#43474D" FontSize="14" Margin="16,0,0,0" VerticalAlignment="Center" FontWeight="SemiBold">Bookmark</TextBlock>
  33. <Border Grid.Column="1" Width="16" Height="16" Background="#01000000" HorizontalAlignment="Right" Margin="0,0,16,0" VerticalAlignment="Center"
  34. MouseLeftButtonDown="Border_MouseLeftButtonDown">
  35. <Path Fill="#43474D">
  36. <Path.Data>
  37. M8.5 7.5V3H7.5V7.5H3V8.5H7.5V13H8.5V8.5H13V7.5H8.5Z
  38. </Path.Data>
  39. </Path>
  40. </Border>
  41. </Grid>
  42. </Border>
  43. <Border Name="BookmarkInputPanel" Grid.Row="1" Background="#DDE9FF" Height="108" Margin="0,5,0,0" Padding="16,0,16,0" Visibility="Collapsed">
  44. <Grid >
  45. <Grid.RowDefinitions>
  46. <RowDefinition Height="auto"></RowDefinition>
  47. <RowDefinition Height="auto"></RowDefinition>
  48. <RowDefinition Height="auto"></RowDefinition>
  49. </Grid.RowDefinitions>
  50. <Border Height="28">
  51. <TextBlock Name="PageNumText" VerticalAlignment="Center"></TextBlock>
  52. </Border>
  53. <Grid Grid.Row="1">
  54. <TextBox Name="BookmarkText" VerticalContentAlignment="Center" Height="30" Padding="5,0,30,0"></TextBox>
  55. <TextBlock VerticalAlignment="Center" IsHitTestVisible="False" Margin="10,0,0,0" Foreground="#999999"
  56. Visibility="{Binding ElementName=BookmarkText,Path=Text,Converter={StaticResource TextLengthToVisibilityConverter}}">Bookmark Title</TextBlock>
  57. <Border x:Name="DeleteBorder" Visibility="{Binding ElementName=BookmarkText,Path=Text,Converter={StaticResource InvertTextLengthToVisibilityConvert}}"
  58. HorizontalAlignment="Right" VerticalAlignment="Center" Margin="0,0,10,0"
  59. Background="#01000000" MouseLeftButtonDown="DeleteBorder_MouseLeftButtonDown">
  60. <Path Fill="Black" IsHitTestVisible="False">
  61. <Path.Data>
  62. M12.5762 3.95117L8.5332 8L12.5762 12.0488L12.0488 12.5762L8 8.5332L3.95117 12.5762L3.42383
  63. 12.0488L7.4668 8L3.42383 3.95117L3.95117 3.42383L8 7.4668L12.0488 3.42383L12.5762 3.95117Z
  64. </Path.Data>
  65. </Path>
  66. </Border>
  67. </Grid>
  68. <StackPanel Orientation="Horizontal" Grid.Row="2" HorizontalAlignment="Right" Margin="0,10,0,0">
  69. <Border Width="56" Height="30" Background="#01000000" MouseLeftButtonDown="ButtonCancel_Click">
  70. <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="14" Foreground="#1460F3">Cancel</TextBlock>
  71. </Border>
  72. <Button Style="{StaticResource ButtonStyle}" IsEnabled="{Binding ElementName=BookmarkText, Path=Text, Converter={StaticResource TextLengthToBoolConvert}}" Margin="10,0,0,0" Width="56" Height="30" Click="ButtonAdd_Click">Save</Button>
  73. </StackPanel>
  74. </Grid>
  75. </Border>
  76. </Grid>
  77. </UserControl>