123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171 |
- <UserControl x:Class="Compdfkit_Tools.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_Tools.Common"
- mc:Ignorable="d"
- d:DesignHeight="120" d:DesignWidth="228">
- <UserControl.Resources>
- <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>
- </UserControl.Resources>
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition></RowDefinition>
- <RowDefinition></RowDefinition>
- <RowDefinition></RowDefinition>
- </Grid.RowDefinitions>
- <Grid>
- <ComboBox x:Name="FontFamilyComboBox" SelectionChanged="FontFamilyComboBox_SelectionChanged" Width="228" Height="28" Margin="0,0,0,4"></ComboBox>
- <TextBox x:Name="FontFamilyTextBox" IsHitTestVisible="False" Width="228" Height="28" VerticalContentAlignment="Center" IsReadOnly="True" Background="#FFFFFF" Padding="0,0,15,0" Margin="0,0,0,4">Helvetica</TextBox>
- <Path Fill="#43474D" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="0,0,5,0" IsHitTestVisible="False">
- <Path.Data>
- M0.5 0.510248L4.5041 5.5L8.5 0.5L0.5 0.510248Z
- </Path.Data>
- </Path>
- </Grid>
- <Grid Grid.Row="1" Margin="0,4,0,0">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="auto"></ColumnDefinition>
- <ColumnDefinition></ColumnDefinition>
- </Grid.ColumnDefinitions>
- <Grid Margin="0,0,8,0">
- <ComboBox x:Name="FontStyleComboBox" SelectionChanged="FontStyleComboBox_SelectionChanged" Width="148" Height="28" BorderBrush="#1E000000" ></ComboBox>
- <TextBox x:Name="FontStyleTextBox" IsHitTestVisible="False" Width="148" Height="28" VerticalContentAlignment="Center" IsReadOnly="True" Background="#FFFFFF" Padding="0,0,15,0" >Common</TextBox>
- <Path Fill="#43474D" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="0,0,5,0" IsHitTestVisible="False">
- <Path.Data>
- M0.5 0.510248L4.5041 5.5L8.5 0.5L0.5 0.510248Z
- </Path.Data>
- </Path>
- </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>
|