Browse Source

其他-调整窗体标题背景色、调整属性面板显示逻辑

ZhouJieSheng 2 years ago
parent
commit
4d47858fe5

+ 10 - 0
PDF Office/ViewModels/Tools/AnnotToolContentViewModel.cs

@@ -483,6 +483,7 @@ namespace PDF_Office.ViewModels.Tools
                     PDFViewer.SetToolParam(annotArgs);
                    
                 }
+                ShowPropertyPanel();
             }
 
             else
@@ -517,6 +518,15 @@ namespace PDF_Office.ViewModels.Tools
 
             }
         }
+
+        /// <summary>
+        /// 展开显示属性面板
+        /// </summary>
+        private void ShowPropertyPanel(bool show=true)
+        {
+            viewContentViewModel.IsPropertyOpen = show;
+        }
+
     }
    
 }

+ 14 - 0
PDF Office/ViewModels/ViewContentViewModel.cs

@@ -118,6 +118,20 @@ namespace PDF_Office.ViewModels
             }
         }
 
+        private bool isPorpertyOpen = false;
+        /// <summary>
+        /// 属性栏是否展开
+        /// </summary>
+        public bool IsPropertyOpen
+        {
+            get { return isPorpertyOpen; }
+            set
+            {
+                SetProperty(ref isPorpertyOpen, value);
+            }
+        }
+
+
         private bool canSave;
         /// <summary>
         /// 是否可以保存

+ 11 - 5
PDF Office/Views/MainWindow.xaml

@@ -36,13 +36,13 @@
                                 <Border
                                     x:Name="Title"
                                     Width="184"
-                                    Height="28"
-                                    Margin="4,0,0,2"
+                                    Height="34"
+                                    Margin="4,6,0,2"
                                     BorderBrush="#A0A2AE"
                                     BorderThickness="1,1,1,0"
                                     CornerRadius="5,5,0,0"
                                     WindowChrome.IsHitTestVisibleInChrome="True">
-                                    <Grid Background="Transparent">
+                                    <Grid>
                                         <Grid.ColumnDefinitions>
                                             <ColumnDefinition Width="auto" />
                                             <ColumnDefinition Width="*" MinWidth="10" />
@@ -124,7 +124,7 @@
         </ResourceDictionary>
     </Window.Resources>
     <Border>
-        <Grid>
+        <Grid Background="#DFDFE0">
             <Grid.RowDefinitions>
                 <RowDefinition Height="40" />
                 <RowDefinition Height="*" />
@@ -155,7 +155,7 @@
                     <Grid
                         Width="16"
                         Height="38"
-                        Margin="0,2,0,0"
+                        Margin="0,0,0,0"
                         Background="Transparent" />
                 </dragablz:TabablzControl.HeaderPrefixContent>
             </dragablz:TabablzControl>
@@ -168,17 +168,23 @@
                     Name="BtnMiniSize"
                     Width="40"
                     Height="40"
+                    Background="Transparent"
+                    BorderThickness="0"
                     Click="BtnMiniSize_Click"
                     Content="--" />
                 <Button
                     Name="BtnReStore"
                     Width="40"
                     Height="40"
+                    Background="Transparent"
+                    BorderThickness="0"
                     Click="BtnReStore_Click" />
                 <Button
                     Name="BtnClose"
                     Width="40"
                     Height="40"
+                    Background="Transparent"
+                    BorderThickness="0"
                     Click="BtnClose_Click"
                     Content="X" />
             </StackPanel>

File diff suppressed because it is too large
+ 6 - 5
PDF Office/Views/ViewContent.xaml