|
@@ -16,6 +16,23 @@
|
|
|
<dataconvert:UnVisivleConvert x:Key="UnVisivleConvert"/>
|
|
|
<dataconvert:IntAndTagToBoolMultiBinding x:Key="IntAndTagToBoolMultiBinding"/>
|
|
|
<dataconvert:IntToColorBrush x:Key="IntToColorBrush"/>
|
|
|
+ <dataconvert:ListCountToVisible x:Key="ListCountToVisible"/>
|
|
|
+ <dataconvert:CenterToolTipConverter x:Key="CenterToolTipConverter"/>
|
|
|
+
|
|
|
+ <Style x:Key="TriangleToolTipStyle" TargetType="ToolTip">
|
|
|
+ <Setter Property="Template">
|
|
|
+ <Setter.Value>
|
|
|
+ <ControlTemplate>
|
|
|
+ <StackPanel>
|
|
|
+ <Path HorizontalAlignment="Center" VerticalAlignment="Center" Data="M 6 0 L 0 6 L 12 6 Z" Fill="#E6333333" Margin="0,0,10,0"/>
|
|
|
+ <Border CornerRadius="8" Background="#E6333333" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
|
|
|
+ <TextBlock Text="{TemplateBinding ContentControl.Content}" Foreground="White" LineHeight="20" Margin="6"/>
|
|
|
+ </Border>
|
|
|
+ </StackPanel>
|
|
|
+ </ControlTemplate>
|
|
|
+ </Setter.Value>
|
|
|
+ </Setter>
|
|
|
+ </Style>
|
|
|
</UserControl.Resources>
|
|
|
<cus:DialogContent Header="新建签名">
|
|
|
<cus:DialogContent.Content>
|
|
@@ -36,7 +53,12 @@
|
|
|
ItemsSource="{Binding FontNameList}"
|
|
|
SelectedIndex="{Binding FontNameIndex,Mode=TwoWay}"/>
|
|
|
<StackPanel Grid.Row="1" HorizontalAlignment="Right" VerticalAlignment="Center" Orientation="Horizontal">
|
|
|
- <RadioButton Tag="1" Checked="TextRadioButton_Checked">
|
|
|
+ <cus:PathRadioButton 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"/>
|
|
|
+ </Grid>
|
|
|
+ </cus:PathRadioButton.Content>
|
|
|
<i:Interaction.Triggers>
|
|
|
<i:EventTrigger EventName="Checked">
|
|
|
<i:InvokeCommandAction Command="{Binding CheckedCommnad}"
|
|
@@ -50,8 +72,13 @@
|
|
|
<Binding Path="RadioButtonIndex"/>
|
|
|
</MultiBinding>
|
|
|
</RadioButton.IsChecked>
|
|
|
- </RadioButton>
|
|
|
- <RadioButton Tag="2" Checked="TextRadioButton_Checked">
|
|
|
+ </cus:PathRadioButton>
|
|
|
+ <cus:PathRadioButton Tag="2" 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"/>
|
|
|
+ </Grid>
|
|
|
+ </cus:PathRadioButton.Content>
|
|
|
<i:Interaction.Triggers>
|
|
|
<i:EventTrigger EventName="Checked">
|
|
|
<i:InvokeCommandAction Command="{Binding CheckedCommnad}"
|
|
@@ -65,8 +92,13 @@
|
|
|
<Binding Path="RadioButtonIndex"/>
|
|
|
</MultiBinding>
|
|
|
</RadioButton.IsChecked>
|
|
|
- </RadioButton>
|
|
|
- <RadioButton Tag="3" Checked="TextRadioButton_Checked">
|
|
|
+ </cus:PathRadioButton>
|
|
|
+ <cus:PathRadioButton Tag="3" 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"/>
|
|
|
+ </Grid>
|
|
|
+ </cus:PathRadioButton.Content>
|
|
|
<i:Interaction.Triggers>
|
|
|
<i:EventTrigger EventName="Checked">
|
|
|
<i:InvokeCommandAction Command="{Binding CheckedCommnad}"
|
|
@@ -80,8 +112,13 @@
|
|
|
<Binding Path="RadioButtonIndex"/>
|
|
|
</MultiBinding>
|
|
|
</RadioButton.IsChecked>
|
|
|
- </RadioButton>
|
|
|
- <RadioButton Tag="4" Checked="TextRadioButton_Checked">
|
|
|
+ </cus:PathRadioButton>
|
|
|
+ <cus:PathRadioButton Tag="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"/>
|
|
|
+ </Grid>
|
|
|
+ </cus:PathRadioButton.Content>
|
|
|
<i:Interaction.Triggers>
|
|
|
<i:EventTrigger EventName="Checked">
|
|
|
<i:InvokeCommandAction Command="{Binding CheckedCommnad}"
|
|
@@ -95,7 +132,7 @@
|
|
|
<Binding Path="RadioButtonIndex"/>
|
|
|
</MultiBinding>
|
|
|
</RadioButton.IsChecked>
|
|
|
- </RadioButton>
|
|
|
+ </cus:PathRadioButton>
|
|
|
</StackPanel>
|
|
|
</Grid>
|
|
|
</TabItem>
|
|
@@ -106,14 +143,24 @@
|
|
|
<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"
|
|
|
Width="80"
|
|
|
HorizontalAlignment="Left"
|
|
|
VerticalContentAlignment="Center"
|
|
|
ItemsSource="{Binding ThicknessList}"
|
|
|
SelectedIndex="{Binding ThicknessListIndex,Mode=TwoWay}"/>
|
|
|
- <StackPanel Grid.Row="1" HorizontalAlignment="Right" VerticalAlignment="Center" Orientation="Horizontal">
|
|
|
- <RadioButton Tag="1" Checked="ImageRadioButton_Checked">
|
|
|
+ <StackPanel Grid.Row="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"/>
|
|
|
+ </Grid>
|
|
|
+ </cus:PathRadioButton.Content>
|
|
|
<i:Interaction.Triggers>
|
|
|
<i:EventTrigger EventName="Checked">
|
|
|
<i:InvokeCommandAction Command="{Binding CheckedCommnad}"
|
|
@@ -127,8 +174,13 @@
|
|
|
<Binding Path="ImageRadioButtonIndex"/>
|
|
|
</MultiBinding>
|
|
|
</RadioButton.IsChecked>
|
|
|
- </RadioButton>
|
|
|
- <RadioButton Tag="2" Checked="ImageRadioButton_Checked">
|
|
|
+ </cus:PathRadioButton>
|
|
|
+ <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"/>
|
|
|
+ </Grid>
|
|
|
+ </cus:PathRadioButton.Content>
|
|
|
<i:Interaction.Triggers>
|
|
|
<i:EventTrigger EventName="Checked">
|
|
|
<i:InvokeCommandAction Command="{Binding CheckedCommnad}"
|
|
@@ -142,8 +194,13 @@
|
|
|
<Binding Path="ImageRadioButtonIndex"/>
|
|
|
</MultiBinding>
|
|
|
</RadioButton.IsChecked>
|
|
|
- </RadioButton>
|
|
|
- <RadioButton Tag="3" Checked="ImageRadioButton_Checked">
|
|
|
+ </cus:PathRadioButton>
|
|
|
+ <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"/>
|
|
|
+ </Grid>
|
|
|
+ </cus:PathRadioButton.Content>
|
|
|
<i:Interaction.Triggers>
|
|
|
<i:EventTrigger EventName="Checked">
|
|
|
<i:InvokeCommandAction Command="{Binding CheckedCommnad}"
|
|
@@ -157,8 +214,13 @@
|
|
|
<Binding Path="ImageRadioButtonIndex"/>
|
|
|
</MultiBinding>
|
|
|
</RadioButton.IsChecked>
|
|
|
- </RadioButton>
|
|
|
- <RadioButton Tag="4" Checked="ImageRadioButton_Checked">
|
|
|
+ </cus:PathRadioButton>
|
|
|
+ <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"/>
|
|
|
+ </Grid>
|
|
|
+ </cus:PathRadioButton.Content>
|
|
|
<i:Interaction.Triggers>
|
|
|
<i:EventTrigger EventName="Checked">
|
|
|
<i:InvokeCommandAction Command="{Binding CheckedCommnad}"
|
|
@@ -172,7 +234,7 @@
|
|
|
<Binding Path="ImageRadioButtonIndex"/>
|
|
|
</MultiBinding>
|
|
|
</RadioButton.IsChecked>
|
|
|
- </RadioButton>
|
|
|
+ </cus:PathRadioButton>
|
|
|
</StackPanel>
|
|
|
</Grid>
|
|
|
</TabItem>
|
|
@@ -191,7 +253,25 @@
|
|
|
<Image Grid.RowSpan="2" Width="200" Height="200" Source="{Binding ImagePreviewSource}" />
|
|
|
<Button Grid.Row="1" Width="50" Height="50" HorizontalAlignment="Right" VerticalAlignment="Bottom" Content="重新选择" Command="{Binding OpenImageCommnad}"/>
|
|
|
</Grid>
|
|
|
- <CheckBox Grid.Row="1" Width="20" Height="20" IsChecked="{Binding IsRemoveBackground}"/>
|
|
|
+ <StackPanel Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Center">
|
|
|
+ <CheckBox Width="20" Height="20" IsChecked="{Binding IsRemoveBackground}"/>
|
|
|
+ <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 >
|
|
|
+ <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>
|
|
|
+ </cus:ImageButton>
|
|
|
+ </StackPanel>
|
|
|
</Grid>
|
|
|
</TabItem>
|
|
|
</TabControl>
|