123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218 |
- <UserControl
- x:Class="PDF_Office.Views.Form.FormsToolContent"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:convert="clr-namespace:PDF_Office.DataConvert"
- xmlns:cus="clr-namespace:PDF_Office.CustomControl"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:form="clr-namespace:PDF_Office.ViewModels.Form"
- xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
- xmlns:local="clr-namespace:PDF_Office.Views.Form"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:prism="http://prismlibrary.com/"
- d:DataContext="{d:DesignInstance Type=form:FormsToolContentViewModel}"
- d:DesignHeight="40"
- d:DesignWidth="800"
- prism:ViewModelLocator.AutoWireViewModel="True"
- mc:Ignorable="d">
- <UserControl.Resources>
- <convert:UnVisivleConvert x:Key="UnVisibleConvert" />
- <Style BasedOn="{StaticResource RectangleRadionButtonWithCorner}" TargetType="{x:Type RadioButton}">
- <Setter Property="Width" Value="28" />
- <Setter Property="Height" Value="28" />
- <Setter Property="Margin" Value="4,6" />
- <Setter Property="Background" Value="Transparent" />
- </Style>
- <!-- 外围图形的填充颜色和样式 -->
- <Style x:Key="BorderPath" TargetType="{x:Type Path}">
- <Setter Property="Width" Value="20" />
- <Setter Property="Height" Value="20" />
- <Setter Property="Stretch" Value="Uniform" />
- <Setter Property="Fill" Value="{StaticResource color.icon.base.brand}" />
- </Style>
- <!-- 内部图形的填充颜色和样式 -->
- <Style x:Key="ContentPath" TargetType="{x:Type Path}">
- <Setter Property="Fill" Value="{StaticResource color.icon.base.neutral.norm.lv2}" />
- </Style>
- </UserControl.Resources>
- <Grid VerticalAlignment="Center">
- <StackPanel HorizontalAlignment="Center" Orientation="Horizontal">
- <RadioButton>
- <Grid>
- <Path Data="M3 4H18C18.2761 4 18.5 4.22386 18.5 4.5V11L13.5 16H3C2.72386 16 2.5 15.7761 2.5 15.5V4.5C2.5 4.22386 2.72386 4 3 4ZM0.5 4.5C0.5 3.11929 1.61929 2 3 2H18C19.3807 2 20.5 3.11929 20.5 4.5V15.5C20.5 16.8807 19.3807 18 18 18H3C1.61929 18 0.5 16.8807 0.5 15.5V4.5Z" Style="{StaticResource BorderPath}" />
- <Path Data="M6 5.5H7H9H10H12V7.5V8.5H10V7.5H9V12.5H10V14.5H6V12.5H7V7.5H6V8.5H4V7.5V5.5H6Z" Style="{StaticResource ContentPath}" />
- </Grid>
- <i:Interaction.Triggers>
- <i:EventTrigger EventName="Checked">
- <i:InvokeCommandAction Command="{Binding CheckedCommand}" CommandParameter="Text" />
- </i:EventTrigger>
- </i:Interaction.Triggers>
- </RadioButton>
- <RadioButton>
- <Grid>
- <Path Data="M17 3H4C3.72386 3 3.5 3.22386 3.5 3.5V16.5C3.5 16.7761 3.72386 17 4 17H17C17.2761 17 17.5 16.7761 17.5 16.5V3.5C17.5 3.22386 17.2761 3 17 3ZM4 1C2.61929 1 1.5 2.11929 1.5 3.5V16.5C1.5 17.8807 2.61929 19 4 19H17C18.3807 19 19.5 17.8807 19.5 16.5V3.5C19.5 2.11929 18.3807 1 17 1H4Z" Style="{StaticResource BorderPath}" />
- <Path Data="M16.3 6.60002L10.3 14.6C10.1261 14.8319 9.86007 14.977 9.5709 14.9975C9.28174 15.0181 8.99789 14.9121 8.79291 14.7071L4.79291 10.7071L6.20712 9.29292L9.39182 12.4776L14.7 5.40002L16.3 6.60002Z" Style="{StaticResource ContentPath}" />
- </Grid>
- <i:Interaction.Triggers>
- <i:EventTrigger EventName="Checked">
- <i:InvokeCommandAction Command="{Binding CheckedCommand}" CommandParameter="CheckBox" />
- </i:EventTrigger>
- </i:Interaction.Triggers>
- </RadioButton>
- <RadioButton>
- <Grid>
- <Path Data="M10.5 18C14.9183 18 18.5 14.4183 18.5 10C18.5 5.58172 14.9183 2 10.5 2C6.08172 2 2.5 5.58172 2.5 10C2.5 14.4183 6.08172 18 10.5 18ZM10.5 20C16.0228 20 20.5 15.5228 20.5 10C20.5 4.47715 16.0228 0 10.5 0C4.97715 0 0.5 4.47715 0.5 10C0.5 15.5228 4.97715 20 10.5 20Z" Style="{StaticResource BorderPath}" />
- <Path Fill="{StaticResource color.icon.base.neutral.norm.lv2}">
- <Path.Data>
- <EllipseGeometry
- Center="10 10"
- RadiusX="4"
- RadiusY="4" />
- </Path.Data>
- </Path>
- </Grid>
- <i:Interaction.Triggers>
- <i:EventTrigger EventName="Checked">
- <i:InvokeCommandAction Command="{Binding CheckedCommand}" CommandParameter="RadioButton" />
- </i:EventTrigger>
- </i:Interaction.Triggers>
- </RadioButton>
- <RadioButton>
- <Grid>
- <Path Data="M1.5 2C0.947715 2 0.5 2.44772 0.5 3V17C0.5 17.5523 0.947715 18 1.5 18H19.5C20.0523 18 20.5 17.5523 20.5 17V3C20.5 2.44772 20.0523 2 19.5 2H1.5ZM2.5 9V4H18.5V9H2.5ZM2.5 11V16H18.5V11H2.5Z" Style="{StaticResource BorderPath}" />
- <Path Data="M8.5 5.5H4.5V7.5H8.5V5.5ZM8.5 12.5H4.5V14.5H8.5V12.5Z" Style="{StaticResource ContentPath}" />
- </Grid>
- <i:Interaction.Triggers>
- <i:EventTrigger EventName="Checked">
- <i:InvokeCommandAction Command="{Binding CheckedCommand}" CommandParameter="ListBox" />
- </i:EventTrigger>
- </i:Interaction.Triggers>
- </RadioButton>
- <RadioButton>
- <Grid>
- <Path Data="M1.5 2C0.947715 2 0.5 2.44772 0.5 3V11V17C0.5 17.5523 0.947715 18 1.5 18H15.5C16.0523 18 16.5 17.5523 16.5 17V12H19.5C20.0523 12 20.5 11.5523 20.5 11V3C20.5 2.44772 20.0523 2 19.5 2H1.5ZM14.5 12H2.5V16H14.5V12ZM15.5 10H18.5V4H2.5V10H15.5Z" Style="{StaticResource BorderPath}" />
- <Path Data="M14.6512 8.32543C14.5714 8.41752 14.4286 8.41752 14.3488 8.32543L12.1885 5.83093C12.0763 5.7014 12.1684 5.5 12.3397 5.5L16.6603 5.5C16.8316 5.5 16.9237 5.7014 16.8115 5.83093L14.6512 8.32543Z" Style="{StaticResource ContentPath}" />
- </Grid>
- <i:Interaction.Triggers>
- <i:EventTrigger EventName="Checked">
- <i:InvokeCommandAction Command="{Binding CheckedCommand}" CommandParameter="Combox" />
- </i:EventTrigger>
- </i:Interaction.Triggers>
- </RadioButton>
- <RadioButton>
- <Grid>
- <Path Data="M18 4H3C2.72386 4 2.5 4.22386 2.5 4.5V15.5C2.5 15.7761 2.72386 16 3 16H18C18.2761 16 18.5 15.7761 18.5 15.5V4.5C18.5 4.22386 18.2761 4 18 4ZM3 2C1.61929 2 0.5 3.11929 0.5 4.5V15.5C0.5 16.8807 1.61929 18 3 18H18C19.3807 18 20.5 16.8807 20.5 15.5V4.5C20.5 3.11929 19.3807 2 18 2H3Z" Style="{StaticResource BorderPath}" />
- <Path Data="M7.07715 13.1714C8.98438 13.1714 10.2017 11.8926 10.2017 9.83154V9.82275C10.2017 7.76611 8.97998 6.4873 7.07715 6.4873C5.16992 6.4873 3.94824 7.76611 3.94824 9.82275V9.83154C3.94824 11.8926 5.16113 13.1714 7.07715 13.1714ZM7.07715 11.8354C6.17627 11.8354 5.5874 11.0532 5.5874 9.83154V9.82275C5.5874 8.60547 6.18506 7.82324 7.07715 7.82324C7.96484 7.82324 8.55811 8.60547 8.55811 9.82275V9.83154C8.55811 11.0532 7.96484 11.8354 7.07715 11.8354Z" Style="{StaticResource ContentPath}" />
- <Path Data="M11.4014 13H13.0142V11.207L13.5723 10.4995L15.1719 13H17.0659L14.7456 9.45801L16.9385 6.65869H15.207L13.0977 9.3833H13.0142V6.65869H11.4014V13Z" Style="{StaticResource ContentPath}" />
- </Grid>
- <i:Interaction.Triggers>
- <i:EventTrigger EventName="Checked">
- <i:InvokeCommandAction Command="{Binding CheckedCommand}" CommandParameter="Button" />
- </i:EventTrigger>
- </i:Interaction.Triggers>
- </RadioButton>
- <RadioButton>
- <Grid>
- <Path Data="M7.08813 17.4917C8.62427 17.4917 9.82397 16.584 10.6047 15.0605H20.5V13.7529H11.1316C11.4363 12.7754 11.614 11.6328 11.6584 10.376C12.0583 10.2935 12.4773 10.2427 12.8962 10.2427C13.0422 10.2427 13.1248 10.3125 13.1248 10.4141C13.1248 10.8901 12.801 11.2964 12.801 11.9058C12.801 12.4771 13.22 12.8516 13.8103 12.8516C14.4691 12.8516 15.1903 12.3652 15.808 11.8576L16.1336 11.5815L16.6994 11.0837C16.9478 10.8698 17.1384 10.7251 17.2444 10.7251C17.3279 10.7251 17.3739 10.8248 17.4151 10.9782L17.5009 11.343L17.5572 11.5536C17.7076 12.0547 18.0105 12.5977 18.8821 12.5977C19.0167 12.5977 19.2501 12.5309 19.5822 12.3973L19.8911 12.2664L20.2483 12.1028L19.988 10.8015L19.6787 10.9419L19.4291 11.0471L19.2391 11.1173C19.1591 11.1436 19.1014 11.1567 19.0662 11.1567C18.9293 11.1567 18.8686 10.996 18.8206 10.7645L18.739 10.3152C18.6308 9.74942 18.4286 9.10645 17.6252 9.10645C17.0135 9.10645 16.3006 9.62197 15.7085 10.113L15.3988 10.3751L15.1211 10.6129C14.8619 10.832 14.6627 10.9854 14.5593 10.9854C14.5022 10.9854 14.4768 10.96 14.4768 10.8901C14.4768 10.8351 14.4923 10.7667 14.513 10.6887L14.5802 10.4293C14.6009 10.3358 14.6165 10.2363 14.6165 10.1348C14.6165 9.32861 14.0325 8.84619 13.0803 8.84619C12.5916 8.84619 12.1091 8.89062 11.6394 8.97949C11.4109 5.53906 9.68433 3 7.24683 3C5.39966 3 4.10474 4.40918 4.10474 6.37061C4.10474 8.51611 5.46313 10.3125 6.94849 11.4805C6.23755 12.1978 5.69165 12.9849 5.35522 13.7529H0.5V15.0605H5.0061C4.99341 15.1621 4.98706 15.2573 4.98706 15.3589C4.98706 16.6602 5.72339 17.4917 7.08813 17.4917ZM7.99585 10.5791C6.79614 9.65234 5.50122 8.23047 5.50122 6.35791C5.50122 5.22168 6.21851 4.40283 7.25317 4.40283C8.94165 4.40283 10.1477 6.5293 10.262 9.354C9.43042 9.65869 8.6687 10.0776 7.99585 10.5791ZM9.6272 13.7529H6.95483C7.24048 13.2642 7.64673 12.7563 8.14185 12.2866L8.77184 12.6472L9.7795 11.787C9.53409 11.6419 9.35213 11.5186 9.23364 11.417C9.54468 11.2139 9.8811 11.0234 10.2302 10.8584C10.1477 11.9565 9.93823 12.9404 9.6272 13.7529ZM1.39772 12.855L2.32079 11.9319L3.24386 12.855L3.99606 12.1028L3.07616 11.1829L3.99606 10.263L3.24386 9.5108L2.32079 10.4339L1.39673 9.51616L0.647705 10.2652L1.57177 11.1829L0.648698 12.106L1.39772 12.855ZM7.25317 16.0952C6.73267 16.0952 6.45972 15.7461 6.45972 15.2192C6.45972 15.1685 6.46606 15.1177 6.47241 15.0605H8.948C8.47192 15.7144 7.89429 16.0952 7.25317 16.0952Z" Style="{StaticResource BorderPath}" />
- </Grid>
- <i:Interaction.Triggers>
- <i:EventTrigger EventName="Checked">
- <i:InvokeCommandAction Command="{Binding CheckedCommand}" CommandParameter="Sign" />
- </i:EventTrigger>
- </i:Interaction.Triggers>
- </RadioButton>
- <Separator
- Width="1"
- Height="16"
- Margin="4,0"
- BorderBrush="{StaticResource color.sys.layout.divider}"
- BorderThickness="1"
- Style="{StaticResource {x:Static ToolBar.SeparatorStyleKey}}" />
- <RadioButton
- Name="BtnAlignment"
- Width="44"
- Click="BtnAlignment_Click"
- Initialized="BtnAlignment_Initialized">
- <StackPanel Orientation="Horizontal">
- <Grid>
- <Path Data="M3.5 1H1.5V19H3.5V1ZM19.5 5H5.5V9H19.5V5Z" Style="{StaticResource BorderPath}" />
- <Path Fill="{StaticResource color.icon.base.neutral.norm.lv2}">
- <Path.Data>
- <RectangleGeometry Rect="4.5 11 9 4" />
- </Path.Data>
- </Path>
- </Grid>
- <Path
- Width="12"
- Height="12"
- Margin="4,0"
- Data="M6.5 10L11.5 4H1.5L6.5 10Z"
- Fill="{StaticResource color.icon.base.neutral.norm.lv1}" />
- </StackPanel>
- <RadioButton.ContextMenu>
- <ContextMenu Name="MenuAlignment" Placement="Bottom">
- <cus:MenuItemWithPath Header="Left Alignment" Path="M2.01361 15V1H3.51361V15H2.01361ZM4.99994 4H10.9999V7H4.99994V4ZM13.9999 9H4.99994V12H13.9999V9Z" />
- <cus:MenuItemWithPath Header="Vertical Alignment" Path="M8.75006 7L8.75006 9L12.0001 9L12.0001 12L8.75006 12L8.75006 15L7.25006 15L7.25006 12L4.00006 12L4.00006 9L7.25006 9L7.25006 7L2.00006 7L2.00006 4L7.25006 4L7.25006 0.999999L8.75006 1L8.75006 4L14.0001 4L14.0001 7L8.75006 7Z" />
- <cus:MenuItemWithPath Header="Right Alignment" Path="M14.0001 1L14.0001 15L12.5001 15L12.5001 1L14.0001 1ZM11.0001 12L2.00006 12L2.00006 9L11.0001 9L11.0001 12ZM4.00006 7L11.0001 7L11.0001 4L4.00006 4L4.00006 7Z" />
- <cus:MenuItemWithPath Header="Top Alignment" Path="M15 2L1 2L1 3.5L15 3.5L15 2ZM12 5L12 11L9 11L9 5L12 5ZM7 5L7 14L4 14L4 5L7 5Z" />
- <cus:MenuItemWithPath Header="Horizontal Alignment" Path="M7 7.25L9 7.25L9 4L12 4L12 7.25L15 7.25L15 8.75L12 8.75L12 12L9 12L9 8.75L7 8.75L7 14L4 14L4 8.75L1 8.75L1 7.25L4 7.25L4 2L7 2L7 7.25Z" />
- <cus:MenuItemWithPath Header="Lower Alignment" Path="M9 2H12V11H9V2ZM4 5H7V11H4V5ZM1 14H15V12.5H1V14Z" />
- <cus:MenuItemWithPath Header="Distribute Vertical" Path="M15 12.5L1 12.5L1 14L15 14L15 12.5ZM12 9.5L4 9.5L4 6.5L12 6.5L12 9.5ZM1 2L15 2L15 3.5L1 3.5L1 2Z" />
- <cus:MenuItemWithPath Header="Distribute Horizontal" Path="M2 15V1H3.5V15H2ZM6.5 4H9.5V12H6.5V4ZM12.5 1V15H14V1H12.5Z" />
- </ContextMenu>
- </RadioButton.ContextMenu>
- </RadioButton>
- <RadioButton Name="BtnMore" Width="44" Click="BtnMore_Click" Initialized="BtnMore_Initialized">
- <StackPanel Orientation="Horizontal">
- <Grid>
- <Path
- Width="21"
- Data="M2.5 3C2.5 2.44772 2.94772 2 3.5 2H8.5C9.05228 2 9.5 2.44772 9.5 3V8C9.5 8.55228 9.05228 9 8.5 9H3.5C2.94772 9 2.5 8.55228 2.5 8V3ZM4.5 4V7H7.5V4H4.5ZM11.5 12C11.5 11.4477 11.9477 11 12.5 11H17.5C18.0523 11 18.5 11.4477 18.5 12V17C18.5 17.5523 18.0523 18 17.5 18H12.5C11.9477 18 11.5 17.5523 11.5 17V12ZM13.5 13V16H16.5V13H13.5ZM3.5 11C2.94772 11 2.5 11.4477 2.5 12V17C2.5 17.5523 2.94772 18 3.5 18H8.5C9.05228 18 9.5 17.5523 9.5 17V12C9.5 11.4477 9.05228 11 8.5 11H3.5ZM4.5 16V13H7.5V16H4.5Z"
- Stretch="None"
- Style="{StaticResource BorderPath}" />
- <Path Data="M11 5.5C11 3.29086 12.7909 1.5 15 1.5C17.2091 1.5 19 3.29086 19 5.5C19 7.70914 17.2091 9.5 15 9.5C12.7909 9.5 11 7.70914 11 5.5ZM15 3.5C13.8954 3.5 13 4.39543 13 5.5C13 6.60457 13.8954 7.5 15 7.5C16.1046 7.5 17 6.60457 17 5.5C17 4.39543 16.1046 3.5 15 3.5Z" Style="{StaticResource ContentPath}" />
- </Grid>
- <Path
- Width="12"
- Height="12"
- Margin="4,0"
- Data="M6.5 10L11.5 4H1.5L6.5 10Z"
- Fill="{StaticResource color.icon.base.neutral.norm.lv1}" />
- </StackPanel>
- <RadioButton.ContextMenu>
- <ContextMenu Name="MenuMore" Placement="Bottom">
- <MenuItem Header="Show jump number" />
- <MenuItem Header="Highlight from field" />
- <MenuItem Header="Clear form fields" />
- <MenuItem Header="Importing data" />
- <MenuItem Header="Exporting data" />
- <MenuItem Header="Automatic form recognition" />
- </ContextMenu>
- </RadioButton.ContextMenu>
- </RadioButton>
- </StackPanel>
- <Grid VerticalAlignment="Center">
- <Grid HorizontalAlignment="Right">
- <Button
- Name="BtnPreview"
- Width="57"
- Height="24"
- Margin="16,0"
- Content="Preview"
- FontSize="12"
- Style="{StaticResource Btn.cta}" />
- <Button
- Name="BtnEdit"
- Width="57"
- Height="24"
- Margin="16,0"
- Content="Edit"
- FontSize="12"
- Style="{StaticResource Btn.cta}"
- Visibility="{Binding ElementName=BtnPreview, Path=Visibility, Converter={StaticResource UnVisibleConvert}}" />
- </Grid>
- </Grid>
- </Grid>
- </UserControl>
|