123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329 |
- <UserControl x:Class="PDF_Master.Views.Form.CheckBoxProperty"
- 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:PDF_Master.Views.Form"
- xmlns:prism="http://prismlibrary.com/"
- prism:ViewModelLocator.AutoWireViewModel="True"
- xmlns:CompositeControl="clr-namespace:PDF_Master.CustomControl.CompositeControl"
- xmlns:convert="clr-namespace:PDF_Master.DataConvert"
- xmlns:form="clr-namespace:PDF_Master.CustomControl.Form"
- xmlns:cus="clr-namespace:PDF_Master.CustomControl"
- xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
- mc:Ignorable="d"
- d:DesignHeight="450" d:DesignWidth="800">
- <UserControl.Resources>
- <ResourceDictionary>
- <ResourceDictionary.MergedDictionaries>
- <ResourceDictionary Source="../../Styles/ListViewStyle.xaml" />
- <ResourceDictionary Source="../../Styles/SliderStyle.xaml"/>
- </ResourceDictionary.MergedDictionaries>
- <convert:InvertBoolConvert x:Key="InvertBoolConvert" />
- <Style TargetType="{x:Type TabItem}">
- <Setter Property="Width" Value="74.67 " />
- <Setter Property="Height" Value="28" />
- <Setter Property="BorderThickness" Value="0" />
- <Setter Property="Template" Value="{DynamicResource Segmented}" />
- </Style>
- <Style TargetType="{x:Type Path}">
- <Setter Property="Width" Value="16" />
- <Setter Property="Height" Value="16" />
- <Setter Property="Fill" Value="{StaticResource color.icon.base.neutral.norm.lv1}" />
- </Style>
- <DataTemplate x:Key="ContentColorTemplate">
- <Grid Width="84" Height="24">
- <Rectangle Stroke="Red" StrokeThickness="1"/>
- <TextBlock Text="Text"/>
- </Grid>
- </DataTemplate>
- <ContextMenu x:Key="ColorBtnFlyoutMenu" 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="EditMenuItem"
- Click="EditMenuItem_Click"
- Header="Edit"
- IsEnabled="True" />
- </ContextMenu>
- </ResourceDictionary>
- </UserControl.Resources>
- <Grid ScrollViewer.VerticalScrollBarVisibility="Auto">
- <Grid.RowDefinitions>
- <RowDefinition Height="auto" />
- <RowDefinition Height="*" />
- <RowDefinition Height="auto" />
- </Grid.RowDefinitions>
- <TextBlock
- Margin="16,14"
- FontFamily="Segoe UI"
- FontSize="14"
- FontWeight="SemiBold"
- Text="ChekcBox" />
- <TabControl
- Grid.Row="1"
- Margin="16,0"
- Padding="0"
- Background="Transparent"
- BorderThickness="0"
- Style="{DynamicResource FormTabControl}">
- <TabItem>
- <TabItem.Header>
- <Path Data="M8.33337 2.75704L3.19495 4.5L8.33337 6.24296L9.93268 5.70047L10.7558 5.42127L11.2376 6.84178L10.4145 7.12098L8.76831 7.67937C8.49068 7.77354 8.17606 7.77354 7.89843 7.67937L1.31361 5.44579C0.999461 5.33923 0.583374 5.03874 0.583374 4.5C0.583374 3.96126 0.999461 3.66077 1.31361 3.55421L7.89843 1.32063C8.17606 1.22646 8.49068 1.22646 8.76831 1.32063L15.3531 3.55421C15.6673 3.66077 16.0834 3.96126 16.0834 4.5C16.0834 5.03874 15.6673 5.33923 15.3531 5.44579L14.53 5.72499L13.7069 6.00419L13.2251 4.58368L13.4718 4.5L8.33337 2.75704ZM8.33337 9.74993L15.1244 7.7797L15.5423 9.2203L8.7427 11.193C8.48085 11.269 8.1859 11.269 7.92405 11.193L1.1244 9.2203L1.54235 7.7797L8.33337 9.74993ZM15.1244 11.2797L8.33337 13.2499L1.54235 11.2797L1.1244 12.7203L7.92405 14.693C8.1859 14.769 8.48085 14.769 8.7427 14.693L15.5423 12.7203L15.1244 11.2797Z" Fill="{StaticResource color.light.gray.11}" />
- </TabItem.Header>
- <StackPanel Background="Transparent" IsEnabled="{Binding ElementName=ChkLock, Path=IsChecked, Converter={StaticResource InvertBoolConvert}}">
- <TextBlock
- Margin="0,18,0,10"
- Style="{StaticResource PropertyHeaderLv2}"
- Text="Name" />
- <cus:TextBoxEx x:Name="TbName" Height="32" CornerRadius="4" Text="{Binding FieldName,Mode=TwoWay}" >
- <i:Interaction.Triggers>
- <i:EventTrigger EventName="TextChanged">
- <i:InvokeCommandAction Command="{Binding FieldNameTextChangedCommand}" CommandParameter="{Binding ElementName=TbName,Path=Text}"/>
- </i:EventTrigger>
- </i:Interaction.Triggers>
- </cus:TextBoxEx>
- <TextBlock
- Margin="0,18,0,10"
- Style="{StaticResource PropertyHeaderLv2}"
- Text="ToolTip" />
- <cus:TextBoxEx x:Name="TbToolTip" Height="32" CornerRadius="4" Text="{Binding ToolTipStr,Mode=TwoWay}">
- <i:Interaction.Triggers>
- <i:EventTrigger EventName="TextChanged">
- <i:InvokeCommandAction Command="{Binding ToolTipTextChangedCommand}" CommandParameter="{Binding ElementName=TbToolTip,Path=Text}"/>
- </i:EventTrigger>
- </i:Interaction.Triggers>
- </cus:TextBoxEx>
- <TextBlock
- Margin="0,18,0,10"
- Style="{StaticResource PropertyHeaderLv2}"
- Text="Form Field" />
- <form:FormFieldCombox x:Name="formCombox" Type="{Binding FormField,Mode=TwoWay}" Height="32" Margin="0,8,0,16" />
- <CheckBox x:Name="ReadOnlyCheckBox" Content="Read Only" IsChecked="{Binding IsReadOnly,Mode=TwoWay}"/>
- <CheckBox x:Name="RequiredFieldCheckBox" Margin="0,8" Content="Required field" IsChecked="{Binding IsRequiredField,Mode=TwoWay}" />
- </StackPanel>
- </TabItem>
- <TabItem>
- <TabItem.Header>
- <Path Data="M2.5 2.5V4.5H10.5V2.5H2.5ZM2 1C1.44772 1 1 1.44772 1 2V5C1 5.55228 1.44771 6 2 6H11C11.5523 6 12 5.55228 12 5V3.75H13.25V6.58333H8.4C7.76487 6.58333 7.25 7.09821 7.25 7.73333V9H7C6.44772 9 6 9.44772 6 10V14C6 14.5523 6.44772 15 7 15H9C9.55228 15 10 14.5523 10 14V10C10 9.44772 9.55228 9 9 9H8.75V8.08333H13.6C14.2351 8.08333 14.75 7.56846 14.75 6.93333V3.4C14.75 2.76487 14.2351 2.25 13.6 2.25H12V2C12 1.44772 11.5523 1 11 1H2ZM7.50018 13.4998V10.5002H8.49982V13.4998H7.50018Z" Fill="{StaticResource color.light.gray.11}" />
- </TabItem.Header>
- <Grid IsEnabled="{Binding ElementName=ChkLock, Path=IsChecked, Converter={StaticResource InvertBoolConvert}}" >
- <StackPanel>
- <StackPanel>
- <TextBlock
- Margin="0,18,0,10"
- Style="{StaticResource PropertyHeaderLv2}"
- Text="Set Color" />
- <Grid Height="50" >
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="*"/>
- <ColumnDefinition Width="*"/>
- <ColumnDefinition Width="*"/>
- <ColumnDefinition Width="*"/>
- </Grid.ColumnDefinitions>
- <RadioButton x:Name="OneBtn" BorderThickness="1" Width="30" Height="30" Grid.Column="0" Tag="One"
- Style="{StaticResource BlueBorderRadionButtonWithCorner}" Padding="3"
- ContextMenu="{StaticResource ColorBtnFlyoutMenu}"
- >
- <Grid Width="24" Height="24">
- <Rectangle Fill="{Binding ResetColorOne.FillColor}" Stroke="{Binding ResetColorOne.BorderColor}" StrokeThickness="1" VerticalAlignment="Stretch"/>
- <Path Data="M14 1.16054L6.56104 11.5684C6.38232 11.8184 6.09789 11.9761 5.78699 11.9975C5.4761 12.0189 5.17196 11.9017 4.9593 11.6785L0 6.47462L1.51064 5.09378L5.59965 9.38448L12.3072 0L14 1.16054Z"
- Fill="{Binding ResetColorOne.FontColor}"/>
- </Grid>
- <i:Interaction.Triggers>
- <i:EventTrigger EventName="Checked">
- <i:InvokeCommandAction Command="{Binding ResetColorCheckedBtnCommand}" CommandParameter="{Binding ElementName=OneBtn,Path=Tag}"/>
- </i:EventTrigger>
- </i:Interaction.Triggers>
- </RadioButton>
- <RadioButton x:Name="TwoBtn" BorderThickness="1" Width="30" Height="30" Grid.Column="1" Tag="Two"
- Style="{StaticResource BlueBorderRadionButtonWithCorner}"
- ContextMenu="{StaticResource ColorBtnFlyoutMenu}"
- >
- <Grid Width="24" Height="24">
- <Rectangle Fill="{Binding ResetColorTwo.FillColor}" Stroke="{Binding ResetColorTwo.BorderColor}" StrokeThickness="1" VerticalAlignment="Stretch"/>
- <Path Data="M14 1.16054L6.56104 11.5684C6.38232 11.8184 6.09789 11.9761 5.78699 11.9975C5.4761 12.0189 5.17196 11.9017 4.9593 11.6785L0 6.47462L1.51064 5.09378L5.59965 9.38448L12.3072 0L14 1.16054Z"
- Fill="{Binding ResetColorTwo.FontColor}"/>
- </Grid>
- <i:Interaction.Triggers>
- <i:EventTrigger EventName="Checked">
- <i:InvokeCommandAction Command="{Binding ResetColorCheckedBtnCommand}" CommandParameter="{Binding ElementName=TwoBtn,Path=Tag}"/>
- </i:EventTrigger>
- </i:Interaction.Triggers>
- </RadioButton>
- <RadioButton x:Name="ThreeBtn" BorderThickness="1" Width="30" Height="30" Grid.Column="2" Tag="Three"
- Style="{StaticResource BlueBorderRadionButtonWithCorner}"
- ContextMenu="{StaticResource ColorBtnFlyoutMenu}"
- >
- <Grid Width="24" Height="24">
- <Rectangle Fill="{Binding ResetColorThree.FillColor}" Stroke="{Binding ResetColorThree.BorderColor}" StrokeThickness="1" VerticalAlignment="Stretch"/>
- <Path Data="M14 1.16054L6.56104 11.5684C6.38232 11.8184 6.09789 11.9761 5.78699 11.9975C5.4761 12.0189 5.17196 11.9017 4.9593 11.6785L0 6.47462L1.51064 5.09378L5.59965 9.38448L12.3072 0L14 1.16054Z"
- Fill="{Binding ResetColorThree.FontColor}"/>
- </Grid>
- <i:Interaction.Triggers>
- <i:EventTrigger EventName="Checked">
- <i:InvokeCommandAction Command="{Binding ResetColorCheckedBtnCommand}" CommandParameter="{Binding ElementName=ThreeBtn,Path=Tag}"/>
- </i:EventTrigger>
- </i:Interaction.Triggers>
- </RadioButton>
- <RadioButton x:Name="ForthBtn" BorderThickness="1" Width="30" Height="30" Grid.Column="3" Tag="Forth"
- Style="{StaticResource BlueBorderRadionButtonWithCorner}"
- ContextMenu="{StaticResource ColorBtnFlyoutMenu}"
- >
- <Grid Width="24" Height="24">
- <Rectangle Fill="{Binding ResetColorForth.FillColor}" Stroke="{Binding ResetColorForth.BorderColor}" StrokeThickness="1" VerticalAlignment="Stretch"/>
- <Path Data="M14 1.16054L6.56104 11.5684C6.38232 11.8184 6.09789 11.9761 5.78699 11.9975C5.4761 12.0189 5.17196 11.9017 4.9593 11.6785L0 6.47462L1.51064 5.09378L5.59965 9.38448L12.3072 0L14 1.16054Z"
- Fill="{Binding ResetColorForth.FontColor}"/>
- </Grid>
- <i:Interaction.Triggers>
- <i:EventTrigger EventName="Checked">
- <i:InvokeCommandAction Command="{Binding ResetColorCheckedBtnCommand}" CommandParameter="{Binding ElementName=ForthBtn,Path=Tag}"/>
- </i:EventTrigger>
- </i:Interaction.Triggers>
- </RadioButton>
- </Grid>
- </StackPanel>
- <StackPanel>
- <TextBlock
- Margin="0,18,0,10"
- Style="{StaticResource PropertyHeaderLv2}"
- Text="Line" />
- <CompositeControl:SlidComboControl x:Name="thickness" Value="{Binding BorderThiness,Mode=TwoWay}"/>
- <StackPanel
- x:Name="PnlLineStyle"
- Margin="0,20,0,0"
- Orientation="Horizontal">
- <cus:CustomIconToggleBtn
- x:Name="BtnSolidLine"
- Width="110"
- Height="32"
- Click="BtnLineStyle_Click"
- Command="{Binding LineStyleCommand}"
- CommandParameter="{Binding ElementName=BtnSolidLine, Path=Tag}"
- Style="{StaticResource ToggleBtnViewModeStyle}" IsChecked="{Binding IsSolid}"
- Tag="Solid">
- <Border
- Width="108"
- Height="30"
- Padding="8,0,8,0"
- BorderBrush="Black"
- BorderThickness="1">
- <Line
- Stroke="Black"
- StrokeThickness="2"
- X1="10"
- X2="260"
- Y1="15"
- Y2="15" />
- </Border>
- </cus:CustomIconToggleBtn>
- <cus:CustomIconToggleBtn
- x:Name="BtnDottedLine"
- Width="110"
- Height="32"
- Click="BtnLineStyle_Click"
- Command="{Binding LineStyleCommand}"
- CommandParameter="{Binding ElementName=BtnDottedLine, Path=Tag}"
- Style="{StaticResource ToggleBtnViewModeStyle}" IsChecked="{Binding IsSolid,Converter={StaticResource InvertBoolConvert}}"
- Tag="Dotted">
- <Border
- Width="108"
- Height="30"
- Padding="8,0,8,0"
- BorderBrush="Black"
- BorderThickness="1">
- <Line
- Stroke="Black"
- StrokeDashArray="2"
- StrokeThickness="2"
- X1="10"
- X2="260"
- Y1="15"
- Y2="15" />
- </Border>
- </cus:CustomIconToggleBtn>
- </StackPanel>
- </StackPanel>
- <StackPanel>
- <TextBlock
- Margin="0,18,0,10"
- Style="{StaticResource PropertyHeaderLv2}"
- Text="大小" />
- <StackPanel Orientation="Horizontal">
- <Path Data="M12.9999 8.75012V10.8285L15.8284 8.00006L12.9999 5.17163V7.25012H2.82843V5.17175L0 8.00017L2.82843 10.8286V8.75012H12.9999Z" Fill="#616469"/>
- <cus:NumericUpDown Height="32" Width="90" Value="{Binding WidthSize,Mode=TwoWay}"/>
- <Path Data="M10.8284 2.82843H8.74999L8.74999 12.9999H10.8285L8.00005 15.8284L5.17163 12.9999H7.24999L7.24999 2.82843H5.17151L7.99994 0L10.8284 2.82843Z" Fill="#616469"/>
- <cus:NumericUpDown Height="32" Width="90" Value="{Binding HeightSize,Mode=TwoWay}"/>
- </StackPanel>
- </StackPanel>
- </StackPanel>
- </Grid>
- </TabItem>
- <TabItem>
- <TabItem.Header>
- <Path Data="M4.91675 3.75V5H6.41675V1H4.91675V2.25H1.66675V3.75H4.91675ZM15.6667 3.75L7.66675 3.75V2.25L15.6667 2.25V3.75ZM1.66675 7.25V8.75H8.91675V10H10.4167V6H8.91675V7.25H1.66675ZM15.6667 8.75L11.6667 8.75V7.25L15.6667 7.25V8.75ZM7.66675 12.25V13.75L15.6667 13.75V12.25L7.66675 12.25ZM4.91675 13.75H1.66675V12.25H4.91675V11H6.41675V15H4.91675V13.75Z" Fill="{StaticResource color.light.gray.11}" />
- </TabItem.Header>
- <Grid>
- <StackPanel IsEnabled="{Binding ElementName=ChkLock, Path=IsChecked, Converter={StaticResource InvertBoolConvert}}">
- <TextBlock Text="Default Value"/>
- <cus:TextBoxEx x:Name="DefaultValueBox" Height="32" CornerRadius="4" Text="{Binding ExportedValues,Mode=TwoWay}" >
- <i:Interaction.Triggers>
- <i:EventTrigger EventName="TextChanged">
- <i:InvokeCommandAction Command="{Binding ExportedValuesTextChangedCommand}" CommandParameter="{Binding ElementName=DefaultValueBox,Path=Text}"/>
- </i:EventTrigger>
- </i:Interaction.Triggers>
- </cus:TextBoxEx>
- <CheckBox x:Name="DefaultCheckBox" Content="The checkbox is checked by default" IsChecked="{Binding IsDefaultCheckBox}"/>
- </StackPanel>
- </Grid>
- </TabItem>
- </TabControl>
- <Border
- Grid.Row="2"
- BorderBrush="{StaticResource color.sys.layout.divider}"
- BorderThickness="0,1,0,0">
- <CheckBox
- Name="ChkLock"
- Margin="16"
- Content="Locked" IsChecked="{Binding IsLocked,Mode=TwoWay}"/>
- </Border>
- </Grid>
- </UserControl>
|