<UserControl x:Class="ComPDFKit.Controls.Common.CPDFFontUI" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:local="clr-namespace:ComPDFKit.Controls.Common" mc:Ignorable="d" d:DesignHeight="120" d:DesignWidth="228"> <UserControl.Resources> <ResourceDictionary> <Style x:Key="GreyBgRadioBtnStyle" TargetType="{x:Type RadioButton}"> <Setter Property="BorderThickness" Value="1" /> <Setter Property="Foreground" Value="#252629" /> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type RadioButton}"> <Border x:Name="templateRoot" Background="{TemplateBinding Background}" SnapsToDevicePixels="True"> <ContentPresenter x:Name="contentPresenter" Grid.Column="1" Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Focusable="False" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" /> </Border> <ControlTemplate.Triggers> <Trigger Property="IsEnabled" Value="false"> <Setter TargetName="templateRoot" Property="Opacity" Value="0.5" /> </Trigger> <Trigger Property="IsMouseOver" Value="True"> <Setter Property="Background" Value="#294982E6"></Setter> </Trigger> <Trigger Property="IsPressed" Value="true"> <Setter Property="Background" Value="#604982E6"></Setter> </Trigger> <Trigger Property="IsChecked" Value="true"> <Setter Property="Background" Value="#294982E6"></Setter> </Trigger> </ControlTemplate.Triggers> </ControlTemplate> </Setter.Value> </Setter> </Style> <ResourceDictionary.MergedDictionaries> <ResourceDictionary Source="pack://application:,,,/ComPDFKit.Controls;component/Asset/Styles/ComboBoxStyle.xaml"></ResourceDictionary> </ResourceDictionary.MergedDictionaries> </ResourceDictionary> </UserControl.Resources> <Grid> <Grid.RowDefinitions> <RowDefinition></RowDefinition> <RowDefinition></RowDefinition> <RowDefinition></RowDefinition> </Grid.RowDefinitions> <Grid> <ComboBox x:Name="FontFamilyComboBox" SelectionChanged="FontFamilyComboBox_SelectionChanged" Style="{StaticResource ComboBoxStyle1}" Width="228" Height="28" Margin="0,0,0,4" ></ComboBox> </Grid> <Grid Grid.Row="1" Margin="0,4,0,0" HorizontalAlignment="Left" Width="228"> <Grid.ColumnDefinitions> <ColumnDefinition Width="auto"></ColumnDefinition> <ColumnDefinition></ColumnDefinition> </Grid.ColumnDefinitions> <Grid Margin="0,0,8,0"> <ComboBox x:Name="FontStyleComboBox" Style="{StaticResource ComboBoxStyle1}" SelectionChanged="FontStyleComboBox_SelectionChanged" Width="148" Height="28" BorderBrush="#1E000000" ></ComboBox> </Grid> <local:DropDownNumberBoxControl x:Name="FontSizeComboBox" Maxium="100" Minimum="1" Grid.Column="1" Width="72" Height="28" Unit="pt" Text="{Binding FontSizeValue,Mode=TwoWay}"></local:DropDownNumberBoxControl> </Grid> <Border BorderBrush="#E2E3E6" BorderThickness="1" Width="148" Grid.Row="2" HorizontalAlignment="Left" Margin="0,8,0,0"> <Grid> <Grid.ColumnDefinitions> <ColumnDefinition></ColumnDefinition> <ColumnDefinition></ColumnDefinition> <ColumnDefinition></ColumnDefinition> </Grid.ColumnDefinitions> <RadioButton x:Name="LeftAlignRadioButton" Tag="Left" Style="{StaticResource GreyBgRadioBtnStyle}" IsChecked="True" Checked="AlignRadioButton_Checked"> <RadioButton.Content> <Grid Width="48" Height="30"> <Canvas Margin="16,10,0,0"> <Rectangle Width="13" Height="1.5" Stroke="#000000" StrokeThickness="1.5" /> <Rectangle Canvas.Top="4" Width="16" Height="1.5" Stroke="#000000" StrokeThickness="1.5" /> <Rectangle Canvas.Top="8" Width="12" Height="1.5" Stroke="#000000" StrokeThickness="1.5" /> </Canvas> </Grid> </RadioButton.Content> </RadioButton> <RadioButton x:Name="CenterAlignRadioButton" Grid.Column="1" Style="{StaticResource GreyBgRadioBtnStyle}" Tag="Center" Checked="AlignRadioButton_Checked"> <RadioButton.Content> <Grid Width="48" Height="30"> <Canvas Margin="16,10,0,0"> <Rectangle Width="16" Height="1.5" Stroke="#000000" StrokeThickness="1.5" /> <Rectangle Canvas.Top="4" Width="10" Height="1.5" Stroke="#000000" StrokeThickness="1.5" Margin="3,0,0,0"/> <Rectangle Canvas.Top="8" Width="16" Height="1.5" Stroke="#000000" StrokeThickness="1.5" /> </Canvas> </Grid> </RadioButton.Content> </RadioButton> <RadioButton x:Name="RightAlignRadioButton" Grid.Column="2" Style="{StaticResource GreyBgRadioBtnStyle}" Tag="Right" Checked="AlignRadioButton_Checked"> <RadioButton.Content > <Grid Width="48" Height="30"> <Canvas Margin="13,10,0,0"> <Rectangle Width="13" Height="1.5" Stroke="#000000" StrokeThickness="1.5" Margin="3,0,0,0"/> <Rectangle Canvas.Top="4" Width="16" Height="1.5" Stroke="#000000" StrokeThickness="1.5"/> <Rectangle Canvas.Top="8" Width="13" Height="1.5" Stroke="#000000" StrokeThickness="1.5" Margin="3,0,0,0"/> </Canvas> </Grid> </RadioButton.Content> </RadioButton> </Grid> </Border> </Grid> </UserControl>