123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306 |
- <UserControl
- x:Class="PDF_Master.Views.PropertyPanel.AnnotPanel.StickyNoteProperty"
- 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:CompositeControl="clr-namespace:PDF_Master.CustomControl.CompositeControl"
- xmlns:Convert="clr-namespace:PDF_Master.ViewModels.PropertyPanel.AnnotPanel"
- 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:tools="clr-namespace:PDF_Master.Views.Tools"
- d:DataContext="{d:DesignInstance Type=AnnotPanel:StickyNotePropertyViewModel}"
- d:DesignHeight="450"
- d:DesignWidth="260"
- Background="{StaticResource color.sys.layout.mg}"
- Loaded="UserControl_Loaded"
- Unloaded="UserControl_Unloaded"
- mc:Ignorable="d">
- <UserControl.Resources>
- <ResourceDictionary>
- <ResourceDictionary.MergedDictionaries>
- <ResourceDictionary Source="../../../Styles/SliderStyle.xaml" />
- <ResourceDictionary Source="../../../Styles/RadioButtonStyle.xaml" />
- </ResourceDictionary.MergedDictionaries>
- <Convert:AnnotArgsTypeConverter x:Key="AnnotArgsTypeConverter" />
- <dataConvert:InvertBoolToVisibleConvert x:Key="InvertBoolToVisibleConvert" />
- <dataConvert:ColorBrushConvert x:Key="ColorBrushToColorConvert"></dataConvert:ColorBrushConvert>
- <tools:AnnotToolIsCheckedConvert x:Key="AnnotToolIsCheckedConvert" />
- </ResourceDictionary>
- </UserControl.Resources>
- <Grid VerticalAlignment="Stretch">
- <StackPanel Margin="16,0">
- <TextBlock
- Name="AnnotTypeTitle"
- Margin="0,14"
- HorizontalAlignment="Left"
- FontFamily="Segoe UI"
- FontSize="14"
- FontWeight="SemiBold"
- LineHeight="24"
- Text="{Binding AnnotTypeTitle}" />
- <Border
- Height="100"
- Background="White"
- BorderBrush="#DDDDDD"
- BorderThickness="1"
- CornerRadius="2"
- Visibility="{Binding IsMultiSelected, Converter={StaticResource InvertBoolToVisibleConvert}}">
- <Grid HorizontalAlignment="Center" VerticalAlignment="Center">
- <Path
- Data="{Binding ExmpleData}"
- Fill="{Binding SharpColor}"
- Opacity="{Binding Transpent}" />
- </Grid>
- </Border>
- <Grid Margin="0,18,0,0">
- <Grid.RowDefinitions>
- <RowDefinition Height="auto" />
- <RowDefinition />
- </Grid.RowDefinitions>
- <TextBlock
- VerticalAlignment="Center"
- Foreground="{StaticResource color.sys.text.neutral.lv2}"
- Text="Color" />
- <CompositeControl:SlidContent
- x:Name="SlidOpacity"
- HorizontalAlignment="Right"
- Visibility="{Binding IsMultiSelected, Converter={StaticResource InvertBoolToVisibleConvert}}">
- <i:Interaction.Triggers>
- <i:EventTrigger EventName="SelectedValueChanged">
- <i:InvokeCommandAction Command="{Binding SelectedOpacityValueCommand}" CommandParameter="{Binding ElementName=SlidOpacity, Path=Value}" />
- </i:EventTrigger>
- </i:Interaction.Triggers>
- </CompositeControl:SlidContent>
- <CompositeControl:ColorContent
- x:Name="cusColor"
- Grid.Row="1"
- ColorType="Sticky"
- ItemSource="{Binding ColorItems}"
- UIColor="{Binding SharpCurrentColor, Mode=OneWay}">
- <i:Interaction.Triggers>
- <i:EventTrigger EventName="SelectedColorInvoke">
- <i:InvokeCommandAction Command="{Binding SelectedColorChangedCommand}" CommandParameter="{Binding ElementName=cusColor, Path=SelectedColor}" />
- </i:EventTrigger>
- </i:Interaction.Triggers>
- </CompositeControl:ColorContent>
- </Grid>
- <TextBlock
- Margin="0,20,0,10"
- Foreground="{StaticResource color.sys.text.neutral.lv2}"
- Text="Style" />
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="*" />
- <RowDefinition Height="*" />
- </Grid.RowDefinitions>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="*" />
- <ColumnDefinition Width="*" />
- <ColumnDefinition Width="*" />
- <ColumnDefinition Width="*" />
- </Grid.ColumnDefinitions>
- <RadioButton
- x:Name="BtnComment"
- Grid.Row="0"
- Grid.Column="0"
- Width="51"
- Height="32"
- Margin="0,0,8,8"
- HorizontalContentAlignment="Center"
- VerticalContentAlignment="Center"
- Background="Transparent"
- Foreground="#616469"
- GroupName="StrickyNote"
- Style="{StaticResource GreyBgRadioBtnStyle}"
- Tag="Comment"
- IsChecked="{Binding strOtherTag, Converter={StaticResource AnnotToolIsCheckedConvert}, ConverterParameter=Comment}">
- <RadioButton.Content>
- <Path
- VerticalAlignment="Center"
- Data="M1.54167 2.5C0.96637 2.5 0.5 2.96637 0.5 3.54167V15.2083C0.5 15.7836 0.96637 16.25 1.54167 16.25H3.83344V19.131C3.83344 19.5239 4.25193 19.7753 4.59884 19.5908L10.8802 16.25H19.4583C20.0336 16.25 20.5 15.7836 20.5 15.2083V3.54167C20.5 2.96637 20.0336 2.5 19.4583 2.5H1.54167ZM16.75 8.4375H4.25V6.5625H16.75V8.4375ZM4.25 12.1875H11.75V10.3125H4.25V12.1875Z"
- Fill="#616469" />
- </RadioButton.Content>
- <i:Interaction.Triggers>
- <i:EventTrigger EventName="Click">
- <i:InvokeCommandAction Command="{Binding StrickyNoteShapeCommand}" CommandParameter="{Binding ElementName=BtnComment, Path=Tag}" />
- </i:EventTrigger>
- </i:Interaction.Triggers>
- </RadioButton>
- <RadioButton
- x:Name="BtnNote"
- Grid.Row="0"
- Grid.Column="1"
- Width="51"
- Height="32"
- Margin="0,0,8,8"
- HorizontalContentAlignment="Center"
- VerticalContentAlignment="Center"
- Background="Transparent"
- Foreground="#616469"
- GroupName="StrickyNote"
- Style="{StaticResource GreyBgRadioBtnStyle}"
- Tag="Note"
- IsChecked="{Binding strOtherTag, Converter={StaticResource AnnotToolIsCheckedConvert}, ConverterParameter=Note}">
- <RadioButton.Content>
- <Path
- VerticalAlignment="Center"
- Data="M3 1H17V14H12V19H3V1ZM13 19V15H17L13 19ZM15 5V3.5H5V5H15ZM15 8V6.5H5V8H15ZM12 9.5V11H5V9.5H12Z"
- Fill="#616469" />
- </RadioButton.Content>
- <i:Interaction.Triggers>
- <i:EventTrigger EventName="Click">
- <i:InvokeCommandAction Command="{Binding StrickyNoteShapeCommand}" CommandParameter="{Binding ElementName=BtnNote, Path=Tag}" />
- </i:EventTrigger>
- </i:Interaction.Triggers>
- </RadioButton>
- <RadioButton
- x:Name="BtnKey"
- Grid.Row="0"
- Grid.Column="2"
- Width="51"
- Height="32"
- Margin="0,0,8,8"
- HorizontalContentAlignment="Center"
- VerticalContentAlignment="Center"
- Background="Transparent"
- Foreground="#616469"
- GroupName="StrickyNote"
- Style="{StaticResource GreyBgRadioBtnStyle}"
- Tag="Key"
- IsChecked="{Binding strOtherTag, Converter={StaticResource AnnotToolIsCheckedConvert}, ConverterParameter=Key}">
- <RadioButton.Content>
- <Path
- VerticalAlignment="Center"
- Data="M14.9552 12.2029C16.009 10.168 15.6751 7.61085 13.9536 5.907C11.8179 3.7932 8.35526 3.7932 6.21956 5.907C4.08386 8.0208 4.08386 11.4479 6.21956 13.5617C7.85915 15.1845 10.2808 15.5615 12.2837 14.6926L17.8206 20.1727H20.6329L20.6329 15.9974L18.1721 15.6495L17.8206 12.518L14.9552 12.2029ZM10.0868 7.64673C10.6692 8.22322 10.6692 9.1579 10.0868 9.73439C9.50432 10.3109 8.55996 10.3109 7.97749 9.73439C7.39503 9.1579 7.39503 8.22322 7.97749 7.64673C8.55996 7.07024 9.50432 7.07024 10.0868 7.64673Z"
- Fill="#616469" />
- </RadioButton.Content>
- <i:Interaction.Triggers>
- <i:EventTrigger EventName="Click">
- <i:InvokeCommandAction Command="{Binding StrickyNoteShapeCommand}" CommandParameter="{Binding ElementName=BtnKey, Path=Tag}" />
- </i:EventTrigger>
- </i:Interaction.Triggers>
- </RadioButton>
- <RadioButton
- x:Name="BtnHelp"
- Grid.Row="0"
- Grid.Column="3"
- Width="51"
- Height="32"
- Margin="0,0,8,8"
- HorizontalContentAlignment="Center"
- VerticalContentAlignment="Center"
- Background="Transparent"
- Foreground="#616469"
- GroupName="StrickyNote"
- Style="{StaticResource GreyBgRadioBtnStyle}"
- Tag="Help"
- IsChecked="{Binding strOtherTag, Converter={StaticResource AnnotToolIsCheckedConvert}, ConverterParameter=Help}">
- <RadioButton.Content>
- <Path
- VerticalAlignment="Center"
- Data="M12.5 21C17.4706 21 21.5 16.9706 21.5 12C21.5 7.02944 17.4706 3 12.5 3C7.52944 3 3.5 7.02944 3.5 12C3.5 16.9706 7.52944 21 12.5 21ZM13.0439 13.9512V13.5068C13.0439 12.7891 13.29 12.4062 14.1582 11.8936C15.0332 11.3672 15.5869 10.6084 15.5869 9.54199V9.52832C15.5869 8.12695 14.4111 7.06055 12.6885 7.06055C10.7676 7.06055 9.7832 8.23633 9.70801 9.70605V9.71973L10.8701 9.71289L10.8838 9.70605C10.9521 8.73535 11.6084 8.12695 12.6406 8.12695C13.6592 8.12695 14.3154 8.74902 14.3154 9.58984V9.60352C14.3154 10.3281 14.0078 10.7588 13.2148 11.2441C12.2783 11.8047 11.8408 12.4199 11.8477 13.3223V13.9512H13.0439ZM12.5381 17.123C13.0918 17.123 13.4814 16.7266 13.4814 16.1729C13.4814 15.6123 13.0918 15.2158 12.5381 15.2158C11.9844 15.2158 11.5879 15.6123 11.5879 16.1729C11.5879 16.7266 11.9844 17.123 12.5381 17.123Z"
- Fill="#616469" />
- </RadioButton.Content>
- <i:Interaction.Triggers>
- <i:EventTrigger EventName="Click">
- <i:InvokeCommandAction Command="{Binding StrickyNoteShapeCommand}" CommandParameter="{Binding ElementName=BtnHelp, Path=Tag}" />
- </i:EventTrigger>
- </i:Interaction.Triggers>
- </RadioButton>
- <RadioButton
- x:Name="BtnInsert"
- Grid.Row="1"
- Grid.Column="0"
- Width="51"
- Height="32"
- Margin="0,0,8,8"
- HorizontalContentAlignment="Center"
- VerticalContentAlignment="Center"
- Background="Transparent"
- Foreground="#616469"
- GroupName="StrickyNote"
- Style="{StaticResource GreyBgRadioBtnStyle}"
- Tag="Insert"
- IsChecked="{Binding strOtherTag, Converter={StaticResource AnnotToolIsCheckedConvert}, ConverterParameter=Insert}">
- <RadioButton.Content>
- <Path
- VerticalAlignment="Center"
- Data="M10.25 13C10.5059 13 10.7565 12.9774 11 12.934V19.5H13V6.5H15V19.5H17V6.5H18.5V4.5H17H15H13H11H10.5V4.50723C10.4173 4.50243 10.3339 4.5 10.25 4.5C7.90279 4.5 6 6.40279 6 8.75C6 11.0972 7.90279 13 10.25 13Z"
- Fill="#616469" />
- </RadioButton.Content>
- <i:Interaction.Triggers>
- <i:EventTrigger EventName="Click">
- <i:InvokeCommandAction Command="{Binding StrickyNoteShapeCommand}" CommandParameter="{Binding ElementName=BtnInsert, Path=Tag}" />
- </i:EventTrigger>
- </i:Interaction.Triggers>
- </RadioButton>
- <RadioButton
- x:Name="BtnParagraph"
- Grid.Row="1"
- Grid.Column="1"
- Width="51"
- Height="32"
- Margin="0,0,8,8"
- HorizontalContentAlignment="Center"
- VerticalContentAlignment="Center"
- Background="Transparent"
- Foreground="#616469"
- GroupName="StrickyNote"
- Style="{StaticResource GreyBgRadioBtnStyle}"
- Tag="Paragraph"
- IsChecked="{Binding strOtherTag, Converter={StaticResource AnnotToolIsCheckedConvert}, ConverterParameter=Paragraph}">
- <RadioButton.Content>
- <Path
- VerticalAlignment="Center"
- Data="M12.5 4L19.5 18H5.5L12.5 4Z"
- Fill="#616469" />
- </RadioButton.Content>
- <i:Interaction.Triggers>
- <i:EventTrigger EventName="Click">
- <i:InvokeCommandAction Command="{Binding StrickyNoteShapeCommand}" CommandParameter="{Binding ElementName=BtnParagraph, Path=Tag}" />
- </i:EventTrigger>
- </i:Interaction.Triggers>
- </RadioButton>
- <RadioButton
- x:Name="BtnNewParagraph"
- Grid.Row="1"
- Grid.Column="2"
- Width="51"
- Height="32"
- Margin="0,0,8,8"
- HorizontalContentAlignment="Center"
- VerticalContentAlignment="Center"
- Background="Transparent"
- Foreground="#616469"
- GroupName="StrickyNote"
- Style="{StaticResource GreyBgRadioBtnStyle}"
- Tag="NewParagraph"
- IsChecked="{Binding strOtherTag, Converter={StaticResource AnnotToolIsCheckedConvert}, ConverterParameter=NewParagraph}">
- <RadioButton.Content>
- <Path
- VerticalAlignment="Center"
- Data="M19.5 13L12.5 2L5.5 13H19.5ZM7.46177 17.0425V22H5.90952V14.2495H7.26304L10.8402 19.1855H10.9261V14.2495H12.4784V22H11.1356L7.54771 17.0425H7.46177ZM15.5803 19.5562V22H13.9583V14.2495H17.1541C18.7869 14.2495 19.8772 15.3022 19.8772 16.8975V16.9082C19.8772 18.5034 18.7869 19.5562 17.1541 19.5562H15.5803ZM16.7566 18.2886H15.5803V15.5332H16.7566C17.6858 15.5332 18.2336 16.022 18.2336 16.9028V16.9136C18.2336 17.7944 17.6858 18.2886 16.7566 18.2886Z"
- Fill="#616469" />
- </RadioButton.Content>
- <i:Interaction.Triggers>
- <i:EventTrigger EventName="Click">
- <i:InvokeCommandAction Command="{Binding StrickyNoteShapeCommand}" CommandParameter="{Binding ElementName=BtnNewParagraph, Path=Tag}" />
- </i:EventTrigger>
- </i:Interaction.Triggers>
- </RadioButton>
- </Grid>
- </StackPanel>
- </Grid>
- </UserControl>
|