|
@@ -4,6 +4,10 @@
|
|
|
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:cus="clr-namespace:PDF_Office.CustomControl" xmlns:annotpanel="clr-namespace:PDF_Office.ViewModels.PropertyPanel.AnnotPanel" xmlns:dataconvert="clr-namespace:PDF_Office.DataConvert" xmlns:i="http://schemas.microsoft.com/xaml/behaviors" d:DataContext="{d:DesignInstance Type=annotpanel:SignatureCreateDialogViewModel}"
|
|
|
+ xmlns:prism="http://prismlibrary.com/"
|
|
|
+ prism:Dialog.WindowStyle="{StaticResource DialogWindowStyle}"
|
|
|
+ Width="468"
|
|
|
+ Height="392"
|
|
|
mc:Ignorable="d" >
|
|
|
<UserControl.Resources>
|
|
|
|
|
@@ -37,6 +41,7 @@
|
|
|
<cus:DialogContent Header="新建签名">
|
|
|
<cus:DialogContent.Content>
|
|
|
<TabControl
|
|
|
+ BorderThickness="0"
|
|
|
Style="{StaticResource FormTabControl }"
|
|
|
SelectedIndex="{Binding TabItemIndex,Mode=TwoWay}">
|
|
|
<TabItem Header="Input">
|
|
@@ -45,18 +50,29 @@
|
|
|
<RowDefinition Height="*"/>
|
|
|
<RowDefinition Height="32"/>
|
|
|
</Grid.RowDefinitions>
|
|
|
- <cus:TextBoxEx PlaceholderText="Input" Text="{Binding InputText,Mode=TwoWay}" Foreground ="{Binding RadioButtonIndex,Converter={StaticResource IntToColorBrush}}" />
|
|
|
- <ComboBox Grid.Row="1"
|
|
|
+ <Grid.ColumnDefinitions>
|
|
|
+ <ColumnDefinition Width="16"/>
|
|
|
+ <ColumnDefinition Width="*"/>
|
|
|
+ <ColumnDefinition Width="16"/>
|
|
|
+ </Grid.ColumnDefinitions>
|
|
|
+ <cus:TextBoxEx
|
|
|
+ FontFamily="{Binding ElementName=TextComBox,Path=SelectedValue, TargetNullValue=Segoe UI}"
|
|
|
+ Background="{StaticResource color.sys.layout.mg}" Grid.Column="1"
|
|
|
+ PlaceholderText="Input" Height="182" FontSize="20"
|
|
|
+ HorizontalContentAlignment="Center" VerticalContentAlignment="Center"
|
|
|
+ ShowClose="False" Text="{Binding InputText,Mode=TwoWay}"
|
|
|
+ Foreground ="{Binding RadioButtonIndex,Converter={StaticResource IntToColorBrush}}" />
|
|
|
+ <ComboBox Grid.Row="1" Grid.Column="1" x:Name="TextComBox"
|
|
|
Width="200"
|
|
|
HorizontalAlignment="Left"
|
|
|
VerticalContentAlignment="Center"
|
|
|
ItemsSource="{Binding FontNameList}"
|
|
|
SelectedIndex="{Binding FontNameIndex,Mode=TwoWay}"/>
|
|
|
- <StackPanel Grid.Row="1" HorizontalAlignment="Right" VerticalAlignment="Center" Orientation="Horizontal">
|
|
|
- <cus:PathRadioButton Tag="1" Checked="TextRadioButton_Checked" MouseOverBackground="#EDEEF0" MouseDownBackground="#CED0D4" MouseDownBackgroundOpacity="0.6">
|
|
|
+ <StackPanel Grid.Row="1" Grid.Column="1" HorizontalAlignment="Right" VerticalAlignment="Center" Orientation="Horizontal">
|
|
|
+ <cus:PathRadioButton CornerRadius="4" Tag="1" Checked="TextRadioButton_Checked" MouseOverBackground="#EDEEF0" MouseDownBackground="#CED0D4" MouseDownBackgroundOpacity="0.6">
|
|
|
<cus:PathRadioButton.Content>
|
|
|
<Grid Width="32" Height="32">
|
|
|
- <Ellipse Width="11" Height="11" Fill="Black"/>
|
|
|
+ <Ellipse Width="20" Height="20" Fill="#252629"/>
|
|
|
</Grid>
|
|
|
</cus:PathRadioButton.Content>
|
|
|
<i:Interaction.Triggers>
|
|
@@ -73,10 +89,10 @@
|
|
|
</MultiBinding>
|
|
|
</RadioButton.IsChecked>
|
|
|
</cus:PathRadioButton>
|
|
|
- <cus:PathRadioButton Tag="2" Checked="TextRadioButton_Checked" MouseOverBackground="#EDEEF0" MouseDownBackground="#CED0D4" MouseDownBackgroundOpacity="0.6">
|
|
|
+ <cus:PathRadioButton Tag="2" CornerRadius="4" Checked="TextRadioButton_Checked" MouseOverBackground="#EDEEF0" MouseDownBackground="#CED0D4" MouseDownBackgroundOpacity="0.6">
|
|
|
<cus:PathRadioButton.Content>
|
|
|
<Grid Width="32" Height="32">
|
|
|
- <Ellipse Width="11" Height="11" Fill="#F66B7C"/>
|
|
|
+ <Ellipse Width="20" Height="20" Fill="#F3465B"/>
|
|
|
</Grid>
|
|
|
</cus:PathRadioButton.Content>
|
|
|
<i:Interaction.Triggers>
|
|
@@ -93,10 +109,10 @@
|
|
|
</MultiBinding>
|
|
|
</RadioButton.IsChecked>
|
|
|
</cus:PathRadioButton>
|
|
|
- <cus:PathRadioButton Tag="3" Checked="TextRadioButton_Checked" MouseOverBackground="#EDEEF0" MouseDownBackground="#CED0D4" MouseDownBackgroundOpacity="0.6">
|
|
|
+ <cus:PathRadioButton Tag="3" CornerRadius="4" Checked="TextRadioButton_Checked" MouseOverBackground="#EDEEF0" MouseDownBackground="#CED0D4" MouseDownBackgroundOpacity="0.6">
|
|
|
<cus:PathRadioButton.Content>
|
|
|
<Grid Width="32" Height="32">
|
|
|
- <Ellipse Width="11" Height="11" Fill="#48DDAD"/>
|
|
|
+ <Ellipse Width="20" Height="20" Fill="#273C62"/>
|
|
|
</Grid>
|
|
|
</cus:PathRadioButton.Content>
|
|
|
<i:Interaction.Triggers>
|
|
@@ -113,10 +129,10 @@
|
|
|
</MultiBinding>
|
|
|
</RadioButton.IsChecked>
|
|
|
</cus:PathRadioButton>
|
|
|
- <cus:PathRadioButton Tag="4" Checked="TextRadioButton_Checked" MouseOverBackground="#EDEEF0" MouseDownBackground="#CED0D4" MouseDownBackgroundOpacity="0.6">
|
|
|
+ <cus:PathRadioButton Tag="4" CornerRadius="4" Checked="TextRadioButton_Checked" MouseOverBackground="#EDEEF0" MouseDownBackground="#CED0D4" MouseDownBackgroundOpacity="0.6">
|
|
|
<cus:PathRadioButton.Content>
|
|
|
<Grid Width="32" Height="32">
|
|
|
- <Ellipse Width="11" Height="11" Fill="#458DF6"/>
|
|
|
+ <Ellipse Width="20" Height="20" Fill="#94989C"/>
|
|
|
</Grid>
|
|
|
</cus:PathRadioButton.Content>
|
|
|
<i:Interaction.Triggers>
|
|
@@ -142,23 +158,33 @@
|
|
|
<RowDefinition Height="*"/>
|
|
|
<RowDefinition Height="32"/>
|
|
|
</Grid.RowDefinitions>
|
|
|
- <InkCanvas x:Name="inkCanvas" Width="240" Height="240" DefaultDrawingAttributes="{Binding DrawingAttributeObject}" Strokes="{Binding StrokesObject}"/>
|
|
|
|
|
|
- <Grid Opacity="0.7" x:Name="PlanGrid" IsHitTestVisible="False" Background="#F3F3F3" Visibility="{Binding StrokesObject.Count,Converter={StaticResource ListCountToVisible}}">
|
|
|
- <TextBlock Text="此处绘制签名" VerticalAlignment="Center" HorizontalAlignment="Center"/>
|
|
|
- </Grid>
|
|
|
- <Button Style="{StaticResource btn.sec}" Width="50" Height="50" HorizontalAlignment="Right" VerticalAlignment="Bottom" Content="Clear" Command="{Binding ClearInkCanvasCommnad}" Visibility="{Binding ElementName=PlanGrid,Path=Visibility}"/>
|
|
|
- <ComboBox Grid.Row="1"
|
|
|
+ <Grid.ColumnDefinitions>
|
|
|
+ <ColumnDefinition Width="16"/>
|
|
|
+ <ColumnDefinition Width="*"/>
|
|
|
+ <ColumnDefinition Width="16"/>
|
|
|
+ </Grid.ColumnDefinitions>
|
|
|
+ <Border Grid.Column="1" Height="182" BorderThickness="1" CornerRadius="4" BorderBrush="{StaticResource color.field.border.norm}">
|
|
|
+ <Grid>
|
|
|
+ <InkCanvas x:Name="inkCanvas" DefaultDrawingAttributes="{Binding DrawingAttributeObject}" Strokes="{Binding StrokesObject}"/>
|
|
|
+
|
|
|
+ <Grid Opacity="0.7" x:Name="PlanGrid" IsHitTestVisible="False" Background="#F3F3F3" Visibility="{Binding StrokesObject.Count,Converter={StaticResource ListCountToVisible}}">
|
|
|
+ <TextBlock Text="此处绘制签名" VerticalAlignment="Center" HorizontalAlignment="Center"/>
|
|
|
+ </Grid>
|
|
|
+ <Button Style="{StaticResource btn.sec}" Margin="0,0,8,8" Width="43" Height="24" HorizontalAlignment="Right" VerticalAlignment="Bottom" Content="Clear" Command="{Binding ClearInkCanvasCommnad}" Visibility="{Binding ElementName=PlanGrid,Path=Visibility,Converter={StaticResource UnVisivleConvert}}"/>
|
|
|
+ </Grid>
|
|
|
+ </Border>
|
|
|
+ <ComboBox Grid.Row="1" Grid.Column="1"
|
|
|
Width="80"
|
|
|
HorizontalAlignment="Left"
|
|
|
VerticalContentAlignment="Center"
|
|
|
ItemsSource="{Binding ThicknessList}"
|
|
|
SelectedIndex="{Binding ThicknessListIndex,Mode=TwoWay}"/>
|
|
|
- <StackPanel Grid.Row="1" HorizontalAlignment="Right" VerticalAlignment="Center" Orientation="Horizontal" >
|
|
|
+ <StackPanel Grid.Row="1" Grid.Column="1" HorizontalAlignment="Right" VerticalAlignment="Center" Orientation="Horizontal" >
|
|
|
<cus:PathRadioButton Tag="1" Checked="ImageRadioButton_Checked" MouseOverBackground="#EDEEF0" MouseDownBackground="#CED0D4" MouseDownBackgroundOpacity="0.6">
|
|
|
<cus:PathRadioButton.Content>
|
|
|
<Grid Width="32" Height="32">
|
|
|
- <Ellipse Width="11" Height="11" Fill="Black"/>
|
|
|
+ <Ellipse Width="20" Height="20" Fill="#252629"/>
|
|
|
</Grid>
|
|
|
</cus:PathRadioButton.Content>
|
|
|
<i:Interaction.Triggers>
|
|
@@ -178,7 +204,7 @@
|
|
|
<cus:PathRadioButton Tag="2" Checked="ImageRadioButton_Checked" MouseOverBackground="#EDEEF0" MouseDownBackground="#CED0D4" MouseDownBackgroundOpacity="0.6">
|
|
|
<cus:PathRadioButton.Content>
|
|
|
<Grid Width="32" Height="32">
|
|
|
- <Ellipse Width="11" Height="11" Fill="#F66B7C"/>
|
|
|
+ <Ellipse Width="20" Height="20" Fill="#FC1F1F"/>
|
|
|
</Grid>
|
|
|
</cus:PathRadioButton.Content>
|
|
|
<i:Interaction.Triggers>
|
|
@@ -198,7 +224,7 @@
|
|
|
<cus:PathRadioButton Tag="3" Checked="ImageRadioButton_Checked" MouseOverBackground="#EDEEF0" MouseDownBackground="#CED0D4" MouseDownBackgroundOpacity="0.6">
|
|
|
<cus:PathRadioButton.Content>
|
|
|
<Grid Width="32" Height="32">
|
|
|
- <Ellipse Width="11" Height="11" Fill="#48DDAD"/>
|
|
|
+ <Ellipse Width="20" Height="20" Fill="#273C62"/>
|
|
|
</Grid>
|
|
|
</cus:PathRadioButton.Content>
|
|
|
<i:Interaction.Triggers>
|
|
@@ -218,7 +244,7 @@
|
|
|
<cus:PathRadioButton Tag="4" Checked="ImageRadioButton_Checked" MouseOverBackground="#EDEEF0" MouseDownBackground="#CED0D4" MouseDownBackgroundOpacity="0.6">
|
|
|
<cus:PathRadioButton.Content>
|
|
|
<Grid Width="32" Height="32">
|
|
|
- <Ellipse Width="11" Height="11" Fill="#458DF6"/>
|
|
|
+ <Ellipse Width="20" Height="20" Fill="#94989C"/>
|
|
|
</Grid>
|
|
|
</cus:PathRadioButton.Content>
|
|
|
<i:Interaction.Triggers>
|
|
@@ -242,35 +268,53 @@
|
|
|
<Grid>
|
|
|
<Grid.RowDefinitions>
|
|
|
<RowDefinition Height="*"/>
|
|
|
- <RowDefinition Height="20"/>
|
|
|
+ <RowDefinition Height="32"/>
|
|
|
</Grid.RowDefinitions>
|
|
|
- <Button x:Name="BtnAdd" Width="50" Height="50" Content="添加图片" Command="{Binding OpenImageCommnad}" Visibility="{Binding ShowImageButton}"/>
|
|
|
- <Grid Visibility="{Binding ElementName=BtnAdd,Path=Visibility,Converter={StaticResource UnVisivleConvert}}">
|
|
|
- <Grid.RowDefinitions>
|
|
|
- <RowDefinition Height="24"/>
|
|
|
- <RowDefinition Height="*"/>
|
|
|
- </Grid.RowDefinitions>
|
|
|
- <Image Grid.RowSpan="2" Width="200" Height="200" Source="{Binding ImagePreviewSource}" />
|
|
|
- <Button Grid.Row="1" Width="50" Height="50" HorizontalAlignment="Left" VerticalAlignment="Bottom" Content="清除" Command="{Binding ClearImageCommnad}"/>
|
|
|
- <Button Grid.Row="1" Width="50" Height="50" HorizontalAlignment="Right" VerticalAlignment="Bottom" Content="重新选择" Command="{Binding OpenImageCommnad}"/>
|
|
|
- </Grid>
|
|
|
- <StackPanel Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Center">
|
|
|
- <CheckBox Width="20" Height="20" IsChecked="{Binding IsRemoveBackground}"/>
|
|
|
- <cus:ImageButton Margin="8,0,0,0"
|
|
|
+
|
|
|
+ <Grid.ColumnDefinitions>
|
|
|
+ <ColumnDefinition Width="16"/>
|
|
|
+ <ColumnDefinition Width="*"/>
|
|
|
+ <ColumnDefinition Width="16"/>
|
|
|
+ </Grid.ColumnDefinitions>
|
|
|
+ <Border Grid.Column="1" Height="182" BorderThickness="1" CornerRadius="4" BorderBrush="{StaticResource color.field.border.norm}">
|
|
|
+ <Grid>
|
|
|
+ <StackPanel x:Name="AddStackPanel" HorizontalAlignment="Center" VerticalAlignment="Center" Visibility="{Binding ShowImageButton}">
|
|
|
+ <cus:ImageButton
|
|
|
+ Height="128" Width="128" IconHeight="128" IconWidth="128"
|
|
|
+ Icon="pack://application:,,,/PDF Office;component/Resources/Dialog/AddImage.png"
|
|
|
+ IconPress="pack://application:,,,/PDF Office;component/Resources/Dialog/AddImageSuspend.png"
|
|
|
+ IconMouseOver="pack://application:,,,/PDF Office;component/Resources/Dialog/AddImageSuspend.png"
|
|
|
+ Command="{Binding OpenImageCommnad}"/>
|
|
|
+ <TextBlock Text="Select image file" FontSize="14" FontFamily="Segoe UI" HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
|
|
+ </StackPanel>
|
|
|
+ <Grid Visibility="{Binding ElementName=AddStackPanel,Path=Visibility,Converter={StaticResource UnVisivleConvert}}">
|
|
|
+ <Grid.RowDefinitions>
|
|
|
+ <RowDefinition Height="24"/>
|
|
|
+ <RowDefinition Height="*"/>
|
|
|
+ </Grid.RowDefinitions>
|
|
|
+ <Image Grid.RowSpan="2" Width="200" Height="200" Source="{Binding ImagePreviewSource}" />
|
|
|
+ <Button Style="{StaticResource btn.sec}" Grid.Row="1" Width="60" Height="24" Margin="0,0,8,8" HorizontalAlignment="Right" VerticalAlignment="Bottom" Content="重新选择" Command="{Binding OpenImageCommnad}"/>
|
|
|
+ </Grid>
|
|
|
+ </Grid>
|
|
|
+ </Border>
|
|
|
+ <StackPanel Grid.Column="1" Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Center">
|
|
|
+ <CheckBox Width="20" Height="20" IsChecked="{Binding IsRemoveBackground}"/>
|
|
|
+ <TextBlock Text="Clear background" FontSize="14" FontFamily="Segoe UI" HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
|
|
+ <cus:ImageButton Margin="8,0,0,0"
|
|
|
Height="16" Width="16" IconHeight="16" IconWidth="16"
|
|
|
Icon="pack://application:,,,/PDF Office;component/Resources/Dialog/help.png"
|
|
|
IconPress="pack://application:,,,/PDF Office;component/Resources/Dialog/help.png"
|
|
|
IconMouseOver="pack://application:,,,/PDF Office;component/Resources/Dialog/help.png">
|
|
|
- <cus:ImageButton.ToolTip >
|
|
|
+ <cus:ImageButton.ToolTip >
|
|
|
<ToolTip Style ="{StaticResource TriangleToolTipStyle}" Placement="Bottom" Content="Remove white background from images" >
|
|
|
- <ToolTip.HorizontalOffset>
|
|
|
- <MultiBinding Converter="{StaticResource CenterToolTipConverter}">
|
|
|
- <Binding RelativeSource="{RelativeSource Self}" Path="PlacementTarget.ActualWidth"/>
|
|
|
- <Binding RelativeSource="{RelativeSource Self}" Path="ActualWidth"/>
|
|
|
- </MultiBinding>
|
|
|
- </ToolTip.HorizontalOffset>
|
|
|
- </ToolTip>
|
|
|
- </cus:ImageButton.ToolTip>
|
|
|
+ <ToolTip.HorizontalOffset>
|
|
|
+ <MultiBinding Converter="{StaticResource CenterToolTipConverter}">
|
|
|
+ <Binding RelativeSource="{RelativeSource Self}" Path="PlacementTarget.ActualWidth"/>
|
|
|
+ <Binding RelativeSource="{RelativeSource Self}" Path="ActualWidth"/>
|
|
|
+ </MultiBinding>
|
|
|
+ </ToolTip.HorizontalOffset>
|
|
|
+ </ToolTip>
|
|
|
+ </cus:ImageButton.ToolTip>
|
|
|
</cus:ImageButton>
|
|
|
</StackPanel>
|
|
|
</Grid>
|
|
@@ -279,30 +323,25 @@
|
|
|
</cus:DialogContent.Content>
|
|
|
|
|
|
<cus:DialogContent.BottmBar>
|
|
|
- <Grid>
|
|
|
- <Grid.ColumnDefinitions>
|
|
|
- <ColumnDefinition Width="50*" />
|
|
|
- <ColumnDefinition Width="50*" />
|
|
|
- </Grid.ColumnDefinitions>
|
|
|
+ <StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
|
|
|
<Button
|
|
|
Style="{StaticResource Btn.cta}"
|
|
|
Grid.Column="0"
|
|
|
- Width="150"
|
|
|
+ Width="80"
|
|
|
Height="32"
|
|
|
- Margin="25,0,0,0"
|
|
|
HorizontalAlignment="Right"
|
|
|
Command="{Binding CreateCommnad}"
|
|
|
Content="确定" />
|
|
|
<Button
|
|
|
Style="{StaticResource btn.sec}"
|
|
|
- Grid.Column="1"
|
|
|
- Width="150"
|
|
|
+ Grid.Column="2"
|
|
|
+ Width="80"
|
|
|
Height="32"
|
|
|
- Margin="0,0,25,0"
|
|
|
- HorizontalAlignment="Right"
|
|
|
+ Margin="16,0,16,0"
|
|
|
+ HorizontalAlignment="Left"
|
|
|
Command="{Binding CancelCommand}"
|
|
|
Content="取消" />
|
|
|
- </Grid>
|
|
|
+ </StackPanel>
|
|
|
</cus:DialogContent.BottmBar>
|
|
|
</cus:DialogContent>
|
|
|
</UserControl>
|