Browse Source

UI-补充部分UI样式

ZhouJieSheng 2 years ago
parent
commit
839f605527

+ 0 - 3
PDF Office/App.xaml.cs

@@ -38,9 +38,6 @@ using PDF_Office.Views.FillAndSign.PropertyPanel;
 using PDF_Office.Views.PropertyPanel.ViewModular;
 using PDF_Office.Views.Dialog.HomePageToolsDialogs.HomePageBatchProcessing;
 using PDF_Office.Views.Dialog.ConverterDialogs;
-
-using PDF_Office.Helper;
-
 using PDF_Office.Views.Dialog.HomePageToolsDialogs.HomePageBatchProcessing.HomePageConverter;
 using PDF_Office.Views.EditTools.Watermark;
 using PDF_Office.Views.EditTools.Background;

+ 1 - 1
PDF Office/CustomControl/TextBoxWithTip.xaml

@@ -22,7 +22,7 @@
                                 x:Name="TextBox"
                                 IsError="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:TextBoxWithTip}, Path=IsError}"
                                 PlaceholderText="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:TextBoxWithTip}, Path=PlaceHoldText}"
-                                Text="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:TextBoxWithTip}, Path=Text}" />
+                                Text="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:TextBoxWithTip}, Path=Text, UpdateSourceTrigger=PropertyChanged}" />
                             <TextBlock
                                 Name="TbTip"
                                 Grid.Row="1"

+ 1 - 1
PDF Office/CustomControl/TextBoxWithTip.xaml.cs

@@ -61,7 +61,7 @@ namespace PDF_Office.CustomControl
 
         // 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(TextBoxWithTip), new PropertyMetadata(null));
+            DependencyProperty.Register("Text", typeof(string), typeof(TextBoxWithTip), new PropertyMetadata(""));
 
 
 

+ 11 - 6
PDF Office/Styles/TabControlStyle.xaml

@@ -110,14 +110,15 @@
         <Setter Property="KeyboardNavigation.TabNavigation" Value="Cycle" />
     </Style>
 
-    <Style x:Key="TabItem_WithUnderLineStyle" TargetType="{x:Type cus:IconAndTextTabItem}">
-        <Setter Property="Foreground" Value="Black" />
+    <!--  Design Token  -->
+    <Style x:Key="ToolbarTabs" TargetType="{x:Type cus:IconAndTextTabItem}">
+        <Setter Property="Foreground" Value="{StaticResource color.sys.text.neutral.lv2}" />
         <Setter Property="Background" Value="White" />
         <Setter Property="BorderBrush" Value="#FFACACAC" />
         <Setter Property="HorizontalContentAlignment" Value="Stretch" />
         <Setter Property="VerticalContentAlignment" Value="Stretch" />
         <Setter Property="AllowDrop" Value="True" />
-        <Setter Property="SelectedForeground" Value="Black" />
+        <Setter Property="SelectedForeground" Value="{StaticResource color.sys.text.neutral.lv1}" />
         <Setter Property="FontSize" Value="14" />
         <Setter Property="Height" Value="40" />
         <Setter Property="Template">
@@ -130,9 +131,13 @@
                         SnapsToDevicePixels="True">
                         <Border
                             x:Name="_underline"
+                            Height="3"
+                            Margin="9,0"
                             HorizontalAlignment="Stretch"
-                            BorderBrush="#FF477EDE"
-                            BorderThickness="0" />
+                            VerticalAlignment="Bottom"
+                            Background="{StaticResource color.sys.layout.accent}"
+                            CornerRadius="2"
+                            Visibility="Collapsed" />
                         <StackPanel Orientation="Horizontal">
                             <Path
                                 x:Name="NormalPathIcon"
@@ -216,7 +221,7 @@
                             </MultiDataTrigger.Conditions>
                             <Setter Property="Panel.ZIndex" Value="1" />
                             <Setter TargetName="txt" Property="Foreground" Value="{Binding SelectedForeground, RelativeSource={RelativeSource Mode=TemplatedParent}}" />
-                            <Setter TargetName="_underline" Property="BorderThickness" Value="0,0,0,2" />
+                            <Setter TargetName="_underline" Property="Visibility" Value="Visible" />
                             <Setter TargetName="SelectedIcon" Property="Visibility" Value="Collapsed" />
                             <Setter TargetName="NormalPathIcon" Property="Visibility" Value="Visible" />
                         </MultiDataTrigger>

+ 7 - 2
PDF Office/Views/BOTA/BOTAContent.xaml

@@ -18,7 +18,7 @@
             <convert:BoolToVisible x:Key="BoolToVisibleConvert" />
         </ResourceDictionary>
     </UserControl.Resources>
-    <Grid>
+    <Grid Background="{StaticResource color.sys.layout.mg}">
         <Grid.ColumnDefinitions>
             <ColumnDefinition Width="48" />
             <ColumnDefinition />
@@ -121,6 +121,11 @@
                 </i:EventTrigger>
             </i:Interaction.Triggers>
         </TabControl>
-        <ContentControl Grid.Column="1" prism:RegionManager.RegionName="{Binding BOTAContentRegionName}" />
+        <Border
+            Grid.Column="1"
+            BorderBrush="{StaticResource color.sys.border.neutral.lv3}"
+            BorderThickness="1,0">
+            <ContentControl prism:RegionManager.RegionName="{Binding BOTAContentRegionName}" />
+        </Border>
     </Grid>
 </UserControl>

+ 7 - 4
PDF Office/Views/BottomToolContent.xaml

@@ -13,6 +13,8 @@
     d:DesignHeight="450"
     d:DesignWidth="1280"
     prism:ViewModelLocator.AutoWireViewModel="True"
+    BorderBrush="{StaticResource color.sys.layout.divider}"
+    BorderThickness="0,1,0,0"
     mc:Ignorable="d">
     <UserControl.Resources>
         <Style x:Key="Radion_ButtonStyle" TargetType="{x:Type RadioButton}">
@@ -51,7 +53,7 @@
             </Setter>
         </Style>
     </UserControl.Resources>
-    <Grid Height="32">
+    <Grid Height="32" Background="{StaticResource color.sys.layout.mg}">
         <Grid.ColumnDefinitions>
             <ColumnDefinition Width="*" />
             <ColumnDefinition Width="auto" MinWidth="{Binding ElementName=StkPnlCenter, Path=ActualWidth}" />
@@ -181,8 +183,9 @@
                 Height="24"
                 Margin="4"
                 Command="{Binding SetViewModeCommand}"
+                Cursor="Hand"
                 IsChecked="{Binding IsDoubleView}"
-                Style="{StaticResource Radion_ButtonStyle}" Cursor="Hand">
+                Style="{StaticResource Radion_ButtonStyle}">
                 <Path Data="M0,15 L0,1 L11.807106,1 L16,5.39289312 L16,15 L0,15 Z M7.5,2 L1,2 L1,14 L7.5,14 L7.5,2 Z M10.999,2 L8.5,2 L8.5,14 L15,14 L15,5.999 L10.999999,6 L10.999,2 Z M11.999,2.64 L11.999,5 L14.236,4.999 L11.999,2.64 Z" Fill="Black" />
             </RadioButton>
             <RadioButton
@@ -208,8 +211,8 @@
                 Width="24"
                 Height="24"
                 Margin="4"
-                 IsChecked="{Binding IsShowViewModular}"
-                Command="{Binding ShowViewModularCommand}" />
+                Command="{Binding ShowViewModularCommand}"
+                IsChecked="{Binding IsShowViewModular}" />
             <StackPanel
                 Height="16"
                 FocusVisualStyle="{x:Null}"

+ 3 - 2
PDF Office/Views/MainWindow.xaml

@@ -41,7 +41,7 @@
                                     Height="34"
                                     Margin="4,6,0,2"
                                     BorderBrush="{StaticResource color.sys.border.neutral.lv3}"
-                                    BorderThickness="0,0,0,1"
+                                    BorderThickness="0"
                                     CornerRadius="4,4,0,0"
                                     WindowChrome.IsHitTestVisibleInChrome="True">
                                     <Grid>
@@ -110,8 +110,9 @@
                             </Grid>
                             <ControlTemplate.Triggers>
                                 <Trigger Property="IsSelected" Value="True">
-                                    <Setter TargetName="Title" Property="Background" Value="{StaticResource color.sys.border.neutral.lv3}" />
+                                    <Setter TargetName="Title" Property="Background" Value="{StaticResource color.sys.layout.mg}" />
                                     <Setter Property="Foreground" Value="{StaticResource color.sys.text.neutral.lv1}" />
+                                    <Setter TargetName="Title" Property="BorderThickness" Value="0,0,0,1" />
                                 </Trigger>
                                 <Trigger Property="IsSelected" Value="False">
                                     <Setter TargetName="Title" Property="Background" Value="TransParent" />

+ 20 - 15
PDF Office/Views/ViewContent.xaml

@@ -36,7 +36,7 @@
         </ResourceDictionary>
     </UserControl.Resources>
 
-    <Grid>
+    <Grid Background="{StaticResource color.sys.layout.mg}">
         <Grid.RowDefinitions>
             <RowDefinition Name="HeadRow" Height="40" />
             <RowDefinition Name="ToolRow" Height="40" />
@@ -119,49 +119,50 @@
                 <cus:IconAndTextTabItem
                     x:Name="TabItemAnnotation"
                     Header="注释"
-                    Style="{StaticResource TabItem_WithUnderLineStyle}">
+                    Style="{StaticResource ToolbarTabs}">
                     <Grid Grid.Row="1" Height="40" />
                 </cus:IconAndTextTabItem>
                 <cus:IconAndTextTabItem
                     x:Name="TabItemPageEdit"
                     Header="页面"
-                    Style="{StaticResource TabItem_WithUnderLineStyle}" />
+                    Style="{StaticResource ToolbarTabs}" />
                 <cus:IconAndTextTabItem
                     x:Name="TabItemConvert"
                     Header="转换"
-                    Style="{StaticResource TabItem_WithUnderLineStyle}" />
+                    Style="{StaticResource ToolbarTabs}" />
                 <cus:IconAndTextTabItem
                     x:Name="TabItemScan"
                     Header="扫描和OCR"
-                    Style="{StaticResource TabItem_WithUnderLineStyle}">
+                    Style="{StaticResource ToolbarTabs}">
                     <Grid Grid.Row="1" Height="40" />
                 </cus:IconAndTextTabItem>
                 <cus:IconAndTextTabItem
                     x:Name="TabItemEdit"
                     Height="40"
                     Header="编辑"
-                    Style="{StaticResource TabItem_WithUnderLineStyle}">
+                    Style="{StaticResource ToolbarTabs}">
                     <Grid Grid.Row="1" Height="40" />
                 </cus:IconAndTextTabItem>
                 <cus:IconAndTextTabItem
                     x:Name="TabItemForm"
                     Height="40"
                     Header="表单"
-                    Style="{StaticResource TabItem_WithUnderLineStyle}">
+                    Style="{StaticResource ToolbarTabs}">
                     <Grid Grid.Row="1" Height="40" />
                 </cus:IconAndTextTabItem>
                 <cus:IconAndTextTabItem
                     x:Name="TabItemFill"
                     Height="40"
                     Header="填写与签名"
-                    Style="{StaticResource TabItem_WithUnderLineStyle}">
+                    Style="{StaticResource ToolbarTabs}"
+                    Visibility="Collapsed">
                     <Grid Grid.Row="1" Height="40" />
                 </cus:IconAndTextTabItem>
                 <cus:IconAndTextTabItem
                     x:Name="TabItemTool"
                     Height="40"
                     Header="工具"
-                    Style="{StaticResource TabItem_WithUnderLineStyle}">
+                    Style="{StaticResource ToolbarTabs}">
                     <Grid Grid.Row="1" Height="40" />
                 </cus:IconAndTextTabItem>
                 <i:Interaction.Triggers>
@@ -172,6 +173,8 @@
             </TabControl>
         </Grid>
 
+
+
         <!--  底部工具栏  -->
         <ContentControl Grid.Row="3" prism:RegionManager.RegionName="{Binding BottomToolRegionName}" />
 
@@ -202,7 +205,7 @@
                     Width="{Binding BOTAWidth, Mode=TwoWay}"
                     MinWidth="48"
                     MaxWidth="400" />
-                <ColumnDefinition Width="12" />
+                <ColumnDefinition Width="auto" />
                 <ColumnDefinition
                     Name="ViewerColumn"
                     Width="*"
@@ -226,7 +229,7 @@
             <ContentControl prism:RegionManager.RegionName="{Binding BOTARegionName}" />
             <GridSplitter
                 Grid.Column="1"
-                Width="12"
+                Width="0"
                 FocusVisualStyle="{x:Null}"
                 ResizeBehavior="PreviousAndNext"
                 ShowsPreview="True" />
@@ -241,12 +244,14 @@
         </Grid>
 
         <!--  用于显示页面编辑、水印、背景、标记密文等功能的区域  -->
-        <ContentControl
-            Name="ContentTool"
+        <Border
             Grid.Row="{Binding GridToolRow}"
             Grid.RowSpan="{Binding GridToolRowSpan}"
-            prism:RegionManager.RegionName="{Binding ToolContentRegionName}"
-            Visibility="{Binding ToolContentVisible}" />
+            BorderBrush="{StaticResource color.sys.layout.divider}"
+            BorderThickness="0,1"
+            Visibility="{Binding ToolContentVisible}">
+            <ContentControl Name="ContentTool" prism:RegionManager.RegionName="{Binding ToolContentRegionName}" />
+        </Border>
         <cus:LoadingControl Grid.RowSpan="3" Visibility="{Binding IsLoading}" />
     </Grid>
 </UserControl>