Browse Source

其他-优化UI

OYXH\oyxh 2 years ago
parent
commit
826d4a2829

+ 2 - 2
PDF Office/Styles/RadioButtonStyle.xaml

@@ -187,7 +187,7 @@
         </Setter>
     </Style>
     <Style x:Key="ViewModeViewRadioBtn" TargetType="{x:Type RadioButton}">
-        <Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}" />
+        <Setter Property="FocusVisualStyle" Value="{x:Null}" />
         <Setter Property="Background" Value="{StaticResource RadioButton.Static.Background}" />
         <Setter Property="BorderBrush" Value="{StaticResource RadioButton.Static.Border}" />
         <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" />
@@ -227,7 +227,7 @@
                     </Grid>
                     <ControlTemplate.Triggers>
                         <Trigger Property="HasContent" Value="true">
-                            <Setter Property="FocusVisualStyle" Value="{StaticResource OptionMarkFocusVisual}" />
+                            <Setter Property="FocusVisualStyle" Value="{x:Null}" />
                             <Setter Property="Padding" Value="4,-1,0,0" />
                         </Trigger>
                         <Trigger Property="IsMouseOver" Value="true">

+ 16 - 0
PDF Office/ViewModels/PropertyPanel/ViewModular/ViewModularContentViewModel.cs

@@ -121,6 +121,17 @@ namespace PDF_Office.ViewModels.PropertyPanel.ViewModular
             }
         }
 
+        private bool rBtnFullScreenIsChecked = false;
+
+        public bool IsFullScreen
+        {
+            get { return rBtnFullScreenIsChecked; }
+            set
+            {
+                SetProperty(ref rBtnFullScreenIsChecked, value);
+            }
+        }
+
         public DelegateCommand<object> SplitScreenCommand { get; set; }
         public DelegateCommand<object> DisableCommand { get; set; }
 
@@ -179,6 +190,11 @@ namespace PDF_Office.ViewModels.PropertyPanel.ViewModular
                     alertsMessage.ShowDialog("", "Error", "OK");
                     return;
                 }
+                else if (e.Result == ButtonResult.OK)
+                {
+                    IsFullScreen = false;
+                    IsSingleView = true;
+                }
             });
         }
 

+ 3 - 2
PDF Office/ViewModels/ViewContentViewModel.cs

@@ -24,6 +24,7 @@ using Prism.Events;
 using PDF_Office.EventAggregators;
 using PDF_Office.Views.EditTools.Background;
 using PDF_Office.Views.Dialog;
+using System.Windows.Forms;
 
 namespace PDF_Office.ViewModels
 {
@@ -728,7 +729,7 @@ namespace PDF_Office.ViewModels
         /// 阅读模式
         /// </summary>
         /// <param name="viewContent"></param>
-        public async void RbtnReadMode(ViewContent viewContent)
+        public async void RbtnReadMode()
         {
             App.mainWindowViewModel.SelectedItem.IsInReadctonMode = true;
             App.IsBookMode = true;
@@ -1065,7 +1066,7 @@ namespace PDF_Office.ViewModels
         /// </summary>
         public bool saveAsFile(bool isApplyRedaction = false, bool isEraseRedaction = false)
         {
-            var dlg = new SaveFileDialog();
+            var dlg = new Microsoft.Win32.SaveFileDialog();
             dlg.Filter = Properties.Resources.OpenDialogFilter;
             dlg.FileName = PDFViewer.Document.FileName;
             if (dlg.ShowDialog() == true && !string.IsNullOrEmpty(dlg.FileName))

+ 5 - 2
PDF Office/Views/PropertyPanel/ViewModular/ViewModularContent.xaml

@@ -119,6 +119,7 @@
                     Name="RbtnReadMode"
                     HorizontalAlignment="Left"
                     Click="RbtnReadMode_Click"
+                    GroupName="DisplayMode"
                     Style="{StaticResource ViewModeViewRadioBtn}">
                     <StackPanel Margin="0,0,3,0">
                         <Grid
@@ -142,8 +143,9 @@
                     Margin="4,0,4,0"
                     Command="{Binding OpenFullCommand}"
                     GroupName="DisplayMode"
+                    IsChecked="{Binding IsFullScreen}"
                     Style="{StaticResource ViewModeViewRadioBtn}">
-                    <StackPanel Margin="0,0,3,0">
+                    <StackPanel Margin="0,0,3,0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
                         <Path
                             Margin="0,0,0,8"
                             HorizontalAlignment="Center"
@@ -159,7 +161,8 @@
                     Name="RBtnSlide"
                     Margin="0,0,4,0"
                     GroupName="DisplayMode"
-                    Style="{StaticResource ViewModeViewRadioBtn}">
+                    Style="{StaticResource ViewModeViewRadioBtn}"
+                    Visibility="Collapsed">
                     <StackPanel Margin="0,0,3,0">
                         <Grid
                             Width="16"

+ 1 - 1
PDF Office/Views/PropertyPanel/ViewModular/ViewModularContent.xaml.cs

@@ -47,7 +47,7 @@ namespace PDF_Office.Views.PropertyPanel.ViewModular
                     {
                         //viewContent.RbtnReadMode(sender, e);
                         ViewContentViewModel model = viewContent.DataContext as ViewContentViewModel;
-                        model.RbtnReadMode(viewContent);
+                        model.RbtnReadMode();
                     }
                 }
             }

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

@@ -376,13 +376,26 @@
                 VerticalAlignment="Top"
                 Background=" #BDDFFD"
                 Visibility="{Binding LinkAnnotTipVisibility}">
-                <TextBlock
-                    x:Name="DrawTipsText"
-                    Margin="12,4"
-                    Padding="4,2,4,2"
-                    FontSize="14"
-                    Foreground="#252629"
-                    Text="Please use the scroll bar, thumbnail tool to locate the target page, click or box the area to select the target range" />
+                <WrapPanel Orientation="Horizontal">
+                    <Grid
+                        Width="16"
+                        Height="16"
+                        Margin="9,4">
+                        <Ellipse
+                            Width="16"
+                            Height="16"
+                            Fill="{StaticResource color.icon.base.state.info}" />
+                        <Path Data="M7.25 4V5.5H8.75L8.75 4H7.25ZM7.25 7V12H8.75V7H7.25Z" Fill="White" />
+                    </Grid>
+
+                    <TextBlock
+                        x:Name="DrawTipsText"
+                        Margin="0,4,12,4"
+                        Padding="4,2,4,2"
+                        FontSize="14"
+                        Foreground="#252629"
+                        Text="Please use the scroll bar, thumbnail tool to locate the target page, click or box the area to select the target range" />
+                </WrapPanel>
             </Border>
         </Grid>