SignatureAnnotProperty.xaml 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. <UserControl x:Class="PDF_Office.Views.PropertyPanel.AnnotPanel.SignatureAnnotProperty"
  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:PDF_Office.Views.PropertyPanel.AnnotPanel" xmlns:customcontrol="clr-namespace:PDF_Office.CustomControl" xmlns:annotpanel="clr-namespace:PDF_Office.ViewModels.PropertyPanel.AnnotPanel" d:DataContext="{d:DesignInstance Type=annotpanel:SignatureAnnotPropertyViewModel}"
  7. mc:Ignorable="d" >
  8. <UserControl.Resources>
  9. <PathGeometry x:Key="Ic_AddButtonPath" Figures="M13.5 8C13.5 11.0376 11.0376 13.5 8 13.5C4.96243 13.5 2.5 11.0376 2.5 8C2.5 4.96243 4.96243 2.5 8 2.5C11.0376 2.5 13.5 4.96243 13.5 8ZM15 8C15 11.866 11.866 15 8 15C4.13401 15 1 11.866 1 8C1 4.13401 4.13401 1 8 1C11.866 1 15 4.13401 15 8ZM7.25005 4.80003V7.25003H4.80005V8.75003H7.25005V11.2H8.75005V8.75003H11.2V7.25003H8.75005V4.80003H7.25005Z" FillRule="EvenOdd" />
  10. </UserControl.Resources>
  11. <Grid Background="Transparent">
  12. <Grid.RowDefinitions>
  13. <RowDefinition Height="50"/>
  14. <RowDefinition Height="*"/>
  15. <RowDefinition/>
  16. </Grid.RowDefinitions>
  17. <Grid x:Name="Header" >
  18. <Grid.ColumnDefinitions>
  19. <ColumnDefinition Width="16"/>
  20. <ColumnDefinition Width="*"/>
  21. <ColumnDefinition Width="16"/>
  22. </Grid.ColumnDefinitions>
  23. <TextBlock Grid.Column="1" x:Name="TxtTitle" HorizontalAlignment="Left"
  24. VerticalAlignment="Center" FontSize="18" FontWeight="SemiBold" Text="Signature" />
  25. <customcontrol:PathButton Grid.Column="1"
  26. HorizontalAlignment="Right"
  27. x:Name="BtnAdd"
  28. Command="{Binding ShowDialogCommand}"
  29. Height="16" Width="16" IconHeight="16" IconWidth="16"
  30. Icon="{StaticResource Ic_AddButtonPath}" IconFill="#616469"
  31. IconPress="{StaticResource Ic_AddButtonPath}" IconPressFill="#C04CF8"
  32. IconMouseOver="{StaticResource Ic_AddButtonPath}" IconMouseOverFill="#C04CF8" />
  33. </Grid>
  34. <Grid Grid.Row="1">
  35. <ListBox ItemsSource="{Binding SignatureList}" SelectionMode="Single" Width="256" Height="auto" VerticalAlignment="Top" BorderThickness="0" ScrollViewer.HorizontalScrollBarVisibility="Disabled">
  36. <ListBox.ItemTemplate>
  37. <DataTemplate >
  38. <ListBoxItem >
  39. <ListBoxItem.ContextMenu>
  40. <ContextMenu>
  41. <MenuItem Header="导出图章">
  42. <MenuItem x:Name="SavePNG" Header="PNG" Tag="PNG"/>
  43. <MenuItem x:Name="SavePDF" Header="PDF" Tag="PDF"/>
  44. </MenuItem>
  45. </ContextMenu>
  46. </ListBoxItem.ContextMenu>
  47. <Image Source="{Binding SourcePath}" Stretch="Uniform" Height="48"/>
  48. </ListBoxItem>
  49. </DataTemplate>
  50. </ListBox.ItemTemplate>
  51. <ListBox.ItemContainerStyle>
  52. <Style TargetType="ListBoxItem">
  53. <Setter Property="Height" Value="64"/>
  54. <Setter Property="Padding" Value="12 8 12 8"/>
  55. <Setter Property="HorizontalContentAlignment" Value="Center"/>
  56. <EventSetter Event="PreviewMouseLeftButtonDown" Handler="ListBoxItem_PreviewMouseLeftButtonDown"/>
  57. </Style>
  58. </ListBox.ItemContainerStyle>
  59. </ListBox>
  60. </Grid>
  61. </Grid>
  62. </UserControl>