123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579 |
- <UserControl
- x:Class="PDF_Master.Views.PropertyPanel.AnnotPanel.SignatureCreateDialog"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:annotpanel="clr-namespace:PDF_Master.ViewModels.PropertyPanel.AnnotPanel"
- xmlns:cus="clr-namespace:PDF_Master.CustomControl"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:dataconvert="clr-namespace:PDF_Master.DataConvert"
- xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
- xmlns:local="clr-namespace:PDF_Master.Views.PropertyPanel.AnnotPanel"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:prism="http://prismlibrary.com/"
- Width="468"
- Height="392"
- d:DataContext="{d:DesignInstance Type=annotpanel:SignatureCreateDialogViewModel}"
- prism:Dialog.WindowStyle="{StaticResource DialogWindowStyle}"
- Loaded="UserControl_Loaded"
- mc:Ignorable="d">
- <UserControl.Resources>
- <Style TargetType="{x:Type TabItem}">
- <Setter Property="Width" Value="74.67 " />
- <Setter Property="Height" Value="28" />
- <Setter Property="BorderThickness" Value="0" />
- <Setter Property="Template" Value="{DynamicResource Segmented}" />
- </Style>
- <dataconvert:UnVisivleConvert x:Key="UnVisivleConvert" />
- <dataconvert:IntAndTagToBoolMultiBinding x:Key="IntAndTagToBoolMultiBinding" />
- <dataconvert:ListCountAndBoolToVisible x:Key="ListCountAndBoolToVisible" />
- <dataconvert:IntToColorBrush x:Key="IntToColorBrush" />
- <dataconvert:ListCountToVisible x:Key="ListCountToVisible" />
- <dataconvert:CenterToolTipConverter x:Key="CenterToolTipConverter" />
- <dataconvert:SignatureButtonConvert x:Key="SignatureButtonConvert" />
- <Style x:Key="TriangleToolTipStyle" TargetType="ToolTip">
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate>
- <StackPanel>
- <Path
- Margin="0,0,10,0"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Data="M 6 0 L 0 6 L 12 6 Z"
- Fill="#E6333333" />
- <Border
- HorizontalAlignment="Stretch"
- VerticalAlignment="Stretch"
- Background="#E6333333"
- CornerRadius="8">
- <TextBlock
- Margin="6"
- Foreground="White"
- LineHeight="20"
- Text="{TemplateBinding ContentControl.Content}" />
- </Border>
- </StackPanel>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- </UserControl.Resources>
- <cus:DialogContent x:Name="DialogHeader">
- <cus:DialogContent.Content>
- <TabControl
- BorderThickness="0"
- SelectedIndex="{Binding TabItemIndex, Mode=TwoWay}"
- Style="{StaticResource FormTabControl}">
- <TabItem x:Name="InputItem">
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="*" />
- <RowDefinition Height="32" />
- </Grid.RowDefinitions>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="16" />
- <ColumnDefinition Width="*" />
- <ColumnDefinition Width="16" />
- </Grid.ColumnDefinitions>
- <cus:TextBoxEx
- x:Name="InPutTextBox"
- Grid.Column="1"
- Height="182"
- HorizontalContentAlignment="Center"
- VerticalContentAlignment="Center"
- Background="{StaticResource color.sys.layout.mg}"
- FontFamily="{Binding ElementName=TextComBox, Path=SelectedValue, TargetNullValue=Segoe UI}"
- FontSize="20"
- Foreground="{Binding RadioButtonIndex, Converter={StaticResource IntToColorBrush}}"
- PlaceholderText="Input"
- ShowClose="False"
- Text="{Binding InputText, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
- TextChanged="TextBoxEx_TextChanged" />
- <Button
- x:Name="BtnTextClear"
- Grid.Column="1"
- Width="43"
- Height="24"
- Margin="0,0,8,24"
- HorizontalAlignment="Right"
- VerticalAlignment="Bottom"
- Command="{Binding ClearTextCommnad}"
- Style="{StaticResource btn.sec}"
- Visibility="{Binding ShowTextButton}" />
- <ComboBox
- x:Name="TextComBox"
- Grid.Row="1"
- Grid.Column="1"
- Width="200"
- HorizontalAlignment="Left"
- VerticalContentAlignment="Center"
- ItemsSource="{Binding FontNameList}"
- SelectedIndex="{Binding FontNameIndex, Mode=TwoWay}" />
- <StackPanel
- Grid.Row="1"
- Grid.Column="1"
- HorizontalAlignment="Right"
- VerticalAlignment="Center"
- Orientation="Horizontal">
- <cus:PathRadioButton
- Checked="TextRadioButton_Checked"
- CornerRadius="4"
- MouseDownBackground="#CED0D4"
- MouseDownBackgroundOpacity="0.6"
- MouseOverBackground="#EDEEF0"
- Tag="1">
- <cus:PathRadioButton.Content>
- <Grid Width="32" Height="32">
- <Ellipse
- Width="20"
- Height="20"
- Fill="#252629" />
- </Grid>
- </cus:PathRadioButton.Content>
- <i:Interaction.Triggers>
- <i:EventTrigger EventName="Checked">
- <i:InvokeCommandAction
- Command="{Binding CheckedCommnad}"
- CommandParameter="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=RadioButton}, Path=Tag}"
- PassEventArgsToCommand="True" />
- </i:EventTrigger>
- </i:Interaction.Triggers>
- <RadioButton.IsChecked>
- <MultiBinding Converter="{StaticResource IntAndTagToBoolMultiBinding}" Mode="OneWay">
- <Binding Source="1" />
- <Binding Path="RadioButtonIndex" />
- </MultiBinding>
- </RadioButton.IsChecked>
- </cus:PathRadioButton>
- <cus:PathRadioButton
- Margin="11,0"
- Checked="TextRadioButton_Checked"
- CornerRadius="4"
- MouseDownBackground="#CED0D4"
- MouseDownBackgroundOpacity="0.6"
- MouseOverBackground="#EDEEF0"
- Tag="2">
- <cus:PathRadioButton.Content>
- <Grid Width="32" Height="32">
- <Ellipse
- Width="20"
- Height="20"
- Fill="#F3465B" />
- </Grid>
- </cus:PathRadioButton.Content>
- <i:Interaction.Triggers>
- <i:EventTrigger EventName="Checked">
- <i:InvokeCommandAction
- Command="{Binding CheckedCommnad}"
- CommandParameter="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=RadioButton}, Path=Tag}"
- PassEventArgsToCommand="True" />
- </i:EventTrigger>
- </i:Interaction.Triggers>
- <RadioButton.IsChecked>
- <MultiBinding Converter="{StaticResource IntAndTagToBoolMultiBinding}" Mode="OneWay">
- <Binding Source="2" />
- <Binding Path="RadioButtonIndex" />
- </MultiBinding>
- </RadioButton.IsChecked>
- </cus:PathRadioButton>
- <cus:PathRadioButton
- Checked="TextRadioButton_Checked"
- CornerRadius="4"
- MouseDownBackground="#CED0D4"
- MouseDownBackgroundOpacity="0.6"
- MouseOverBackground="#EDEEF0"
- Tag="3">
- <cus:PathRadioButton.Content>
- <Grid Width="32" Height="32">
- <Ellipse
- Width="20"
- Height="20"
- Fill="#273C62" />
- </Grid>
- </cus:PathRadioButton.Content>
- <i:Interaction.Triggers>
- <i:EventTrigger EventName="Checked">
- <i:InvokeCommandAction
- Command="{Binding CheckedCommnad}"
- CommandParameter="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=RadioButton}, Path=Tag}"
- PassEventArgsToCommand="True" />
- </i:EventTrigger>
- </i:Interaction.Triggers>
- <RadioButton.IsChecked>
- <MultiBinding Converter="{StaticResource IntAndTagToBoolMultiBinding}" Mode="OneWay">
- <Binding Source="3" />
- <Binding Path="RadioButtonIndex" />
- </MultiBinding>
- </RadioButton.IsChecked>
- </cus:PathRadioButton>
- <cus:PathRadioButton
- Margin="11,0,0,0"
- Checked="TextRadioButton_Checked"
- CornerRadius="4"
- MouseDownBackground="#CED0D4"
- MouseDownBackgroundOpacity="0.6"
- MouseOverBackground="#EDEEF0"
- Tag="4">
- <cus:PathRadioButton.Content>
- <Grid Width="32" Height="32">
- <Ellipse
- Width="20"
- Height="20"
- Fill="#94989C" />
- </Grid>
- </cus:PathRadioButton.Content>
- <i:Interaction.Triggers>
- <i:EventTrigger EventName="Checked">
- <i:InvokeCommandAction
- Command="{Binding CheckedCommnad}"
- CommandParameter="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=RadioButton}, Path=Tag}"
- PassEventArgsToCommand="True" />
- </i:EventTrigger>
- </i:Interaction.Triggers>
- <RadioButton.IsChecked>
- <MultiBinding Converter="{StaticResource IntAndTagToBoolMultiBinding}" Mode="OneWay">
- <Binding Source="4" />
- <Binding Path="RadioButtonIndex" />
- </MultiBinding>
- </RadioButton.IsChecked>
- </cus:PathRadioButton>
- </StackPanel>
- </Grid>
- </TabItem>
- <TabItem x:Name="DrawItem">
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="*" />
- <RowDefinition Height="32" />
- </Grid.RowDefinitions>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="16" />
- <ColumnDefinition Width="*" />
- <ColumnDefinition Width="16" />
- </Grid.ColumnDefinitions>
- <Border
- Grid.Column="1"
- Height="182"
- BorderBrush="{StaticResource color.field.border.norm}"
- BorderThickness="1"
- CornerRadius="4">
- <Grid>
- <InkCanvas
- x:Name="inkCanvas"
- Background="{StaticResource color.sys.layout.mg}"
- DefaultDrawingAttributes="{Binding DrawingAttributeObject}"
- PreviewMouseLeftButtonDown="inkCanvas_MouseLeftButtonDown"
- PreviewMouseLeftButtonUp="inkCanvas_MouseLeftButtonUp"
- Strokes="{Binding StrokesObject}" />
- <Grid
- x:Name="PlanGrid"
- Background="{StaticResource color.sys.layout.mg}"
- IsHitTestVisible="False"
- Opacity="0.7">
- <Grid.Visibility>
- <MultiBinding Converter="{StaticResource ListCountAndBoolToVisible}" Mode="OneWay">
- <Binding Path="StrokesObject.Count" />
- <Binding Path="IsMouseDown" />
- </MultiBinding>
- </Grid.Visibility>
- <TextBlock
- x:Name="DrawHint"
- HorizontalAlignment="Center"
- VerticalAlignment="Center" />
- </Grid>
- <Button
- x:Name="BtnDrawClear"
- Width="43"
- Height="24"
- Margin="0,0,8,8"
- HorizontalAlignment="Right"
- VerticalAlignment="Bottom"
- Command="{Binding ClearInkCanvasCommnad}"
- Style="{StaticResource btn.sec}"
- 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"
- Grid.Column="1"
- HorizontalAlignment="Right"
- VerticalAlignment="Center"
- Orientation="Horizontal">
- <cus:PathRadioButton
- Checked="ImageRadioButton_Checked"
- CornerRadius="4"
- MouseDownBackground="#CED0D4"
- MouseDownBackgroundOpacity="0.6"
- MouseOverBackground="#EDEEF0"
- Tag="1">
- <cus:PathRadioButton.Content>
- <Grid Width="32" Height="32">
- <Ellipse
- Width="20"
- Height="20"
- Fill="#252629" />
- </Grid>
- </cus:PathRadioButton.Content>
- <i:Interaction.Triggers>
- <i:EventTrigger EventName="Checked">
- <i:InvokeCommandAction
- Command="{Binding CheckedCommnad}"
- CommandParameter="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=RadioButton}, Path=Tag}"
- PassEventArgsToCommand="True" />
- </i:EventTrigger>
- </i:Interaction.Triggers>
- <RadioButton.IsChecked>
- <MultiBinding Converter="{StaticResource IntAndTagToBoolMultiBinding}" Mode="OneWay">
- <Binding Source="1" />
- <Binding Path="ImageRadioButtonIndex" />
- </MultiBinding>
- </RadioButton.IsChecked>
- </cus:PathRadioButton>
- <cus:PathRadioButton
- Margin="11,0"
- CornerRadius="4"
- Checked="ImageRadioButton_Checked"
- MouseDownBackground="#CED0D4"
- MouseDownBackgroundOpacity="0.6"
- MouseOverBackground="#EDEEF0"
- Tag="2">
- <cus:PathRadioButton.Content>
- <Grid Width="32" Height="32">
- <Ellipse
- Width="20"
- Height="20"
- Fill="#FC1F1F" />
- </Grid>
- </cus:PathRadioButton.Content>
- <i:Interaction.Triggers>
- <i:EventTrigger EventName="Checked">
- <i:InvokeCommandAction
- Command="{Binding CheckedCommnad}"
- CommandParameter="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=RadioButton}, Path=Tag}"
- PassEventArgsToCommand="True" />
- </i:EventTrigger>
- </i:Interaction.Triggers>
- <RadioButton.IsChecked>
- <MultiBinding Converter="{StaticResource IntAndTagToBoolMultiBinding}" Mode="OneWay">
- <Binding Source="2" />
- <Binding Path="ImageRadioButtonIndex" />
- </MultiBinding>
- </RadioButton.IsChecked>
- </cus:PathRadioButton>
- <cus:PathRadioButton
- CornerRadius="4"
- Checked="ImageRadioButton_Checked"
- MouseDownBackground="#CED0D4"
- MouseDownBackgroundOpacity="0.6"
- MouseOverBackground="#EDEEF0"
- Tag="3">
- <cus:PathRadioButton.Content>
- <Grid Width="32" Height="32">
- <Ellipse
- Width="20"
- Height="20"
- Fill="#273C62" />
- </Grid>
- </cus:PathRadioButton.Content>
- <i:Interaction.Triggers>
- <i:EventTrigger EventName="Checked">
- <i:InvokeCommandAction
- Command="{Binding CheckedCommnad}"
- CommandParameter="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=RadioButton}, Path=Tag}"
- PassEventArgsToCommand="True" />
- </i:EventTrigger>
- </i:Interaction.Triggers>
- <RadioButton.IsChecked>
- <MultiBinding Converter="{StaticResource IntAndTagToBoolMultiBinding}" Mode="OneWay">
- <Binding Source="3" />
- <Binding Path="ImageRadioButtonIndex" />
- </MultiBinding>
- </RadioButton.IsChecked>
- </cus:PathRadioButton>
- <cus:PathRadioButton
- Margin="11,0,0,0"
- CornerRadius="4"
- Checked="ImageRadioButton_Checked"
- MouseDownBackground="#CED0D4"
- MouseDownBackgroundOpacity="0.6"
- MouseOverBackground="#EDEEF0"
- Tag="4">
- <cus:PathRadioButton.Content>
- <Grid Width="32" Height="32">
- <Ellipse
- Width="20"
- Height="20"
- Fill="#94989C" />
- </Grid>
- </cus:PathRadioButton.Content>
- <i:Interaction.Triggers>
- <i:EventTrigger EventName="Checked">
- <i:InvokeCommandAction
- Command="{Binding CheckedCommnad}"
- CommandParameter="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=RadioButton}, Path=Tag}"
- PassEventArgsToCommand="True" />
- </i:EventTrigger>
- </i:Interaction.Triggers>
- <RadioButton.IsChecked>
- <MultiBinding Converter="{StaticResource IntAndTagToBoolMultiBinding}" Mode="OneWay">
- <Binding Source="4" />
- <Binding Path="ImageRadioButtonIndex" />
- </MultiBinding>
- </RadioButton.IsChecked>
- </cus:PathRadioButton>
- </StackPanel>
- </Grid>
- </TabItem>
- <TabItem x:Name="PictureItem">
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="*" />
- <RowDefinition Height="32" />
- </Grid.RowDefinitions>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="16" />
- <ColumnDefinition Width="*" />
- <ColumnDefinition Width="16" />
- </Grid.ColumnDefinitions>
- <Border
- Grid.Column="1"
- Height="182"
- BorderBrush="{StaticResource color.field.border.norm}"
- BorderThickness="1"
- CornerRadius="4">
- <Grid Background="{StaticResource color.sys.layout.mg}">
- <StackPanel
- x:Name="AddStackPanel"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Visibility="{Binding ShowImageButton}">
- <cus:ImageButton
- Width="128"
- Height="128"
- Command="{Binding OpenImageCommnad}"
- Icon="pack://application:,,,/PDF Master;component/Resources/Dialog/AddImage.png"
- IconHeight="128"
- IconMouseOver="pack://application:,,,/PDF Master;component/Resources/Dialog/AddImageSuspend.png"
- IconPress="pack://application:,,,/PDF Master;component/Resources/Dialog/AddImageSuspend.png"
- IconWidth="128" />
- <TextBlock
- x:Name="ImageHint"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- FontFamily="Segoe UI"
- FontSize="14"
- FontWeight="Regular"
- Foreground="{StaticResource color.sys.text.neutral.lv3}" />
- </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
- x:Name="BtnPictureReselect"
- Grid.Row="1"
- Width="60"
- Height="24"
- Margin="0,0,8,8"
- HorizontalAlignment="Right"
- VerticalAlignment="Bottom"
- Command="{Binding OpenImageCommnad}"
- Style="{StaticResource btn.sec}" />
- </Grid>
- </Grid>
- </Border>
- <StackPanel
- Grid.Row="1"
- Grid.Column="1"
- HorizontalAlignment="Center"
- Orientation="Horizontal">
- <CheckBox
- Width="20"
- Height="20"
- IsChecked="{Binding IsRemoveBackground}" />
- <TextBlock
- x:Name="BtnReBkg"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- FontFamily="Segoe UI"
- FontSize="14" />
- <cus:ImageButton
- Width="16"
- Height="16"
- Margin="8,0,0,0"
- Icon="pack://application:,,,/PDF Master;component/Resources/Dialog/help.png"
- IconHeight="16"
- IconMouseOver="pack://application:,,,/PDF Master;component/Resources/Dialog/helphover.png"
- IconPress="pack://application:,,,/PDF Master;component/Resources/Dialog/help.png"
- IconWidth="16">
- <cus:ImageButton.ToolTip>
- <ToolTip
- x:Name="BtnReBkgHint"
- Placement="Bottom"
- Style="{StaticResource TriangleToolTipStyle}">
- <ToolTip.HorizontalOffset>
- <MultiBinding Converter="{StaticResource CenterToolTipConverter}">
- <Binding Path="PlacementTarget.ActualWidth" RelativeSource="{RelativeSource Self}" />
- <Binding Path="ActualWidth" RelativeSource="{RelativeSource Self}" />
- </MultiBinding>
- </ToolTip.HorizontalOffset>
- </ToolTip>
- </cus:ImageButton.ToolTip>
- </cus:ImageButton>
- </StackPanel>
- </Grid>
- </TabItem>
- </TabControl>
- </cus:DialogContent.Content>
- <cus:DialogContent.BottmBar>
- <StackPanel HorizontalAlignment="Right" Orientation="Horizontal">
- <Button
- x:Name="BtnOK"
- Grid.Column="0"
- Width="80"
- Height="32"
- HorizontalAlignment="Right"
- Command="{Binding CreateCommnad}"
- Style="{StaticResource Btn.cta}">
- <Button.IsEnabled>
- <MultiBinding Converter="{StaticResource SignatureButtonConvert}" Mode="OneWay">
- <Binding Path="TabItemIndex" />
- <Binding Path="InputText" />
- <Binding Path="StrokesObject.Count" />
- <Binding Path="ImagePreviewSource" />
- </MultiBinding>
- </Button.IsEnabled>
- </Button>
- <Button
- x:Name="BtnNo"
- Grid.Column="2"
- Width="80"
- Height="32"
- Margin="16,0,16,0"
- HorizontalAlignment="Left"
- Command="{Binding CancelCommand}"
- Style="{StaticResource btn.sec}" />
- </StackPanel>
- </cus:DialogContent.BottmBar>
- </cus:DialogContent>
- </UserControl>
|