123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149 |
- <UserControl
- x:Class="PDF_Master.Views.PropertyPanel.AnnotPanel.TextAnnotProperty"
- 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: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:mainpage="clr-namespace:PDF_Master.Strings.MainPage"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:prism="http://prismlibrary.com/"
- d:DataContext="{d:DesignInstance Type=AnnotPanel:TextAnnotPropertyViewModel}"
- d:DesignHeight="450"
- d:DesignWidth="260"
- prism:ViewModelLocator.AutoWireViewModel="True"
- Background="{StaticResource color.sys.layout.mg}"
- mc:Ignorable="d">
- <UserControl.Resources>
- <ResourceDictionary>
- <ResourceDictionary.MergedDictionaries>
- <ResourceDictionary Source="../../../Styles/SliderStyle.xaml" />
- </ResourceDictionary.MergedDictionaries>
- <Convert:AnnotArgsTypeConverter x:Key="AnnotArgsTypeConverter" />
- <dataconvert:InvertBoolToVisibleConvert x:Key="InvertBoolToVisibleConvert" />
- </ResourceDictionary>
- </UserControl.Resources>
- <Grid VerticalAlignment="Stretch" Background="{StaticResource color.sys.layout.mg}">
- <StackPanel Margin="16,0,16,0">
- <TextBlock
- Name="AnnotTypeTitle"
- Margin="0,14"
- HorizontalAlignment="Left"
- FontFamily="Segoe UI"
- FontSize="14"
- FontWeight="SemiBold"
- LineHeight="24"
- Text="{Binding BasicVm.AnnotTypeTitle, Mode=OneWay}" />
- <Border
- Width="228"
- Height="100"
- Background="White"
- BorderBrush="#DDDDDD"
- BorderThickness="1"
- CornerRadius="2"
- Visibility="{Binding BasicVm.IsMultiSelected, Converter={StaticResource InvertBoolToVisibleConvert}}">
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="*" />
- <ColumnDefinition Width="Auto" />
- <ColumnDefinition Width="*" />
- </Grid.ColumnDefinitions>
- <Grid.RowDefinitions>
- <RowDefinition Height="*" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="*" />
- </Grid.RowDefinitions>
- <Rectangle
- Grid.Row="1"
- Grid.Column="1"
- HorizontalAlignment="Stretch"
- VerticalAlignment="Stretch"
- Fill="{Binding BasicVm.FontColor}"
- Opacity="{Binding BasicVm.FillOpacity}"
- Visibility="{Binding BasicVm.AnnotType, Converter={StaticResource AnnotArgsTypeConverter}, ConverterParameter=AnnotHighlight}" />
- <Rectangle
- Grid.Row="1"
- Grid.Column="1"
- Height="2"
- HorizontalAlignment="Stretch"
- Opacity="{Binding BasicVm.FillOpacity}"
- Stroke="{Binding BasicVm.FontColor}"
- StrokeThickness="2"
- Visibility="{Binding BasicVm.AnnotType, Converter={StaticResource AnnotArgsTypeConverter}, ConverterParameter=AnnotStrikeout}" />
- <Rectangle
- Grid.Row="1"
- Grid.Column="1"
- Height="2"
- HorizontalAlignment="Stretch"
- VerticalAlignment="Bottom"
- Opacity="{Binding BasicVm.FillOpacity}"
- Stroke="{Binding BasicVm.FontColor}"
- StrokeThickness="2"
- Visibility="{Binding BasicVm.AnnotType, Converter={StaticResource AnnotArgsTypeConverter}, ConverterParameter=AnnotUnderline}" />
- <TextBlock
- Name="SampleText"
- Grid.Row="1"
- Grid.Column="1"
- Padding="4,2,4,2"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- FontFamily="Segoe UI"
- FontSize="18"
- FontWeight="Bold"
- Text="{x:Static mainpage:MainPage.Sample}" />
- </Grid>
- </Border>
- <Grid Margin="0,18,0,0">
- <Grid.RowDefinitions>
- <RowDefinition Height="auto" />
- <RowDefinition />
- </Grid.RowDefinitions>
- <CompositeControl:SlidContent
- x:Name="SlidOpacity"
- Margin="0,0,5,0"
- HorizontalAlignment="Right"
- InitValue="{Binding BasicVm.FillOpacity, Mode=OneWay}"
- Visibility="{Binding BasicVm.IsMultiSelected, Converter={StaticResource InvertBoolToVisibleConvert}}">
- <i:Interaction.Triggers>
- <i:EventTrigger EventName="SelectedValueChanged">
- <i:InvokeCommandAction Command="{Binding SelectedOpacityChangedCommand}" CommandParameter="{Binding ElementName=SlidOpacity, Path=Value}" />
- </i:EventTrigger>
- </i:Interaction.Triggers>
- </CompositeControl:SlidContent>
- <TextBlock
- HorizontalAlignment="Left"
- FontFamily="Segoe UI"
- FontSize="12"
- Foreground="{StaticResource color.sys.text.neutral.lv2}"
- Text="Color" />
-
- <CompositeControl:ColorContent
- x:Name="cusColor"
- Grid.Row="1"
- Margin="0,8,0,0"
- ColorType="{Binding ColorType}"
- ItemSource="{Binding BasicVm.ColorItems}"
- UIColor="{Binding BasicVm.CurrentFontColor, Mode=TwoWay}" DefaultColor="{Binding TextDefaultColor,Mode=TwoWay}"
- DefaultColorVisibility="Visible"
- DefaultColorInvoke="cusColor_DefaultColorInvoke">
- <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>
- </StackPanel>
-
- </Grid>
- </UserControl>
|