123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144 |
- <UserControl x:Class="PDF_Office.Views.PropertyPanel.AnnotPanel.StampAnnotProperty"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
- xmlns:customcontrol="clr-namespace:PDF_Office.CustomControl"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:local="clr-namespace:PDF_Office.Views.PropertyPanel.AnnotPanel"
- xmlns:annotpanel="clr-namespace:PDF_Office.ViewModels.PropertyPanel.AnnotPanel"
- xmlns:model="clr-namespace:PDF_Office.Model.AnnotPanel"
- xmlns:dd="clr-namespace:PDFSettings;assembly=PDFSettings"
- xmlns:dataconvert="clr-namespace:PDF_Office.DataConvert"
- d:DataContext="{d:DesignInstance Type=annotpanel:StampAnnotPropertyViewModel}"
- mc:Ignorable="d"
- >
- <UserControl.Resources>
- <PathGeometry x:Key="Ic_AddButtonPath" Figures="M8.5,2.5 L8.5,7.5 L13.5,7.5 L13.5,8.5 L8.5,8.5 L8.5,13.5 L7.5,13.5 L7.5,8.5 L2.5,8.5 L2.5,7.5 L7.5,7.5 L7.5,2.5 L8.5,2.5 Z"/>
- <dataconvert:BoolToVisible x:Key="BoolToVisible"/>
- </UserControl.Resources>
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="40"/>
- <RowDefinition Height="*"/>
- </Grid.RowDefinitions>
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="*"/>
- <ColumnDefinition Width="auto"/>
- </Grid.ColumnDefinitions>
- <TextBlock x:Name="AnnoteTypeTitle" Text="Stamp" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="0 8 0 0" FontFamily="Segoe UI Semibold" FontWeight="SemiBold" FontSize="18"/>
- <customcontrol:PathButton Grid.Column="1"
- Visibility="{Binding UnStandard,Converter={StaticResource BoolToVisible}}"
- Command="{Binding ShowDialogCommand}"
- Height="24" Width="24" IconHeight="20" IconWidth="20"
- Icon="{StaticResource Ic_AddButtonPath}" IconFill="Red"
- IconPress="{StaticResource Ic_AddButtonPath}" IconPressFill="#C04CF8"
- IconMouseOver="{StaticResource Ic_AddButtonPath}" IconMouseOverFill="#C04CF8" />
- </Grid>
- <TabControl Grid.Row="1" Name="StampTabControl" SelectedIndex="{Binding TabControlSelectedIndex,Mode=TwoWay}" HorizontalAlignment="Stretch" HorizontalContentAlignment="Center" Style="{StaticResource TabControlWithUnderLineStyle}">
- <TabItem x:Name="TabStandard"
- Header="Standard"
- FontFamily="Segoe UI" Foreground="#FF666666"
- HorizontalContentAlignment="Center"
- FontSize="16"
- Height="40"
- Width="88"
- IsSelected="True">
- <ListBox ItemsSource="{Binding StandardStampList}" SelectionMode="Single" Width="256" Height="auto" VerticalAlignment="Top" BorderThickness="0" ScrollViewer.HorizontalScrollBarVisibility="Disabled">
- <ListBox.ItemTemplate>
- <DataTemplate >
- <ListBoxItem >
- <ListBoxItem.ContextMenu>
- <ContextMenu>
- <MenuItem Header="导出图章">
- <MenuItem x:Name="SavePNG" Header="PNG" Tag="PNG" Click="Save_Click"/>
- <MenuItem x:Name="SavePDF" Header="PDF" Tag="PDF" Click="Save_Click"/>
- </MenuItem>
- </ContextMenu>
- </ListBoxItem.ContextMenu>
- <Image Source="{Binding SourcePath}" Stretch="Uniform" Height="48"/>
- </ListBoxItem>
- </DataTemplate>
- </ListBox.ItemTemplate>
- <ListBox.ItemContainerStyle>
- <Style TargetType="ListBoxItem">
- <Setter Property="Height" Value="64"/>
- <Setter Property="Padding" Value="12 8 12 8"/>
- <Setter Property="HorizontalContentAlignment" Value="Center"/>
- <EventSetter Event="PreviewMouseLeftButtonDown" Handler="ListBoxItem_PreviewMouseLeftButtonDown"/>
- </Style>
- </ListBox.ItemContainerStyle>
- </ListBox>
-
- </TabItem>
- <TabItem x:Name="TabDydamic"
- Header="Dynamic"
- FontFamily="Segoe UI" Foreground="#FF666666"
- HorizontalContentAlignment="Center"
- FontSize="16"
- Width="86">
- <ListBox ItemsSource="{Binding DynamicStampList}" Loaded="DydamicListBox_Loaded" SelectionMode="Single" Width="256" Height="auto" VerticalAlignment="Top" BorderThickness="0" ScrollViewer.HorizontalScrollBarVisibility="Disabled">
- <ListBox.ItemTemplate>
- <DataTemplate >
- <ListBoxItem>
- <Image Source="{Binding ImageSource}" Stretch="Uniform" Height="48"/>
- </ListBoxItem>
- </DataTemplate>
- </ListBox.ItemTemplate>
- <ListBox.ItemContainerStyle>
- <Style TargetType="ListBoxItem">
- <Setter Property="Height" Value="64"/>
- <Setter Property="Padding" Value="12 8 12 8"/>
- <Setter Property="HorizontalContentAlignment" Value="Center"/>
- <EventSetter Event="PreviewMouseLeftButtonDown" Handler="ListBoxItem_PreviewMouseLeftButtonDown"/>
- </Style>
- </ListBox.ItemContainerStyle>
- </ListBox>
- </TabItem>
- <TabItem x:Name="TabCustom"
- Header="Custom"
- FontFamily="Segoe UI" Foreground="#FF666666"
- FontSize="16"
- HorizontalContentAlignment="Center"
- Width="76">
- <ListBox Name="CusListbox" Margin="0 0 0 56"
- VerticalAlignment="Top"
- Width="256" Height="auto"
- BorderThickness="0"
- ScrollViewer.HorizontalScrollBarVisibility="Disabled"
- ItemsSource="{Binding CustomStampList}"
- >
- <ListBox.ItemTemplate>
- <HierarchicalDataTemplate DataType="{x:Type model:Stamp}" >
- <Grid>
- <Grid.ContextMenu>
- <ContextMenu>
- <MenuItem x:Name="Delete" Header="删除图章" Click="Delete_Click"/>
- <MenuItem x:Name="DeleteAll" Header="删除全部图章" Click="DeleteAll_Click"/>
- <MenuItem Header="导出图章">
- <MenuItem x:Name="SavePNG" Header="PNG" Tag="PNG" Click="Save_Click"/>
- <MenuItem x:Name="SavePDF" Header="PDF" Tag="PDF" Click="Save_Click"/>
- </MenuItem>
- <MenuItem Header="编辑文字图章" Click="Editor_Click"/>
- </ContextMenu>
- </Grid.ContextMenu>
- <Image Source="{Binding SourcePath}"/>
- </Grid>
- </HierarchicalDataTemplate>
- </ListBox.ItemTemplate>
- <ListBox.ItemContainerStyle>
- <Style TargetType="ListBoxItem">
- <Setter Property="Height" Value="64"/>
- <Setter Property="Padding" Value="12 8 12 8"/>
- <Setter Property="HorizontalContentAlignment" Value="Center"/>
- <EventSetter Event="PreviewMouseLeftButtonDown" Handler="ListBoxItem_PreviewMouseLeftButtonDown"/>
- </Style>
- </ListBox.ItemContainerStyle>
- </ListBox>
- </TabItem>
- </TabControl>
- </Grid>
- </UserControl>
|