StickyNotePopup.xaml 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. <annotview:StickyPopupExt x:Class="PDF_Office.Views.PropertyPanel.AnnotPanel.StickyNotePopup"
  2. xmlns:annotview="clr-namespace:ComPDFKitViewer;assembly=ComPDFKit.Viewer"
  3. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  4. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  6. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  7. xmlns:local="clr-namespace:PDF_Office.Views.PropertyPanel.AnnotPanel"
  8. mc:Ignorable="d" Background="Transparent"
  9. d:DesignHeight="450" d:DesignWidth="800">
  10. <annotview:StickyPopupExt.Resources>
  11. <DataTemplate x:Key="listboxData">
  12. <Ellipse
  13. Width="20"
  14. Height="20"
  15. Fill="{Binding Color}" />
  16. </DataTemplate>
  17. <Style x:Key="listboxItemStyle" TargetType="{x:Type ListBoxItem}">
  18. <Setter Property="HorizontalContentAlignment" Value="Center" />
  19. <Setter Property="Height" Value="32" />
  20. <Setter Property="Margin" Value="2,0,2,0" />
  21. </Style>
  22. </annotview:StickyPopupExt.Resources>
  23. <Grid MouseLeftButtonDown="Grid_MouseLeftButtonDown">
  24. <Border x:Name="border" Background="{StaticResource color.sys.layout.anti}" CornerRadius="8" BorderThickness="2" BorderBrush="#ffe49a" MinWidth="240" MinHeight="200" Width="240" Height="200" >
  25. <Border.Effect>
  26. <DropShadowEffect BlurRadius="8" Direction="0" Opacity="0.16" ShadowDepth="0" Color="#000000" />
  27. </Border.Effect>
  28. <Grid MinWidth="240" MinHeight="200" Background="White" Name="GridUi" Width="240" Height="200">
  29. <Grid.RowDefinitions>
  30. <RowDefinition Height="auto"></RowDefinition>
  31. <RowDefinition Height="auto"></RowDefinition>
  32. <RowDefinition Height="*"></RowDefinition>
  33. <RowDefinition Height="auto"></RowDefinition>
  34. </Grid.RowDefinitions>
  35. <Grid>
  36. <Grid.ColumnDefinitions>
  37. <ColumnDefinition Width="auto"></ColumnDefinition>
  38. <ColumnDefinition Width="auto"></ColumnDefinition>
  39. <ColumnDefinition Width="*"></ColumnDefinition>
  40. <ColumnDefinition Width="auto"></ColumnDefinition>
  41. <ColumnDefinition Width="auto"></ColumnDefinition>
  42. </Grid.ColumnDefinitions>
  43. <TextBlock x:Name="AuthorText" Grid.Column="1" FontFamily="SegoeUI" FontSize="12" VerticalAlignment="Center" LineHeight="16" Margin="2,2,0,0"/>
  44. <TextBlock Name="DateText" Grid.Column="3" Foreground="{StaticResource color.sys.text.neutral.lv2}" VerticalAlignment="Center" Margin="0,-2,0,0" FontFamily="SegoeUI" FontSize="12" LineHeight="16"></TextBlock>
  45. <Border Grid.Column="4" MouseUp="CloseText_MouseUp" Background="#01000000" Margin="0,-8,-3,0">
  46. <Path Fill="#000000" Width="16" Height="16" >
  47. <Path.Data>
  48. M9.48528137,2.98528137 L9.48428137,8.48428137 L14.9852814,8.48528137 L14.9852814,9.48528137 L9.48428137,9.48428137 L9.48528137,14.9852814 L8.48528137,14.9852814 L8.48428137,9.48428137 L2.98528137,9.48528137 L2.98528137,8.48528137 L8.48428137,8.48428137 L8.48528137,2.98528137 L9.48528137,2.98528137 Z
  49. </Path.Data>
  50. <Path.LayoutTransform>
  51. <RotateTransform Angle="45"></RotateTransform>
  52. </Path.LayoutTransform>
  53. </Path>
  54. </Border>
  55. </Grid>
  56. <TextBox Name="ContentText" Grid.Row="2" Margin="4,0,4,0" Background="#CCFFFFFF" BorderThickness="0"
  57. AcceptsReturn="True" TextWrapping="Wrap" VerticalScrollBarVisibility="Auto"></TextBox>
  58. <Grid Grid.Row="3">
  59. <ListBox
  60. x:Name="ListColor"
  61. Background="Transparent"
  62. BorderThickness="0"
  63. ItemContainerStyle="{StaticResource listboxItemStyle}"
  64. ItemTemplate="{StaticResource listboxData}"
  65. SelectionChanged="ListColor_SelectionChanged"
  66. >
  67. <ListBox.ItemsPanel>
  68. <ItemsPanelTemplate>
  69. <WrapPanel Orientation="Horizontal" />
  70. </ItemsPanelTemplate>
  71. </ListBox.ItemsPanel>
  72. </ListBox>
  73. </Grid>
  74. <Button
  75. x:Name="BtnDelete" HorizontalAlignment="Right"
  76. Width="32" Grid.Row="3"
  77. Height="32"
  78. MaxHeight="40"
  79. Margin="16,0,10,5" BorderThickness="0"
  80. Foreground="#6B6F7D" Click="BtnDelete_Click"
  81. Style="{StaticResource btn.sec}">
  82. <Path
  83. Width="32"
  84. Height="32"
  85. Data="M14 9.75H18V8.25H14V9.75ZM9 12.25H10.25V23C10.25 23.4142 10.5858 23.75 11 23.75H21C21.4142 23.75 21.75 23.4142 21.75 23V12.25H23V10.75H9V12.25ZM11.75 22.25V12.25H20.25V22.25H11.75ZM15.25 14.5V19.5H16.75V14.5H15.25Z"
  86. Fill="{Binding ElementName=BtnDelete, Path=Foreground}" />
  87. </Button>
  88. <ResizeGrip Name="GripControl" Visibility="Collapsed" Grid.Row="3" HorizontalAlignment="Right" Margin="0,2,0,0" Cursor="SizeNWSE" MouseMove="ResizeGrip_MouseMove"></ResizeGrip>
  89. </Grid>
  90. </Border>
  91. </Grid>
  92. </annotview:StickyPopupExt>