Просмотр исходного кода

form表单-文本域 补充部分UI

ZhouJieSheng 2 лет назад
Родитель
Сommit
b64317f57f

+ 28 - 2
PDF Office/CustomControl/TextBoxEx.cs

@@ -19,8 +19,34 @@ namespace PDF_Office.CustomControl
             DefaultStyleKeyProperty.OverrideMetadata(typeof(TextBoxEx), new FrameworkPropertyMetadata(typeof(TextBoxEx)));
         }
 
-        //TextBox调用该OnApplyTemplate函数后,光标无效
-        //public override void OnApplyTemplate(){ }
+        ~TextBoxEx()
+        {
+            var btn = base.GetTemplateChild("PART_BtnClear") as Button;
+            if (btn != null)
+            {
+                //一定要取消事件挂载,否则可能无法被GC回收
+                btn.Click -= Btn_Click;
+            }
+        }
+
+        public override void OnApplyTemplate()
+        {
+            //需要配合特定的Style才可用
+            var btn = base.GetTemplateChild("PART_BtnClear") as Button;
+            if(btn!=null)
+            {
+                btn.Click += Btn_Click;
+            }
+
+            base.OnApplyTemplate();
+        }
+
+        private void Btn_Click(object sender, RoutedEventArgs e)
+        {
+            this.Text = "";
+            this.Focus();
+        }
+
         public string PlaceholderText
         {
             get { return (string)GetValue(PlaceholderTextProperty); }

+ 0 - 54
PDF Office/CustomControl/TextBoxWithClear.xaml

@@ -1,54 +0,0 @@
-<UserControl
-    x:Class="PDF_Office.CustomControl.TextBoxWithClear"
-    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
-    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
-    xmlns:cus="clr-namespace:PDF_Office.CustomControl"
-    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
-    xmlns:local="clr-namespace:PDF_Office.CustomControl"
-    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
-    d:DesignHeight="450"
-    d:DesignWidth="800"
-    mc:Ignorable="d">
-    <UserControl.Template>
-        <ControlTemplate TargetType="{x:Type UserControl}">
-            <Grid>
-                <cus:TextBoxEx
-                    x:Name="Txt"
-                    Width="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:TextBoxWithClear}, Path=Width}"
-                    Height="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:TextBoxWithClear}, Path=Height}"
-                    Padding="0,0,16,0"
-                    VerticalAlignment="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:TextBoxWithClear}, Path=VerticalAlignment}"
-                    VerticalContentAlignment="Center"
-                    CornerRadius="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:TextBoxWithClear}, Path=CornerRadius}"
-                    PlaceholderText="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:TextBoxWithClear}, Path=PlaceHolderText}"
-                    Text="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:TextBoxWithClear}, Path=Text}" />
-                <Button
-                    Name="btnClear"
-                    Width="16"
-                    Height="16"
-                    Margin="9"
-                    HorizontalAlignment="Right"
-                    VerticalAlignment="Center"
-                    Background="Transparent"
-                    BorderThickness="0"
-                    Click="Button_Click"
-                    Style="{StaticResource NoColorBtn}"
-                    Visibility="Collapsed">
-                    <Path
-                        Data="M8 15C11.866 15 15 11.866 15 8C15 4.13401 11.866 1 8 1C4.13401 1 1 4.13401 1 8C1 11.866 4.13401 15 8 15ZM11.5303 5.53038L9.06069 8L11.5303 10.4696L10.4697 11.5303L8.00002 9.06066L5.53033 11.5303L4.46967 10.4697L6.93936 8L4.46967 5.53033L5.53033 4.46967L8.00002 6.93934L10.4697 4.46971L11.5303 5.53038Z"
-                        Fill="#CED0D4"
-                        Stretch="Uniform" />
-                </Button>
-            </Grid>
-            <ControlTemplate.Triggers>
-                <Trigger Property="IsMouseOver" Value="True">
-                    <Setter TargetName="btnClear" Property="Visibility" Value="Visible" />
-                </Trigger>
-                <Trigger Property="IsFocused" Value="True">
-                    <Setter TargetName="btnClear" Property="Visibility" Value="Visible" />
-                </Trigger>
-            </ControlTemplate.Triggers>
-        </ControlTemplate>
-
-    </UserControl.Template>
-</UserControl>

+ 0 - 72
PDF Office/CustomControl/TextBoxWithClear.xaml.cs

@@ -1,72 +0,0 @@
-using PDF_Office.Helper;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Data;
-using System.Windows.Documents;
-using System.Windows.Input;
-using System.Windows.Media;
-using System.Windows.Media.Imaging;
-using System.Windows.Navigation;
-using System.Windows.Shapes;
-
-namespace PDF_Office.CustomControl
-{
-    /// <summary>
-    /// TextBoxWithClear.xaml 的交互逻辑
-    /// </summary>
-    public partial class TextBoxWithClear : UserControl
-    {
-        public TextBoxWithClear()
-        {
-            InitializeComponent();
-        }
-
-
-
-        public string PlaceHolderText
-        {
-            get { return (string)GetValue(PlaceHolderTextProperty); }
-            set { SetValue(PlaceHolderTextProperty, value); }
-        }
-
-        // Using a DependencyProperty as the backing store for PlaceHolderText.  This enables animation, styling, binding, etc...
-        public static readonly DependencyProperty PlaceHolderTextProperty =
-            DependencyProperty.Register("PlaceHolderText", typeof(string), typeof(TextBoxWithClear), new PropertyMetadata(""));
-
-
-
-        public string Text
-        {
-            get { return (string)GetValue(TextProperty); }
-            set { SetValue(TextProperty, value); }
-        }
-
-        // Using a DependencyProperty as the backing store for Text.  This enables animation, styling, binding, etc...
-        public static readonly DependencyProperty TextProperty =
-            DependencyProperty.Register("Text", typeof(string), typeof(TextBoxWithClear), new PropertyMetadata(""));
-
-        public CornerRadius CornerRadius
-        {
-            get { return (CornerRadius)GetValue(CornerRadiusProperty); }
-            set { SetValue(CornerRadiusProperty, value); }
-        }
-
-        public static readonly DependencyProperty CornerRadiusProperty =
-            DependencyProperty.Register("CornerRadius", typeof(CornerRadius), typeof(TextBoxWithClear), new PropertyMetadata(new CornerRadius(4)));
-
-        private void Button_Click(object sender, RoutedEventArgs e)
-        {
-            this.Text = "";
-            var textbox = CommonHelper.FindVisualChild<TextBoxEx>(this);
-            if(textbox!=null)
-            {
-                textbox.Focus();
-            }
-        }
-    }
-}

+ 8 - 7
PDF Office/PDF Office.csproj

@@ -207,6 +207,9 @@
     <Compile Include="CustomControl\CustomIconToggleBtn.cs" />
     <Compile Include="CustomControl\CustomImageControl.cs" />
     <Compile Include="CustomControl\DialogContent.cs" />
+    <Compile Include="CustomControl\Form\FormFieldCombox.xaml.cs">
+      <DependentUpon>FormFieldCombox.xaml</DependentUpon>
+    </Compile>
     <Compile Include="CustomControl\IconAndTextTabItem.cs" />
     <Compile Include="CustomControl\ListBoxItemToolBar.cs" />
     <Compile Include="CustomControl\MessageBoxEx.cs" />
@@ -223,9 +226,6 @@
     <Compile Include="CustomControl\SystemControl\CustomCommandAction .cs" />
     <Compile Include="CustomControl\SystemControl\RoutedEventTrigger.cs" />
     <Compile Include="CustomControl\TextBoxEx.cs" />
-    <Compile Include="CustomControl\TextBoxWithClear.xaml.cs">
-      <DependentUpon>TextBoxWithClear.xaml</DependentUpon>
-    </Compile>
     <Compile Include="CustomControl\ToastControl.xaml.cs">
       <DependentUpon>ToastControl.xaml</DependentUpon>
     </Compile>
@@ -310,6 +310,7 @@
     <Compile Include="Model\EditTools\Background\BackgroundTemplateListModel.cs" />
     <Compile Include="Model\EditTools\Watermark\WatermarkCreateModel.cs" />
     <Compile Include="Model\EditTools\Watermark\WatermarkTemplateListModel.cs" />
+    <Compile Include="Model\From\FormFieldType.cs" />
     <Compile Include="Model\PageEdit\CustomInsertModel.cs" />
     <Compile Include="Model\PageEdit\CustomPageItem.cs" />
     <Compile Include="Model\PageEdit\ExtractModel.cs" />
@@ -851,6 +852,10 @@
       <Generator>MSBuild:Compile</Generator>
       <SubType>Designer</SubType>
     </Page>
+    <Page Include="CustomControl\Form\FormFieldCombox.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
     <Page Include="CustomControl\LoadingControl.xaml">
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
@@ -867,10 +872,6 @@
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
     </Page>
-    <Page Include="CustomControl\TextBoxWithClear.xaml">
-      <SubType>Designer</SubType>
-      <Generator>MSBuild:Compile</Generator>
-    </Page>
     <Page Include="CustomControl\ToastControl.xaml">
       <Generator>MSBuild:Compile</Generator>
       <SubType>Designer</SubType>

+ 28 - 13
PDF Office/Styles/ButtonStyle.xaml

@@ -14,7 +14,10 @@
             </Setter.Value>
         </Setter>
     </Style>
-    <Style x:Key="PageEditToolBtn" BasedOn="{StaticResource TitleBarBtn}" TargetType="{x:Type Button}">
+    <Style
+        x:Key="PageEditToolBtn"
+        BasedOn="{StaticResource TitleBarBtn}"
+        TargetType="{x:Type Button}">
         <Setter Property="Background" Value="Transparent" />
         <Setter Property="BorderBrush" Value="Transparent" />
         <Setter Property="Width" Value="auto" />
@@ -22,23 +25,35 @@
         <Setter Property="Template">
             <Setter.Value>
                 <ControlTemplate TargetType="{x:Type Button}">
-                    <Border x:Name="border" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="true">
-                        <ContentPresenter x:Name="contentPresenter" Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
+                    <Border
+                        x:Name="border"
+                        Background="{TemplateBinding Background}"
+                        BorderBrush="{TemplateBinding BorderBrush}"
+                        BorderThickness="{TemplateBinding BorderThickness}"
+                        SnapsToDevicePixels="true">
+                        <ContentPresenter
+                            x:Name="contentPresenter"
+                            Margin="{TemplateBinding Padding}"
+                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
+                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
+                            Focusable="False"
+                            RecognizesAccessKey="True"
+                            SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                     </Border>
                     <ControlTemplate.Triggers>
                         <Trigger Property="IsMouseOver" Value="true">
-                            <Setter Property="Background" TargetName="border" Value="#1A000000" />
-                            <Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.MouseOver.Border}" />
+                            <Setter TargetName="border" Property="Background" Value="#1A000000" />
+                            <Setter TargetName="border" Property="BorderBrush" Value="{StaticResource Button.MouseOver.Border}" />
                         </Trigger>
                         <Trigger Property="IsPressed" Value="true">
-                            <Setter Property="Background" TargetName="border" Value="#26000000" />
-                            <Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.Pressed.Border}" />
+                            <Setter TargetName="border" Property="Background" Value="#26000000" />
+                            <Setter TargetName="border" Property="BorderBrush" Value="{StaticResource Button.Pressed.Border}" />
                         </Trigger>
                         <Trigger Property="IsEnabled" Value="false">
-                            <Setter Property="Background" TargetName="border" Value="Transparent" />
-                            <Setter Property="BorderBrush" TargetName="border" Value="#33000000" />
-                            <Setter Property="TextElement.Foreground" TargetName="contentPresenter" Value="#FF999999" />
-                            <Setter Property="Opacity" TargetName="contentPresenter" Value="0.4" />
+                            <Setter TargetName="border" Property="Background" Value="Transparent" />
+                            <Setter TargetName="border" Property="BorderBrush" Value="#33000000" />
+                            <Setter TargetName="contentPresenter" Property="TextElement.Foreground" Value="#FF999999" />
+                            <Setter TargetName="contentPresenter" Property="Opacity" Value="0.4" />
                         </Trigger>
                     </ControlTemplate.Triggers>
                 </ControlTemplate>
@@ -341,8 +356,8 @@
     </ControlTemplate>
 
     <!--
-    Style for Btn.cta
-    样式里仅设置了背景色和文字颜色变化,字体大小和控件宽度需要调用时设置
+        Style for Btn.cta
+        样式里仅设置了背景色和文字颜色变化,字体大小和控件宽度需要调用时设置
     -->
     <Style x:Key="Btn.cta" TargetType="{x:Type Button}">
         <Setter Property="FocusVisualStyle" Value="{x:Null}" />

+ 32 - 3
PDF Office/Themes/Generic.xaml

@@ -42,10 +42,11 @@
     </Style>
 
     <Style TargetType="{x:Type cus:TextBoxEx}">
-        <Setter Property="Background" Value="Transparent" />
+        <Setter Property="Background" Value="{StaticResource color.field.bg.def}" />
         <Setter Property="BorderBrush" Value="{StaticResource color.field.border.norm}" />
         <Setter Property="Foreground" Value="Black" />
         <Setter Property="BorderThickness" Value="1" />
+        <Setter Property="FocusVisualStyle" Value="{x:Null}" />
         <Setter Property="Template">
             <Setter.Value>
                 <ControlTemplate TargetType="{x:Type cus:TextBoxEx}">
@@ -69,13 +70,30 @@
 
                             <ScrollViewer
                                 x:Name="PART_ContentHost"
-                                Padding="0,1,0,0"
+                                Margin="0,0,25,0"
+                                Padding="8,1,0,0"
                                 Focusable="false"
                                 Foreground="{TemplateBinding Foreground}"
                                 HorizontalScrollBarVisibility="Hidden"
                                 SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                                 Style="{x:Null}"
                                 VerticalScrollBarVisibility="Hidden" />
+                            <Button
+                                Name="PART_BtnClear"
+                                Width="16"
+                                Height="16"
+                                Margin="9,0"
+                                HorizontalAlignment="Right"
+                                VerticalAlignment="Center"
+                                Background="Transparent"
+                                BorderThickness="0"
+                                Style="{StaticResource NoColorBtn}"
+                                Visibility="Collapsed">
+                                <Path
+                                    Data="M8 15C11.866 15 15 11.866 15 8C15 4.13401 11.866 1 8 1C4.13401 1 1 4.13401 1 8C1 11.866 4.13401 15 8 15ZM11.5303 5.53038L9.06069 8L11.5303 10.4696L10.4697 11.5303L8.00002 9.06066L5.53033 11.5303L4.46967 10.4697L6.93936 8L4.46967 5.53033L5.53033 4.46967L8.00002 6.93934L10.4697 4.46971L11.5303 5.53038Z"
+                                    Fill="#CED0D4"
+                                    Stretch="Uniform" />
+                            </Button>
                         </Grid>
 
                     </Border>
@@ -89,7 +107,18 @@
                         <Trigger Property="Text" Value="">
                             <Setter TargetName="placeholder" Property="Visibility" Value="Visible" />
                         </Trigger>
-
+                        <Trigger Property="IsMouseOver" Value="True">
+                            <Setter TargetName="PART_BtnClear" Property="Visibility" Value="Visible" />
+                        </Trigger>
+                        <MultiTrigger>
+                            <MultiTrigger.Conditions>
+                                <Condition Property="Text" Value="" />
+                                <Condition Property="IsMouseOver" Value="True" />
+                            </MultiTrigger.Conditions>
+                            <MultiTrigger.Setters>
+                                <Setter TargetName="PART_BtnClear" Property="Visibility" Value="Collapsed" />
+                            </MultiTrigger.Setters>
+                        </MultiTrigger>
                     </ControlTemplate.Triggers>
                 </ControlTemplate>
             </Setter.Value>

+ 0 - 5
PDF Office/Views/Form/FormsToolContent.xaml

@@ -49,11 +49,6 @@
                         <i:InvokeCommandAction Command="{Binding CheckedCommand}" CommandParameter="Text" />
                     </i:EventTrigger>
                 </i:Interaction.Triggers>
-                <RadioButton.IsChecked>
-                    <MultiBinding StringFormat="{}}">
-                        <Binding Path="Person.Name"/>
-                    </MultiBinding>
-                </RadioButton.IsChecked>
             </RadioButton>
             <RadioButton>
                 <Grid>

+ 71 - 12
PDF Office/Views/Form/TextFieldProperty.xaml

@@ -5,9 +5,10 @@
     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.CustomControl.Form"
     xmlns:local="clr-namespace:PDF_Office.Views.Form"
     xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
-    d:DesignHeight="450"
+    d:DesignHeight="750"
     d:DesignWidth="260"
     Background="{StaticResource color.sys.layout.mg}"
     mc:Ignorable="d">
@@ -20,6 +21,11 @@
                 <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>
             <ControlTemplate x:Key="Segmented" TargetType="{x:Type TabItem}">
                 <Grid x:Name="templateRoot" SnapsToDevicePixels="True">
                     <Border
@@ -371,16 +377,19 @@
                         Margin="0,18,0,10"
                         Style="{StaticResource PropertyHeaderLv2}"
                         Text="Name" />
-                    <cus:TextBoxWithClear
-                        Height="32"
-                        VerticalAlignment="Center"
-                        CornerRadius="4" />
-                    <TextBlock />
-                    <TextBox />
-                    <TextBlock />
-                    <ComboBox />
-                    <CheckBox />
-                    <CheckBox />
+                    <cus:TextBoxEx Height="32" CornerRadius="4" />
+                    <TextBlock
+                        Margin="0,18,0,10"
+                        Style="{StaticResource PropertyHeaderLv2}"
+                        Text="ToolTip" />
+                    <cus:TextBoxEx Height="32" CornerRadius="4" />
+                    <TextBlock
+                        Margin="0,18,0,10"
+                        Style="{StaticResource PropertyHeaderLv2}"
+                        Text="Form Field" />
+                    <form:FormFieldCombox Height="32" Margin="0,8,0,16" />
+                    <CheckBox Content="Read Only" />
+                    <CheckBox Margin="0,8" Content="Required field" />
                 </StackPanel>
             </TabItem>
             <TabItem>
@@ -394,7 +403,57 @@
                 <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 IsEnabled="{Binding ElementName=ChkLock, Path=IsChecked, Converter={StaticResource InvertBoolConvert}}" />
+                <StackPanel IsEnabled="{Binding ElementName=ChkLock, Path=IsChecked, Converter={StaticResource InvertBoolConvert}}">
+                    <TextBlock
+                        Margin="0,18,0,10"
+                        Style="{StaticResource PropertyHeaderLv2}"
+                        Text="Projects" />
+                    <Grid>
+                        <cus:TextBoxEx
+                            Width="188"
+                            Height="32"
+                            HorizontalAlignment="Left"
+                            CornerRadius="4" />
+                        <Button
+                            Width="32"
+                            HorizontalAlignment="Right"
+                            Style="{StaticResource btn.sec-icon}">
+                            <Path Data="M7.25 8.75V14H8.75V8.75H14V7.25H8.75V2H7.25V7.25H2V8.75H7.25Z" />
+                        </Button>
+                    </Grid>
+                    <TextBlock
+                        Margin="0,18,0,10"
+                        Style="{StaticResource PropertyHeaderLv2}"
+                        Text="Exported Values" />
+                    <cus:TextBoxEx Height="32" CornerRadius="4" />
+                    <ListBox Height="98" Margin="0,8" />
+                    <StackPanel Margin="0,0,0,8" Orientation="Horizontal">
+                        <Button
+                            Width="32"
+                            Height="32"
+                            Style="{StaticResource btn.sec-icon}">
+                            <Path Data="M6 1.75H10V0.25H6V1.75ZM1 4.25H2.25V15C2.25 15.4142 2.58579 15.75 3 15.75H13C13.4142 15.75 13.75 15.4142 13.75 15V4.25H15V2.75H1V4.25ZM3.75 14.25V4.25H12.25V14.25H3.75ZM7.25 6.5V11.5H8.75V6.5H7.25Z" />
+                        </Button>
+                        <Button
+                            Width="32"
+                            Height="32"
+                            Margin="8,0"
+                            Style="{StaticResource btn.sec-icon}">
+                            <Path Data="M8.72505 12.4147L8.72505 1.02539L7.22505 1.02539L7.22505 12.4147L4.9054 10.0951L3.84474 11.1557L7.44471 14.7557C7.7376 15.0486 8.21248 15.0486 8.50537 14.7557L12.1053 11.1557L11.0447 10.0951L8.72505 12.4147Z" />
+                        </Button>
+                        <Button
+                            Width="32"
+                            Height="32"
+                            Style="{StaticResource btn.sec-icon}">
+                            <Path Data="M8.77509 3.58605L11.0947 5.9057L12.1554 4.84504L8.55542 1.24506C8.26253 0.952167 7.78765 0.952167 7.49476 1.24506L3.89478 4.84504L4.95544 5.9057L7.27509 3.58605L7.27509 14.9754L8.77509 14.9754L8.77509 3.58605Z" />
+                        </Button>
+                    </StackPanel>
+                    <CheckBox Margin="0,8,0,4" Content="Sort Items" />
+                    <CheckBox Margin="0,4" Content="Allow users to enter custom text" />
+                    <CheckBox Margin="0,4">
+                        <TextBlock Text="Submit the selected value immediately" TextWrapping="Wrap" />
+                    </CheckBox>
+                </StackPanel>
             </TabItem>
 
         </TabControl>