CPDFBookmarkAddUI.xaml 5.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  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. <common:BotaResourceConverter x:Key="BotaResourceConverter"></common:BotaResourceConverter>
  17. <ResourceDictionary.MergedDictionaries>
  18. <ResourceDictionary Source="../../../Asset/Styles/ButtonStyle.xaml"></ResourceDictionary>
  19. </ResourceDictionary.MergedDictionaries>
  20. </ResourceDictionary>
  21. </UserControl.Resources>
  22. <Grid>
  23. <Grid.RowDefinitions>
  24. <RowDefinition Height="auto"></RowDefinition>
  25. <RowDefinition Height="auto"></RowDefinition>
  26. </Grid.RowDefinitions>
  27. <Border Height="36">
  28. <Grid>
  29. <Grid.ColumnDefinitions>
  30. <ColumnDefinition Width="*"></ColumnDefinition>
  31. <ColumnDefinition Width="*"></ColumnDefinition>
  32. </Grid.ColumnDefinitions>
  33. <TextBlock Text="{Binding Converter={StaticResource BotaResourceConverter},ConverterParameter=Title_Bookmarks}" Foreground="#43474D" FontSize="14" Margin="16,0,0,0" VerticalAlignment="Center" FontWeight="SemiBold"></TextBlock>
  34. <Border Grid.Column="1" Width="16" Height="16" Background="#01000000" HorizontalAlignment="Right" Margin="0,0,16,0" VerticalAlignment="Center"
  35. MouseLeftButtonDown="Border_MouseLeftButtonDown">
  36. <Path Fill="#43474D">
  37. <Path.Data>
  38. M8.5 7.5V3H7.5V7.5H3V8.5H7.5V13H8.5V8.5H13V7.5H8.5Z
  39. </Path.Data>
  40. </Path>
  41. </Border>
  42. </Grid>
  43. </Border>
  44. <Border Name="BookmarkInputPanel" Grid.Row="1" Background="#DDE9FF" Height="108" Margin="0,5,0,0" Padding="16,0,16,0" Visibility="Collapsed">
  45. <Grid >
  46. <Grid.RowDefinitions>
  47. <RowDefinition Height="auto"></RowDefinition>
  48. <RowDefinition Height="auto"></RowDefinition>
  49. <RowDefinition Height="auto"></RowDefinition>
  50. </Grid.RowDefinitions>
  51. <Border Height="28">
  52. <TextBlock Name="PageNumText" VerticalAlignment="Center"></TextBlock>
  53. </Border>
  54. <Grid Grid.Row="1">
  55. <TextBox Name="BookmarkText" VerticalContentAlignment="Center" Height="30" Padding="5,0,30,0"></TextBox>
  56. <TextBlock VerticalAlignment="Center" IsHitTestVisible="False" Margin="10,0,0,0" Foreground="#999999"
  57. Visibility="{Binding ElementName=BookmarkText,Path=Text,Converter={StaticResource TextLengthToVisibilityConverter}}"
  58. Text="{Binding Converter={StaticResource BotaResourceConverter},ConverterParameter=Holder_BookmarkTitle}"></TextBlock>
  59. <Border x:Name="DeleteBorder" Visibility="{Binding ElementName=BookmarkText,Path=Text,Converter={StaticResource InvertTextLengthToVisibilityConvert}}"
  60. HorizontalAlignment="Right" VerticalAlignment="Center" Margin="0,0,10,0"
  61. Background="#01000000" MouseLeftButtonDown="DeleteBorder_MouseLeftButtonDown">
  62. <Path Fill="Black" IsHitTestVisible="False">
  63. <Path.Data>
  64. M12.5762 3.95117L8.5332 8L12.5762 12.0488L12.0488 12.5762L8 8.5332L3.95117 12.5762L3.42383
  65. 12.0488L7.4668 8L3.42383 3.95117L3.95117 3.42383L8 7.4668L12.0488 3.42383L12.5762 3.95117Z
  66. </Path.Data>
  67. </Path>
  68. </Border>
  69. </Grid>
  70. <StackPanel Orientation="Horizontal" Grid.Row="2" HorizontalAlignment="Right" Margin="0,10,0,0">
  71. <Border Width="56" Height="30" Background="#01000000" MouseLeftButtonDown="ButtonCancel_Click">
  72. <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="14" Foreground="#1460F3"
  73. Text="{Binding Converter={StaticResource BotaResourceConverter},ConverterParameter=Button_Cancel}"></TextBlock>
  74. </Border>
  75. <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"
  76. Content="{Binding Converter={StaticResource BotaResourceConverter},ConverterParameter=Button_Done}"></Button>
  77. </StackPanel>
  78. </Grid>
  79. </Border>
  80. </Grid>
  81. </UserControl>