123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913 |
- <UserControl
- x:Class="PDF_Office.Views.PropertyPanel.PDFEdit.TextEditProperty"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:CompositeControl="clr-namespace:PDF_Office.CustomControl.CompositeControl"
- xmlns:Convert="clr-namespace:PDF_Office.DataConvert"
- xmlns:FormControl="clr-namespace:PDF_Office.CustomControl.Form"
- xmlns:cus="clr-namespace:PDF_Office.CustomControl"
- xmlns:cusColor="clr-namespace:PDF_Office.CustomControl.CompositeControl"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:form="clr-namespace:PDF_Office.CustomControl.Form"
- xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
- xmlns:local="clr-namespace:PDF_Office.Views.PropertyPanel"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:pdfedit="clr-namespace:PDF_Office.Views.PropertyPanel.PDFEdit"
- xmlns:prism="http://prismlibrary.com/"
- d:DesignHeight="450"
- d:DesignWidth="260"
- prism:ViewModelLocator.AutoWireViewModel="True"
- Background="{StaticResource color.sys.layout.mg}"
- Loaded="UserControl_Loaded"
- mc:Ignorable="d">
- <!-- d:DataContext="{d:DesignInstance Type=pdfedit:TextEditPropertyViewModel}" -->
- <UserControl.Resources>
- <ResourceDictionary>
- <ResourceDictionary.MergedDictionaries>
- <ResourceDictionary Source="../../../Styles/SliderStyle.xaml" />
- <ResourceDictionary Source="../../../Styles/CustomBtnStyle.xaml" />
- <ResourceDictionary Source="../../../Styles/RadioButtonStyle.xaml" />
- </ResourceDictionary.MergedDictionaries>
- <Convert:BoolToVisible x:Key="BoolToVisible" />
- <Convert:InvertBoolToVisibleConvert x:Key="InvertBoolToVisibleConvert" />
- <Convert:InvertBoolConvert x:Key="InvertBoolConvert" />
- <ContextMenu x:Key="BtnFlyoutMenu" FontSize="14">
- <ContextMenu.ItemContainerStyle>
- <Style TargetType="MenuItem">
- <Setter Property="Padding" Value="0,7,0,7" />
- <Setter Property="VerticalContentAlignment" Value="Center" />
- </Style>
- </ContextMenu.ItemContainerStyle>
- <MenuItem
- Name="ChangeStyleMenuItem"
- Header="用所选部分重新定义"
- IsEnabled="True" />
- <MenuItem
- Name="BackStyleMenuItem"
- Header="恢复默认预设样式"
- IsEnabled="True" />
- </ContextMenu>
- <DataTemplate x:Key="FontStyleData">
- <Grid>
- <TextBlock Foreground="Black" Text="{Binding mFontStyleName}" />
- </Grid>
- </DataTemplate>
- </ResourceDictionary>
- </UserControl.Resources>
- <Grid Margin="16,14">
- <Grid.RowDefinitions>
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- </Grid.RowDefinitions>
- <Grid Visibility="{Binding IsSelectTextAndImg, Converter={StaticResource InvertBoolToVisibleConvert}}">
- <StackPanel Visibility="{Binding IsTextEdit, Converter={StaticResource BoolToVisible}}">
- <TextBlock
- Name="AnnotTypeTitle"
- HorizontalAlignment="Left"
- FontFamily="Segoe UI"
- FontSize="14"
- FontWeight="SemiBold"
- LineHeight="22">
- Freetext
- </TextBlock>
- <Border
- Width="228"
- Height="88"
- Margin="0,8,0,0"
- Background="{StaticResource color.field.bg.def}"
- BorderBrush="{StaticResource color.field.border.norm}"
- BorderThickness="1"
- CornerRadius="2">
- <Grid>
- <Border
- Name="FreeTextBorder"
- Padding="5"
- HorizontalAlignment="Center"
- VerticalAlignment="Center">
- <TextBlock
- Name="SampleText"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- FontFamily="{Binding TextFontFamily}"
- FontSize="{Binding TextFontSize}"
- FontStyle="{Binding TextFontStyle}"
- FontWeight="{Binding TextFontWeights}"
- Foreground="{Binding SelectColor}"
- Text="Sample" />
- </Border>
- <Path
- Name="UnderlinePath"
- Margin="0,51,0,0"
- HorizontalAlignment="Center"
- StrokeThickness="2"
- Visibility="Collapsed">
- <Path.Data>
- <LineGeometry StartPoint="0,0" EndPoint="62,0" />
- </Path.Data>
- </Path>
- <Path
- Name="StrikeoutPath"
- Margin="0,40,0,0"
- HorizontalAlignment="Center"
- StrokeThickness="2"
- Visibility="Collapsed">
- <Path.Data>
- <LineGeometry StartPoint="0,0" EndPoint="62,0" />
- </Path.Data>
- </Path>
- <Path
- Name="SquigglyPath"
- Margin="0,51,0,0"
- HorizontalAlignment="Center"
- StrokeThickness="2"
- Visibility="Collapsed" />
- </Grid>
- </Border>
- <Border
- Height="32"
- Margin="0,8,0,18"
- BorderBrush="#E2E3E6"
- BorderThickness="0">
- <Grid>
- <CompositeControl:CustomComboControl
- x:Name="FontTitleBox"
- Width="188"
- Height="32"
- HorizontalAlignment="Left"
- IsValueContent="True"
- ItemSource="{Binding PresetTextItems}"
- SelectedItems="{Binding PresetTextData, Mode=TwoWay}" />
- <Button
- Width="32"
- Height="32"
- HorizontalAlignment="Right"
- ContextMenu="{StaticResource BtnFlyoutMenu}"
- Style="{StaticResource btn.sec}">
- <Path
- Width="16"
- Height="16"
- Data="M4 8C4 8.82843 3.32843 9.5 2.5 9.5C1.67157 9.5 1 8.82843 1 8C1 7.17157 1.67157 6.5 2.5 6.5C3.32843 6.5 4 7.17157 4 8ZM9.3999 8C9.3999 8.82843 8.72833 9.5 7.8999 9.5C7.07148 9.5 6.3999 8.82843 6.3999 8C6.3999 7.17157 7.07148 6.5 7.8999 6.5C8.72833 6.5 9.3999 7.17157 9.3999 8ZM13.5 9.5C14.3284 9.5 15 8.82843 15 8C15 7.17157 14.3284 6.5 13.5 6.5C12.6716 6.5 12 7.17157 12 8C12 8.82843 12.6716 9.5 13.5 9.5Z"
- Fill="{StaticResource color.icon.base.neutral.norm.lv1}" />
- </Button>
- </Grid>
- </Border>
- <StackPanel>
- <TextBlock
- Margin="0,0,0,10"
- Style="{StaticResource PropertyHeaderLv2}"
- Text="文本" />
- <StackPanel>
- <CompositeControl:CustomComboControl
- x:Name="FontFamilyBox"
- Height="32"
- IsValueContent="True"
- ItemSource="{Binding FontFamilyItems}"
- SelectedItems="{Binding FontFamilyData, Mode=TwoWay}" />
- <Grid Margin="0,8">
- <CompositeControl:CustomComboControl
- x:Name="FontStyleBox"
- Width="110"
- Height="32"
- HorizontalAlignment="Left"
- IsValueContent="True"
- ItemSource="{Binding FontStyleItems}"
- SelectedItems="{Binding FontWeightStyleItem, Mode=TwoWay}" />
- <CompositeControl:CustomComboControl
- x:Name="FontSizeBox"
- Width="110"
- Height="32"
- HorizontalAlignment="Right"
- SelectedItems="{Binding FontSizeData, Mode=TwoWay}" />
- </Grid>
- <Grid>
- <StackPanel Orientation="Horizontal">
- <RadioButton
- x:Name="TextAlignLeftBtn"
- Width="32"
- Height="32"
- VerticalContentAlignment="Center"
- Background="Transparent"
- Foreground="#616469"
- GroupName="TextAlign"
- IsChecked="True"
- Style="{DynamicResource GreyBgRadioBtnStyle}"
- Tag="AlignLeft">
- <RadioButton.Content>
- <Grid Width="32" Height="32">
- <Canvas Margin="5,10,0,0">
- <Rectangle
- Canvas.Top="0.25"
- Width="14"
- Height="1.5"
- Stroke="{Binding ElementName=TextAlignLeftBtn, Path=Foreground}"
- StrokeThickness="1.5" />
- <Rectangle
- Canvas.Top="4.25"
- Width="8"
- Height="1.5"
- Stroke="{Binding ElementName=TextAlignLeftBtn, Path=Foreground}"
- StrokeThickness="1.5" />
- <Rectangle
- Canvas.Top="12.25"
- Width="8"
- Height="1.5"
- Stroke="{Binding ElementName=TextAlignLeftBtn, Path=Foreground}"
- StrokeThickness="1.5" />
- <Rectangle
- Canvas.Top="8.25"
- Width="14"
- Height="1.5"
- Stroke="{Binding ElementName=TextAlignLeftBtn, Path=Foreground}"
- StrokeThickness="1.5" />
- </Canvas>
- </Grid>
- </RadioButton.Content>
- <i:Interaction.Triggers>
- <i:EventTrigger EventName="Checked">
- <i:InvokeCommandAction Command="{Binding TextAlignCheckedCommand}" CommandParameter="{Binding ElementName=TextAlignLeftBtn, Path=Tag}" />
- </i:EventTrigger>
- </i:Interaction.Triggers>
- </RadioButton>
- <RadioButton
- x:Name="TextAlignCenterBtn"
- Width="32"
- Height="32"
- Margin="8,0"
- VerticalContentAlignment="Center"
- Background="Transparent"
- Foreground="#616469"
- GroupName="TextAlign"
- Style="{DynamicResource GreyBgRadioBtnStyle}"
- Tag="AlignCenter">
- <RadioButton.Content>
- <Grid Width="32" Height="32">
- <Canvas Margin="5,10,0,0">
- <Rectangle
- Canvas.Top="0.25"
- Width="14"
- Height="1.5"
- Stroke="{Binding ElementName=TextAlignCenterBtn, Path=Foreground}"
- StrokeThickness="1.5" />
- <Rectangle
- Canvas.Left="3"
- Canvas.Top="4.25"
- Width="8"
- Height="1.5"
- Stroke="{Binding ElementName=TextAlignCenterBtn, Path=Foreground}"
- StrokeThickness="1.5" />
- <Rectangle
- Canvas.Left="3"
- Canvas.Top="12.25"
- Width="8"
- Height="1.5"
- Stroke="{Binding ElementName=TextAlignCenterBtn, Path=Foreground}"
- StrokeThickness="1.5" />
- <Rectangle
- Canvas.Top="8.25"
- Width="14"
- Height="1.5"
- Stroke="{Binding ElementName=TextAlignCenterBtn, Path=Foreground}"
- StrokeThickness="1.5" />
- </Canvas>
- </Grid>
- </RadioButton.Content>
- <i:Interaction.Triggers>
- <i:EventTrigger EventName="Checked">
- <i:InvokeCommandAction Command="{Binding TextAlignCheckedCommand}" CommandParameter="{Binding ElementName=TextAlignCenterBtn, Path=Tag}" />
- </i:EventTrigger>
- </i:Interaction.Triggers>
- </RadioButton>
- <RadioButton
- x:Name="TextAlignRightBtn"
- Grid.Column="2"
- Width="32"
- Height="32"
- VerticalContentAlignment="Center"
- Background="Transparent"
- Foreground="#616469"
- GroupName="TextAlign"
- Style="{DynamicResource GreyBgRadioBtnStyle}"
- Tag="AlignRight">
- <RadioButton.Content>
- <Grid Width="32" Height="32">
- <Canvas Margin="5,10,0,0">
- <Rectangle
- Canvas.Top="0.25"
- Width="14"
- Height="1.5"
- Stroke="{Binding ElementName=TextAlignRightBtn, Path=Foreground}"
- StrokeThickness="1.5" />
- <Rectangle
- Canvas.Left="6"
- Canvas.Top="4.25"
- Width="8"
- Height="1.5"
- Stroke="{Binding ElementName=TextAlignRightBtn, Path=Foreground}"
- StrokeThickness="1.5" />
- <Rectangle
- Canvas.Left="6"
- Canvas.Top="12.25"
- Width="8"
- Height="1.5"
- Stroke="{Binding ElementName=TextAlignRightBtn, Path=Foreground}"
- StrokeThickness="1.5" />
- <Rectangle
- Canvas.Top="8.25"
- Width="14"
- Height="1.5"
- Stroke="{Binding ElementName=TextAlignRightBtn, Path=Foreground}"
- StrokeThickness="1.5" />
- </Canvas>
- </Grid>
- </RadioButton.Content>
- <i:Interaction.Triggers>
- <i:EventTrigger EventName="Checked">
- <i:InvokeCommandAction Command="{Binding TextAlignCheckedCommand}" CommandParameter="{Binding ElementName=TextAlignRightBtn, Path=Tag}" />
- </i:EventTrigger>
- </i:Interaction.Triggers>
- </RadioButton>
- <RadioButton
- x:Name="TextAlignBtn"
- Grid.Column="3"
- Width="32"
- Height="32"
- Margin="8,0"
- VerticalContentAlignment="Center"
- Background="Transparent"
- Foreground="#616469"
- GroupName="TextAlign"
- Style="{DynamicResource GreyBgRadioBtnStyle}"
- Tag="Align">
- <RadioButton.Content>
- <Grid Width="32" Height="32">
- <Canvas Margin="5,10,0,0">
- <Rectangle
- Canvas.Top="0.25"
- Width="14"
- Height="1.5"
- Stroke="{Binding ElementName=TextAlignBtn, Path=Foreground}"
- StrokeThickness="1.5" />
- <Rectangle
- Canvas.Top="8.25"
- Width="14"
- Height="1.5"
- Stroke="{Binding ElementName=TextAlignBtn, Path=Foreground}"
- StrokeThickness="1.5" />
- <Rectangle
- Canvas.Top="4.25"
- Width="14"
- Height="1.5"
- Stroke="{Binding ElementName=TextAlignBtn, Path=Foreground}"
- StrokeThickness="1.5" />
- <Rectangle
- Canvas.Top="12.25"
- Width="14"
- Height="1.5"
- Stroke="{Binding ElementName=TextAlignBtn, Path=Foreground}"
- StrokeThickness="1.5" />
- </Canvas>
- </Grid>
- </RadioButton.Content>
- <i:Interaction.Triggers>
- <i:EventTrigger EventName="Checked">
- <i:InvokeCommandAction Command="{Binding TextAlignCheckedCommand}" CommandParameter="{Binding ElementName=TextAlignBtn, Path=Tag}" />
- </i:EventTrigger>
- </i:Interaction.Triggers>
- </RadioButton>
- </StackPanel>
- <cusColor:ColorContent
- x:Name="FontColorBox"
- Width="56"
- HorizontalAlignment="Right"
- ShowColorList="Collapsed" />
- </Grid>
- </StackPanel>
- </StackPanel>
- <!--<TextBlock
- x:Name="FontText"
- Margin="12,18,0,0"
- FontFamily="Segoe UI Semibold"
- FontSize="14"
- FontWeight="SemiBold"
- LineHeight="20">
- Font
- </TextBlock>-->
- <!--<Grid Margin="0,6,0,0">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="auto" />
- <ColumnDefinition Width="auto" />
- </Grid.ColumnDefinitions>
- <Grid.RowDefinitions>
- <RowDefinition Height="auto" />
- <RowDefinition Height="auto" />
- <RowDefinition Height="auto" />
- </Grid.RowDefinitions>
- -->
- <!--<Border
- Grid.ColumnSpan="2"
- Width="228"
- Height="32"
- Margin="12,0,4,0"
- BorderBrush="#E2E3E6"
- BorderThickness="0">
- <Grid>
- -->
- <!--<ComboBox
- Name="FontFamilyBox"
- Padding="10,10,0,0"
- Background="Transparent"
- BorderBrush="#FFE2E3E6"
- BorderThickness="1"
- IsReadOnly="True">
- <ComboBox.ItemContainerStyle>
- <Style TargetType="{x:Type ComboBoxItem}">
- <Setter Property="Padding" Value="10,0,0,0" />
- </Style>
- </ComboBox.ItemContainerStyle>
- <ComboBoxItem
- Height="32"
- VerticalContentAlignment="Center"
- Template="{StaticResource comboxitem}">
- <TextBlock
- FontFamily="Courier New"
- FontSize="14"
- Tag="Courier"
- Text="Courier New" />
- </ComboBoxItem>
- <ComboBoxItem
- Height="32"
- VerticalContentAlignment="Center"
- Template="{StaticResource comboxitem}">
- <TextBlock
- FontFamily="Arial"
- FontSize="14"
- Tag="Helvetica"
- Text="Arial" />
- </ComboBoxItem>
- <ComboBoxItem
- Height="32"
- VerticalContentAlignment="Center"
- Template="{StaticResource comboxitem}">
- <TextBlock
- FontFamily="Times New Roman"
- FontSize="14"
- Tag="Times Roman"
- Text="Times New Roman" />
- </ComboBoxItem>
- <i:Interaction.Triggers>
- <i:EventTrigger EventName="SelectionChanged">
- <i:InvokeCommandAction Command="{Binding FontFamilyChangedCommand}" CommandParameter="{Binding ElementName=FontFamilyBox, Path=SelectedIndex}" />
- </i:EventTrigger>
- </i:Interaction.Triggers>
- </ComboBox>-->
- <!--
- <TextBox
- Name="FontFamilyText"
- Margin="2,0,25,0"
- Padding="10,0,0,0"
- VerticalAlignment="Center"
- Background="White"
- BorderThickness="0"
- FontFamily="Segoe UI"
- FontSize="14"
- IsReadOnly="True"
- TextAlignment="Left" />
- </Grid>
- </Border>-->
- <!--<cusColor:ColorSubContent
- x:Name="FontColorBox"
- Grid.Row="2"
- Grid.Column="1"
- HorizontalAlignment="Left" />-->
- <!--<Border
- Grid.Row="1"
- Width="148"
- Height="32"
- Margin="12,8,4,0"
- BorderBrush="#E2E3E6"
- BorderThickness="0">
- <Grid>
- <ComboBox
- Name="FontStyleBox"
- Padding="10,10,0,0"
- Background="Transparent"
- BorderBrush="#FFE2E3E6"
- BorderThickness="1"
- IsReadOnly="True">
- <ComboBox.ItemContainerStyle>
- <Style TargetType="{x:Type ComboBoxItem}">
- <Setter Property="Padding" Value="10,0,0,0" />
- </Style>
- </ComboBox.ItemContainerStyle>
- <ComboBoxItem
- x:Name="RegularItem"
- Height="32"
- VerticalContentAlignment="Center"
- Template="{StaticResource comboxitem}">
- Regular
- </ComboBoxItem>
- <ComboBoxItem
- x:Name="BoldItem"
- Height="32"
- VerticalContentAlignment="Center"
- Template="{StaticResource comboxitem}">
- Bold
- </ComboBoxItem>
- <ComboBoxItem
- x:Name="ItalicItem"
- Height="32"
- VerticalContentAlignment="Center"
- Template="{StaticResource comboxitem}">
- Italic
- </ComboBoxItem>
- <ComboBoxItem
- x:Name="BoldItalicItem"
- Height="32"
- VerticalContentAlignment="Center"
- Template="{StaticResource comboxitem}">
- Bold Italic
- </ComboBoxItem>
- <i:Interaction.Triggers>
- <i:EventTrigger EventName="SelectionChanged">
- <i:InvokeCommandAction Command="{Binding FontStyleChangedCommand}" CommandParameter="{Binding ElementName=FontStyleBox, Path=SelectedItem}" />
- </i:EventTrigger>
- </i:Interaction.Triggers>
- </ComboBox>
- <TextBox
- Name="FontStyleText"
- Height="20"
- Margin="2,0,35,0"
- Padding="10,0,0,0"
- VerticalAlignment="Center"
- Background="White"
- BorderThickness="0"
- FontFamily="Segoe UI"
- FontSize="14"
- IsReadOnly="True"
- TextAlignment="Left" />
- </Grid>
- </Border>-->
- <!--<Border
- Grid.Row="1"
- Grid.Column="1"
- Width="80"
- Height="32"
- Margin="-1,8,0,0"
- BorderBrush="#E2E3E6"
- BorderThickness="0">
- -->
- <!--<Grid>
- <ComboBox
- Name="FontSizeBox"
- Background="Transparent"
- BorderBrush="#FFE2E3E6"
- BorderThickness="1"
- MaxDropDownHeight="200">
- <ComboBox.ItemContainerStyle>
- <Style TargetType="{x:Type ComboBoxItem}">
- <Setter Property="Padding" Value="10,0,0,0" />
- </Style>
- </ComboBox.ItemContainerStyle>
- <ComboBoxItem
- Height="32"
- VerticalContentAlignment="Center"
- Template="{StaticResource comboxitem}">
- 6
- </ComboBoxItem>
- <ComboBoxItem
- Height="32"
- VerticalContentAlignment="Center"
- Template="{StaticResource comboxitem}">
- 8
- </ComboBoxItem>
- <ComboBoxItem
- Height="32"
- VerticalContentAlignment="Center"
- Template="{StaticResource comboxitem}">
- 9
- </ComboBoxItem>
- <ComboBoxItem
- Height="32"
- VerticalContentAlignment="Center"
- Template="{StaticResource comboxitem}">
- 10
- </ComboBoxItem>
- <ComboBoxItem
- Height="32"
- VerticalContentAlignment="Center"
- Template="{StaticResource comboxitem}">
- 12
- </ComboBoxItem>
- <ComboBoxItem
- Height="32"
- VerticalContentAlignment="Center"
- Template="{StaticResource comboxitem}">
- 14
- </ComboBoxItem>
- <ComboBoxItem
- Height="32"
- VerticalContentAlignment="Center"
- Template="{StaticResource comboxitem}">
- 18
- </ComboBoxItem>
- <ComboBoxItem
- Height="32"
- VerticalContentAlignment="Center"
- Template="{StaticResource comboxitem}">
- 20
- </ComboBoxItem>
- <ComboBoxItem
- Height="32"
- VerticalContentAlignment="Center"
- Template="{StaticResource comboxitem}">
- 22
- </ComboBoxItem>
- <ComboBoxItem
- Height="32"
- VerticalContentAlignment="Center"
- Template="{StaticResource comboxitem}">
- 24
- </ComboBoxItem>
- <ComboBoxItem
- Height="32"
- VerticalContentAlignment="Center"
- Template="{StaticResource comboxitem}">
- 26
- </ComboBoxItem>
- <ComboBoxItem
- Height="32"
- VerticalContentAlignment="Center"
- Template="{StaticResource comboxitem}">
- 28
- </ComboBoxItem>
- <ComboBoxItem
- Height="32"
- VerticalContentAlignment="Center"
- Template="{StaticResource comboxitem}">
- 32
- </ComboBoxItem>
- <ComboBoxItem
- Height="32"
- VerticalContentAlignment="Center"
- Template="{StaticResource comboxitem}">
- 36
- </ComboBoxItem>
- <ComboBoxItem
- Height="32"
- VerticalContentAlignment="Center"
- Template="{StaticResource comboxitem}">
- 48
- </ComboBoxItem>
- <ComboBoxItem
- Height="32"
- VerticalContentAlignment="Center"
- Template="{StaticResource comboxitem}">
- 72
- </ComboBoxItem>
- <i:Interaction.Triggers>
- <i:EventTrigger EventName="SelectionChanged">
- <i:InvokeCommandAction Command="{Binding FontSizeChangedCommand}" CommandParameter="{Binding ElementName=FontSizeBox, Path=SelectedItem}" />
- </i:EventTrigger>
- </i:Interaction.Triggers>
- </ComboBox>
- <TextBox
- Name="FontSizeText"
- Height="20"
- Margin="2,0,35,0"
- Padding="10,0,0,0"
- VerticalAlignment="Center"
- Background="White"
- BorderThickness="0"
- FontFamily="Segoe UI"
- FontSize="14"
- IsReadOnly="True"
- TextAlignment="Left" />
- </Grid>-->
- <!--
- </Border>-->
- <!--
- <Border
- Grid.Row="2"
- Grid.ColumnSpan="2"
- Width="148"
- Margin="12,8,0,0"
- HorizontalAlignment="Left">
- <Grid Name="ToolGrid">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="*" />
- <ColumnDefinition Width="*" />
- <ColumnDefinition Width="*" />
- <ColumnDefinition Width="*" />
- </Grid.ColumnDefinitions>
- </Grid>
- </Border>
- </Grid>-->
- <TextBlock
- x:Name="AlignImg"
- Margin="0,18,0,10"
- FontFamily="Segoe UI"
- FontSize="12"
- FontWeight="SemiBold"
- Foreground="{StaticResource color.sys.text.neutral.lv2}"
- LineHeight="20">
- Align
- </TextBlock>
- </StackPanel>
- <!--<StackPanel Visibility="{Binding IsTextEdit, Converter={StaticResource InvertBoolToVisibleConvert}}">
- <TextBlock
- Name="AnnotTypeTitle1"
- Margin="10,8,0,0"
- HorizontalAlignment="Left"
- FontFamily="Segoe UI Semibold"
- FontSize="18"
- FontWeight="SemiBold"
- LineHeight="24">
- Image
- </TextBlock>
- <Border
- Width="228"
- Height="100"
- Margin="0,8,0,0"
- Background="White"
- BorderBrush="#DDDDDD"
- BorderThickness="1"
- CornerRadius="2">
- <Grid>
- <Border
- Name="FreeTextBorder1"
- Padding="5"
- HorizontalAlignment="Center"
- VerticalAlignment="Center">
- <Image x:Name="ImgExmple" Source="{Binding CurrentImg}">
- <Image.RenderTransform>
- <RotateTransform x:Name="test" Angle="{Binding Angle}" />
- </Image.RenderTransform>
- </Image>
- </Border>
- </Grid>
- </Border>
- <StackPanel
- Margin="0,18,0,0"
- HorizontalAlignment="Center"
- Orientation="Horizontal">
- <Button
- Width="32"
- Height="32"
- Margin="0,0,20,0"
- Command="{Binding AntiClockwiseCommand}"
- Content="逆转"
- IsEnabled="{Binding IsCrop, Converter={StaticResource InvertBoolConvert}}" />
- <Button
- Width="32"
- Height="32"
- Command="{Binding ClockwiseCommand}"
- Content="顺转"
- IsEnabled="{Binding IsCrop, Converter={StaticResource InvertBoolConvert}}" />
- </StackPanel>
- <CompositeControl:SlidComboControl IsEnabled="{Binding IsCrop, Converter={StaticResource InvertBoolConvert}}" />
- <StackPanel
- Width="228"
- Margin="0,20,0,0"
- HorizontalAlignment="Center">
- <Grid x:Name="GridCrop">
- <cus:CustomIconToggleBtn
- x:Name="BtnCrop"
- BorderBrush="#DFE1E5"
- BorderThickness="1"
- Command="{Binding CropModeCommand}"
- ContentStringFormat="156"
- Foreground="Black"
- Style="{StaticResource ToggleBtnViewModeStyle}"
- Tag="Crop"
- Visibility="{Binding IsCrop, Converter={StaticResource InvertBoolToVisibleConvert}}">
- <TextBlock Text="Crop" />
- </cus:CustomIconToggleBtn>
- <Grid Visibility="{Binding IsCrop, Converter={StaticResource BoolToVisible}}">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="*" />
- <ColumnDefinition Width="8" />
- <ColumnDefinition Width="*" />
- </Grid.ColumnDefinitions>
- <Button
- Height="32"
- Background="#1770F4"
- Command="{Binding CropImgCommand}"
- Content="Confirm" />
- <Button
- Grid.Column="2"
- Background="White"
- BorderBrush="#DFE1E5"
- BorderThickness="1"
- Command="{Binding CancelCropCommand}"
- Content="Cancel" />
- </Grid>
- </Grid>
- <cus:CustomIconToggleBtn
- x:Name="BtnReplace"
- Margin="0,13,0,0"
- BorderBrush="#DFE1E5"
- BorderThickness="1"
- Command="{Binding ReplaceImgCommand}"
- ContentStringFormat="156"
- Foreground="Black"
- IsEnabled="{Binding IsCrop, Converter={StaticResource InvertBoolConvert}}"
- Style="{StaticResource ToggleBtnViewModeStyle}"
- Tag="Replace">
- <TextBlock Text="Replace" />
- </cus:CustomIconToggleBtn>
- <cus:CustomIconToggleBtn
- x:Name="BtnExtract"
- Margin="0,13,0,0"
- BorderBrush="#DFE1E5"
- BorderThickness="1"
- Command="{Binding ExportImgCommand}"
- ContentStringFormat="156"
- Foreground="Black"
- IsEnabled="{Binding IsCrop, Converter={StaticResource InvertBoolConvert}}"
- Style="{StaticResource ToggleBtnViewModeStyle}"
- Tag="Extract">
- <TextBlock Text="Extract" />
- </cus:CustomIconToggleBtn>
- </StackPanel>
- <TextBlock
- x:Name="AlignImg"
- Margin="12,14,0,0"
- FontFamily="Segoe UI Semibold"
- FontSize="14"
- FontWeight="SemiBold"
- LineHeight="20">
- Align
- </TextBlock>
- </StackPanel>-->
- </Grid>
- <!--<StackPanel Visibility="{Binding IsSelectTextAndImg, Converter={StaticResource BoolToVisible}}">
- <TextBlock
- x:Name="GeneralProperties"
- Margin="12,0,0,0"
- FontFamily="Segoe UI Semibold"
- FontSize="14"
- FontWeight="SemiBold"
- LineHeight="20">
- General Properties
- </TextBlock>
- <TextBlock
- x:Name="AlignTextAndImg"
- Margin="12,14,0,0"
- FontFamily="Segoe UI Semibold"
- FontSize="14"
- FontWeight="SemiBold"
- LineHeight="20">
- Align
- </TextBlock>
- </StackPanel>-->
- <FormControl:LayoutAglinContent
- x:Name="laoutAglin"
- Grid.Row="1"
- IsLayoutAlign="{Binding IsLayoutAlign}"
- IsLayoutAvgAlign="{Binding IsLayoutAvgAlign}">
- <i:Interaction.Triggers>
- <i:EventTrigger EventName="ValueChanged">
- <i:InvokeCommandAction Command="{Binding ImgAlignCheckedCommand}" CommandParameter="{Binding ElementName=laoutAglin, Path=Btntag}" />
- </i:EventTrigger>
- </i:Interaction.Triggers>
- </FormControl:LayoutAglinContent>
- </Grid>
- </UserControl>
|