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

阅读页 - 快捷键, 打印 - 页面编辑

liuaoran 2 лет назад
Родитель
Сommit
2bdd77e22b

+ 2 - 1
PDF Office/StyleAndTemplateList.txt

@@ -69,9 +69,10 @@
                     if (result.Password != null)
                     {
                         string filePath = PDFViewer.Document.FilePath;
-                        PDFViewer.Document.Release();
+                        PDFViewer.CloseDocument();
                         PDFViewer.InitDocument(filePath);
                         PDFViewer.Document.UnlockWithPassword(result.Password);
+                        PDFViewer.Load();
                     }
                    ///TODO:
                    ///此处填入需要执行的代码

+ 34 - 9
PDF Office/ViewModels/Dialog/HomePageToolsDialogs/HomePagePrinter/HomePagePrinterDialogViewModel.cs

@@ -85,7 +85,7 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePagePrinter
                 SetProperty(ref T_copies, value);
             }
         }
-        
+
         private string T_blackAndWhite;
 
         public string T_BlackAndWhite
@@ -96,7 +96,7 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePagePrinter
                 SetProperty(ref T_blackAndWhite, value);
             }
         }
-        
+
         private string T_printSettings;
 
         public string T_PrintSettings
@@ -142,7 +142,7 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePagePrinter
         }
 
 
-        private void  InitString()
+        private void InitString()
         {
             T_Title = App.MainPageLoader.GetString("Print_Title");
             T_Printer = App.MainPageLoader.GetString("Print_Printer");
@@ -359,6 +359,15 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePagePrinter
             }
         }
 
+        private string _customRangeString;
+        public string CustomRangeString
+        {
+            get => _customRangeString;
+            set
+            {
+                SetProperty(ref _customRangeString, value);
+            }
+        }
         public bool IsFirstOpen = true;
         string Unicode = null;
         #endregion
@@ -1007,13 +1016,12 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePagePrinter
 
         public void OnDialogOpened(IDialogParameters parameters)
         {
-             
             parameters.TryGetValue<CPDFViewer>(ParameterNames.PDFViewer, out PDFViewer);
 
             VerifyPasswordResult result = SecurityHelper.VerifyPasswordForSelectedPermissions(PDFViewer.Document, Model.Dialog.ToolsDialogs.SaftyDialogs.EnumPermissionsSet.StatusAllowsPrinting, printDialogs);
             if (result.IsDiscryptied)
             {
-                if (result.Password!=null)
+                if (result.Password != null)
                 {
                     string filePath = PDFViewer.Document.FilePath;
                     PDFViewer.CloseDocument();
@@ -1021,7 +1029,6 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePagePrinter
                     PDFViewer.Document.UnlockWithPassword(result.Password);
                     PDFViewer.Load();
                 }
-
                 ///TODO:
                 ///此处填入需要执行的代码
             }
@@ -1033,8 +1040,7 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePagePrinter
                 }));
             }
 
-
-            if (PDFViewer != null && PDFViewer.Document != null)
+            if (PDFViewer != null && PDFViewer.Document != null && result.IsDiscryptied)
             {
                 for (int temp = 0; temp < PDFViewer.Document.PageCount; temp++)
                 {
@@ -1052,9 +1058,28 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePagePrinter
                 if (parameters.TryGetValue<List<int>>(ParameterNames.PageList, out PageList))
                 {
                     PageListString = CommonHelper.GetPageParmFromList(PageList);
+
                     if (!string.IsNullOrEmpty(PageListString))
                     {
-                        PrintSettingsInfo.PageRangeList = PageList;
+                        if (PageList.Count == 1)
+                        {
+                            System.Windows.Application.Current.Dispatcher.BeginInvoke(System.Windows.Threading.DispatcherPriority.Send, new Action(() =>
+                            {
+                                PageRangeSelectIndex = 1;
+                            }));
+
+                        }
+                        else
+                        {
+                            PrintSettingsInfo.PageRangeList = PageList;
+                            System.Windows.Application.Current.Dispatcher.BeginInvoke(System.Windows.Threading.DispatcherPriority.Send, new Action(() =>
+                            {
+                                CustomRangeString = PageListString;
+                                PageRangeSelectIndex = 4;
+
+                            }));
+
+                        }
                     }
                 }
 

+ 0 - 4
PDF Office/ViewModels/Dialog/HomePageToolsDialogs/HomePagePrinter/HomePagePrinterModBookletContentViewModel.cs

@@ -250,10 +250,6 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePagePrinter
                 InitBookletInfo();
                 SendBookletInfo();
             }
-            else
-            {
-                Trace.WriteLine("No Key Named{0}", "document");
-            }
         }
     }
 }

+ 2 - 1
PDF Office/ViewModels/Dialog/HomePageToolsDialogs/HomePagePrinter/HomePagePrinterModMultipleContentViewModel.cs

@@ -316,7 +316,7 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePagePrinter
             }
             if (MultipleInfo != null)
             {
-                MultipleInfo.VerticalPageNumber = (int)VerticalPageNumber;
+                MultipleInfo.VerticalPageNumber = (int)VerticalPageNumber; 
                 MultipleInfo.HorizontalPageNumber = (int)HorizontalPageNumber;
                 MultipleInfo.IsAutoRotate = IsAutoRotate;
                 MultipleInfo.EnumPageOrder = (EnumPageOrder)PageOrderIndex;
@@ -340,3 +340,4 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePagePrinter
         }
     }
 }
+    

+ 7 - 1
PDF Office/ViewModels/ViewContentViewModel.cs

@@ -722,6 +722,7 @@ namespace PDF_Office.ViewModels
 
         public DelegateCommand CreateBlankFileCommand { get; set; }
 
+        public DelegateCommand ClosePropertyCommand { get; set; }
         #endregion 命令
 
         public ViewContentViewModel(IRegionManager regionManager, IDialogService dialogService, IEventAggregator eventAggregator)
@@ -765,7 +766,7 @@ namespace PDF_Office.ViewModels
 
             SettingsCommand = new DelegateCommand(SettingsEvent);
             CreateLinkCommand = new DelegateCommand<object>(CreateLinkEvent);
-
+            ClosePropertyCommand = new DelegateCommand(CloseProperty);
             //未显示时无法注册上Region名称
             ToolContentVisible = Visibility.Visible;
             ToolsBarContentVisible = Visibility.Visible;
@@ -1189,6 +1190,11 @@ namespace PDF_Office.ViewModels
             }
         }
 
+        private void CloseProperty()
+        {
+            IsPropertyOpen = false;
+        }
+
         /// <summary>
         /// 在文件资源管理器中显示
         /// </summary>

+ 4 - 1
PDF Office/Views/BOTA/BOTAContent.xaml

@@ -21,7 +21,10 @@
             <convert:BoolToVisible x:Key="BoolToVisibleConvert" />
         </ResourceDictionary>
     </UserControl.Resources>
-    <Grid Background="{StaticResource color.sys.layout.mg}">
+
+
+
+        <Grid Background="{StaticResource color.sys.layout.mg}">
         <Grid.ColumnDefinitions>
             <ColumnDefinition Width="48" />
             <ColumnDefinition />

+ 5 - 0
PDF Office/Views/BOTA/BOTAContent.xaml.cs

@@ -53,5 +53,10 @@ namespace PDF_Office.Views.BOTA
                 (this.DataContext as BOTAContentViewModel).viewContentViewModel.OpenBOTA = !(this.DataContext as BOTAContentViewModel).viewContentViewModel.OpenBOTA;
             }
         }
+
+        private void CloseBOTACommand_Executed(object sender, ExecutedRoutedEventArgs e)
+        {
+           
+        }
     }
 }

+ 9 - 5
PDF Office/Views/Dialog/HomePageToolsDialogs/HomePagePrinter/HomePagePrinterDialog.xaml

@@ -19,7 +19,7 @@
                         <ControlTemplate.Triggers>
                             <Trigger Property="IsMouseOver" Value="True">
                                 <Setter Property="Background" TargetName="PageSettingsBtnBorder" Value="{StaticResource color.btn.sec.bg.hov}"></Setter>
-                             </Trigger>
+                            </Trigger>
                             <Trigger Property="IsPressed" Value="True">
                                 <Setter Property="Background" TargetName="PageSettingsBtnBorder" Value="{StaticResource color.btn.sec.bg.act}"></Setter>
                             </Trigger>
@@ -71,14 +71,17 @@
                 <Grid Grid.Column="1">
                     <Grid>
                         <Grid.RowDefinitions>
-                            <RowDefinition Height="310"></RowDefinition>
+                            <!--310 - 88-->
+                                <RowDefinition Height="222"></RowDefinition>
                             <RowDefinition Height="216"></RowDefinition>
                         </Grid.RowDefinitions>
                         <Grid Grid.Row="0" Margin="0,0,0,0" >
                             <Grid.RowDefinitions>
+                                <!--61 、27 -->
                                 <RowDefinition  Height="72"></RowDefinition>
                                 <RowDefinition Height="150"></RowDefinition>
-                                <RowDefinition Height="*"></RowDefinition>
+                                <RowDefinition Height="0"></RowDefinition>
+                                <RowDefinition Height="0"/>
                             </Grid.RowDefinitions>
                             <StackPanel Grid.Row="0" Orientation="Vertical">
                                 <StackPanel Orientation="Horizontal">
@@ -109,7 +112,7 @@
                                 <StackPanel Orientation="Horizontal" Margin="0,10,0,0">
                                     <StackPanel Orientation="Horizontal">
                                         <TextBlock Text="Page range:" FontFamily="Segoe UI" FontSize="14" Height="22" Width="80"></TextBlock>
-                                        <cus:WritableComboBox  x:Name="PageRangeComboBox" Loaded="PageRangeComboBox_Loaded" Width="132" Height="32" Margin="16,0,0,0" MaxPageRange="{Binding MaxPageRange, Mode=TwoWay}"  SelectedIndex="{Binding PageRangeSelectIndex,Mode=TwoWay}">
+                                        <cus:WritableComboBox  x:Name="PageRangeComboBox" Loaded="PageRangeComboBox_Loaded" Text="{Binding CustomRangeString, Mode=TwoWay}" Width="132" Height="32" Margin="16,0,0,0" MaxPageRange="{Binding MaxPageRange, Mode=TwoWay}"  SelectedIndex="{Binding PageRangeSelectIndex,Mode=TwoWay}">
                                             <i:Interaction.Triggers>
                                                 <i:EventTrigger EventName="SelectionChanged">
                                                     <i:InvokeCommandAction Command="{Binding SetPageRangeSelectionIndexCommand}" CommandParameter="{Binding ElementName=PageRangeComboBox}"></i:InvokeCommandAction>
@@ -150,7 +153,8 @@
                                     </CheckBox>
                                 </StackPanel>
                             </StackPanel>
-                            <StackPanel Grid.Row="2" Orientation="Vertical" Margin="0,18,0,0">
+                            <!--TODO: Visibility解锁多功能打印-->
+                            <StackPanel Grid.Row="2" Orientation="Vertical" Margin="0,18,0,0" Visibility="Collapsed" Grid.RowSpan="2">
                                 <StackPanel Orientation="Horizontal">
                                     <TextBlock Text="Page Sizing &amp; Handling" FontFamily="Segoe UI" FontSize="12" Foreground="#616469"/>
                                     <Label Padding="0,0,0,0" Margin="9,0,0,0">

+ 442 - 442
PDF Office/Views/MainWindow.xaml

@@ -1,443 +1,443 @@
-<Window
-    x:Class="PDF_Office.Views.MainWindow"
-    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
-    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
-    xmlns:convert="clr-namespace:PDF_Office.DataConvert"
-    xmlns:cus="clr-namespace:PDF_Office.CustomControl"
-    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
-    xmlns:dragablz="http://dragablz.net/winfx/xaml/dragablz"
-    xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
-    xmlns:local="clr-namespace:PDF_Office"
-    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
-    xmlns:prism="http://prismlibrary.com/"
-    xmlns:viewmodels="clr-namespace:PDF_Office.ViewModels"
-    Width="1280"
-    Height="800"
-    MinWidth="540"
-    MinHeight="460"
-    d:DataContext="{d:DesignInstance Type=viewmodels:MainWindowViewModel}"
-    prism:ViewModelLocator.AutoWireViewModel="True"
-    Activated="Window_Activated"
-    BorderBrush="{StaticResource color.sys.layout.bg.tabbar}"
-    BorderThickness="2"
-    Closed="Window_Closed"
-    Closing="Window_Closing"
-    PreviewMouseLeftButtonDown="Window_PreviewMouseLeftButtonDown"
-    SizeChanged="Window_SizeChanged"
-    Style="{StaticResource WindowStyle}"
-    UseLayoutRounding="True"
-    WindowStartupLocation="CenterScreen"
-    mc:Ignorable="d">
-    <Window.Resources>
-        <ResourceDictionary>
-            <Style x:Key="DragablzItemStyle" TargetType="{x:Type dragablz:DragablzItem}">
-                <Setter Property="WindowChrome.IsHitTestVisibleInChrome" Value="True" />
-                <Setter Property="Foreground" Value="{StaticResource color.sys.text.neutral.lv2}" />
-                <Setter Property="Template">
-                    <Setter.Value>
-                        <ControlTemplate TargetType="dragablz:DragablzItem">
-                            <Grid x:Name="templateRoot">
-                                <Grid.ColumnDefinitions>
-                                    <ColumnDefinition Width="*" />
-                                    <ColumnDefinition Width="auto" />
-                                </Grid.ColumnDefinitions>
-                                <Border
-                                    x:Name="Title"
-                                    Width="184"
-                                    Height="34"
-                                    Margin="4,6,0,2"
-                                    BorderBrush="{StaticResource color.sys.border.neutral.lv3}"
-                                    BorderThickness="0"
-                                    CornerRadius="4,4,0,0"
-                                    WindowChrome.IsHitTestVisibleInChrome="True">
-                                    <Grid
-                                        Name="GridRoot"
-                                        Focusable="True"
-                                        WindowChrome.IsHitTestVisibleInChrome="True">
-                                        <Grid.ColumnDefinitions>
-                                            <ColumnDefinition Width="auto" />
-                                            <ColumnDefinition Width="*" MinWidth="10" />
-                                            <ColumnDefinition Width="auto" />
-                                        </Grid.ColumnDefinitions>
-                                        <StackPanel Orientation="Horizontal">
-                                            <Path
-                                                Name="Ico_Home"
-                                                Width="20"
-                                                Height="20"
-                                                Margin="8,7,0,7"
-                                                Data="M3.8655 5.79659C3.32363 6.16983 3 6.78571 3 7.44369V15.0001C3 16.1046 3.89543 17.0001 5 17.0001H9V12.1786H11V17.0001H15C16.1046 17.0001 17 16.1046 17 15.0001V7.44369C17 6.78571 16.6764 6.16983 16.1345 5.79659L11.1345 2.35266C10.4514 1.88212 9.54865 1.88212 8.8655 2.35266L3.8655 5.79659Z"
-                                                Fill="{TemplateBinding Foreground}"
-                                                Visibility="Collapsed" />
-                                            <TextBlock
-                                                x:Name="TextTitle"
-                                                MaxWidth="145"
-                                                Margin="8,7"
-                                                VerticalAlignment="Center"
-                                                FontFamily="Segoe UI,Microsoft YaHei"
-                                                Foreground="{TemplateBinding Foreground}"
-                                                Text="{Binding DataContext.FileName}"
-                                                TextTrimming="WordEllipsis" />
-                                        </StackPanel>
-                                        <Thumb
-                                            x:Name="PART_Thumb"
-                                            Grid.ColumnSpan="2"
-                                            HorizontalAlignment="Stretch"
-                                            VerticalContentAlignment="Stretch"
-                                            Background="Transparent"
-                                            FontFamily="Segoe UI,Microsoft YaHei"
-                                            ToolTip="{Binding DataContext.FileName}">
-                                            <Thumb.Template>
-                                                <ControlTemplate>
-                                                    <Grid Background="Transparent" />
-                                                </ControlTemplate>
-                                            </Thumb.Template>
-                                        </Thumb>
-                                        <TextBlock
-                                            x:Name="ChangeIcon"
-                                            Grid.Column="1"
-                                            Width="5"
-                                            Margin="3,4,2,0"
-                                            HorizontalAlignment="Left"
-                                            VerticalAlignment="Top"
-                                            Foreground="{TemplateBinding Foreground}"
-                                            IsHitTestVisible="False"
-                                            Text="*"
-                                            Visibility="{Binding DataContext.FileChanged}" />
-                                        <Button
-                                            Grid.Column="2"
-                                            Width="16"
-                                            Height="16"
-                                            Margin="0,4,8,4"
-                                            Background="Transparent"
-                                            BorderThickness="0"
-                                            Command="{Binding DataContext.CloseTab}"
-                                            CommandParameter="{Binding}">
-                                            <Path Data="M6.50006 7.06072L9.96973 10.5304L11.0304 9.46973L7.56072 6.00006L11.0304 2.53039L9.96973 1.46973L6.50006 4.9394L3.03039 1.46973L1.96973 2.53039L5.4394 6.00006L1.96973 9.46973L3.03039 10.5304L6.50006 7.06072Z" Fill="{StaticResource color.icon.base.neutral.norm.lv2}" />
-                                        </Button>
-
-                                        <TextBox
-                                            x:Name="TxtRename"
-                                            MaxWidth="145"
-                                            Margin="8,0,10,0"
-                                            VerticalContentAlignment="Center"
-                                            FontFamily="Segoe UI,Microsoft YaHei"
-                                            Foreground="{TemplateBinding Foreground}"
-                                            PreviewKeyDown="TxtRename_PreviewKeyDown"
-                                            Text="{Binding DataContext.FileName, Mode=TwoWay, UpdateSourceTrigger=LostFocus}"
-                                            Visibility="{Binding DataContext.IsReNameTextShow}"
-                                            WindowChrome.IsHitTestVisibleInChrome="True" />
-                                    </Grid>
-                                </Border>
-                                <Grid.ContextMenu>
-                                    <ContextMenu>
-                                        <MenuItem
-                                            Command="{Binding DataContext.RenameCommand}"
-                                            Header="{Binding DataContext.T_Rename}"
-                                            IsEnabled="{Binding DataContext.IsReNameEnable}" />
-                                        <MenuItem
-                                            Command="{Binding DataContext.ShowInFolderCommand}"
-                                            Header="{Binding DataContext.T_Floder}"
-                                            IsEnabled="{Binding DataContext.IsShowInFolderEnable}" />
-                                        <MenuItem
-                                            Command="{Binding DataContext.CloseTab}"
-                                            CommandParameter="{Binding}"
-                                            Header="{Binding DataContext.T_Close}" />
-                                        <MenuItem
-                                            Command="{Binding DataContext.mainWindowViewModel.CloseAllTabCommand}"
-                                            Header="{Binding DataContext.T_CloseAll}"
-                                            IsEnabled="{Binding DataContext.mainWindowViewModel.IsCloseAllEnable}" />
-                                        <MenuItem Header="Open In New Window" Visibility="Collapsed" />
-                                    </ContextMenu>
-                                </Grid.ContextMenu>
-                            </Grid>
-                            <ControlTemplate.Triggers>
-                                <Trigger Property="IsSelected" Value="True">
-                                    <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" />
-                                </Trigger>
-                                <Trigger Property="IsMouseOver" Value="True">
-                                    <Setter TargetName="Title" Property="Background" Value="{StaticResource color.item-state.hov.bg}" />
-                                </Trigger>
-                                <Trigger SourceName="TextTitle" Property="Text" Value="Home">
-                                    <Setter TargetName="Ico_Home" Property="Visibility" Value="Visible" />
-                                </Trigger>
-                                <MultiDataTrigger>
-                                    <MultiDataTrigger.Conditions>
-                                        <Condition Binding="{Binding IsSelected, RelativeSource={RelativeSource Self}}" Value="false" />
-                                        <Condition Binding="{Binding IsMouseOver, RelativeSource={RelativeSource Self}}" Value="true" />
-                                    </MultiDataTrigger.Conditions>
-                                    <Setter TargetName="Title" Property="Background" Value="#0D000000" />
-                                    <Setter Property="Foreground" Value="{StaticResource color.sys.text.neutral.lv1}" />
-                                    <!--<Setter TargetName="btnPath" Property="Path.Fill" Value="Black"/>-->
-                                </MultiDataTrigger>
-                            </ControlTemplate.Triggers>
-                        </ControlTemplate>
-                    </Setter.Value>
-                </Setter>
-            </Style>
-
-            <convert:UnVisivleConvert x:Key="UnvisibleConvert" />
-        </ResourceDictionary>
-    </Window.Resources>
-    <Grid Background="{StaticResource color.sys.layout.bg.tabbar}">
-        <Grid.RowDefinitions>
-            <RowDefinition Height="40" />
-            <RowDefinition Height="*" />
-        </Grid.RowDefinitions>
-        <dragablz:TabablzControl
-            Name="TabablzControl"
-            Grid.RowSpan="3"
-            BorderThickness="0"
-            FocusVisualStyle="{x:Null}"
-            ItemContainerStyle="{StaticResource DragablzItemStyle}"
-            SelectedItem="{Binding SelectedItem, Mode=TwoWay}"
-            WindowChrome.IsHitTestVisibleInChrome="True">
-            <dragablz:TabablzControl.InterTabController>
-                <dragablz:InterTabController InterTabClient="{Binding InterTabClient}" />
-            </dragablz:TabablzControl.InterTabController>
-            <dragablz:TabablzControl.HeaderSuffixContent>
-                <Button
-                    x:Name="BtnAdd"
-                    Width="20"
-                    Height="20"
-                    Margin="8,13,200,7"
-                    Padding="0"
-                    HorizontalAlignment="Left"
-                    Background="Transparent"
-                    BorderThickness="0"
-                    Command="{Binding AddTab}"
-                    WindowChrome.IsHitTestVisibleInChrome="True">
-                    <Path
-                        Width="20"
-                        Height="20"
-                        Data="M9 11V16H11V11H16V9H11V4H9V9H4L4 11H9Z"
-                        Fill="{StaticResource color.icon.base.neutral.norm.lv1}" />
-                </Button>
-            </dragablz:TabablzControl.HeaderSuffixContent>
-            <dragablz:TabablzControl.HeaderPrefixContent>
-                <Grid
-                    Name="GridRoot"
-                    Width="16"
-                    Height="38"
-                    Margin="0,0,0,0"
-                    Background="Transparent" />
-            </dragablz:TabablzControl.HeaderPrefixContent>
-        </dragablz:TabablzControl>
-        <!--  标题栏右侧栏,关闭按钮,会员,试用等  -->
-        <StackPanel
-            Name="StkPnlRight"
-            HorizontalAlignment="Right"
-            Orientation="Horizontal"
-            WindowChrome.IsHitTestVisibleInChrome="True">
-
-            <Grid x:Name="Grid_Openhight" Visibility="{Binding OphVis,Mode=OneWay}">
-                <Border VerticalAlignment="Center">
-                    <Path Data="M0 4C0 1.79086 1.79086 0 4 0H132C134.209 0 136 1.79086 136 4V10.323C136 10.7319 136.249 11.0996 136.629 11.2514L141.179 13.0715C142.017 13.4068 142.017 14.5932 141.179 14.9285L136.629 16.7486C136.249 16.9004 136 17.2681 136 17.677V24C136 26.2091 134.209 28 132 28H4C1.79086 28 0 26.2091 0 24V4Z" Fill="#FFCF52" />
-                </Border>
-                <TextBlock
-                    HorizontalAlignment="Center"
-                    VerticalAlignment="Center"
-                    FontSize="12"
-                    Text="登录解锁高级功能" />
-            </Grid>
-
-            <Button
-                x:Name="Btn_Register"
-                Width="40"
-                Height="40"
-                Background="Transparent"
-                Command="{Binding OpenRegisterCommand}"
-                Style="{StaticResource subToolBar}"
-                Visibility="{Binding RegisterVis, Mode=TwoWay}">
-                <Grid>
-                    <Border
-                        x:Name="myBorder1"
-                        Width="24"
-                        Height="24"
-                        Background="White"
-                        CornerRadius="12" />
-                    <Border
-                        Width="24"
-                        Height="24"
-                        Background="{StaticResource color.icon.base.neutral.norm.lv1}"
-                        BorderBrush="{StaticResource color.icon.base.neutral.norm.lv1}">
-                        <Path Data="M12 13C14.2091 13 16 11.2091 16 9C16 6.79086 14.2091 5 12 5C9.79086 5 8 6.79086 8 9C8 11.2091 9.79086 13 12 13ZM12 31C17.5228 31 22 27.4183 22 23C22 18.5817 17.5228 15 12 15C6.47715 15 2 18.5817 2 23C2 27.4183 6.47715 31 12 31Z" Fill="White" />
-                        <Border.OpacityMask>
-                            <VisualBrush Visual="{Binding ElementName=myBorder1}" />
-                        </Border.OpacityMask>
-                    </Border>
-                    <Border
-                        Width="24"
-                        Height="24"
-                        BorderBrush="{StaticResource color.icon.base.neutral.norm.lv1}"
-                        BorderThickness="2"
-                        CornerRadius="100" />
-                </Grid>
-
-            </Button>
-
-            <Button
-                x:Name="Btn_Login"
-                Width="40"
-                Height="40"
-                Background="Transparent"
-                Command="{Binding OpenLoginCommand}"
-                Style="{StaticResource subToolBar}"
-                Visibility="{Binding LoginVis, Mode=TwoWay}">
-                <Grid>
-                    <Border
-                        x:Name="myBorder2"
-                        Width="24"
-                        Height="24"
-                        Background="White"
-                        CornerRadius="12" />
-                    <Border
-                        Width="24"
-                        Height="24"
-                        Background="{StaticResource color.icon.base.neutral.norm.lv1}"
-                        BorderBrush="{StaticResource color.icon.base.neutral.norm.lv1}">
-                        <Path Data="M12 13C14.2091 13 16 11.2091 16 9C16 6.79086 14.2091 5 12 5C9.79086 5 8 6.79086 8 9C8 11.2091 9.79086 13 12 13ZM12 31C17.5228 31 22 27.4183 22 23C22 18.5817 17.5228 15 12 15C6.47715 15 2 18.5817 2 23C2 27.4183 6.47715 31 12 31Z" Fill="White" />
-                        <Border.OpacityMask>
-                            <VisualBrush Visual="{Binding ElementName=myBorder2}" />
-                        </Border.OpacityMask>
-                    </Border>
-                    <Border
-                        Width="24"
-                        Height="24"
-                        BorderBrush="{StaticResource color.icon.base.neutral.norm.lv1}"
-                        BorderThickness="2"
-                        CornerRadius="100" />
-                </Grid>
-            </Button>
-            <Button
-                x:Name="Btn_User"
-                Width="40"
-                Height="40"
-                Background="Transparent"
-                Command="{Binding OpenUserCommand}"
-                Style="{StaticResource subToolBar}"
-                Visibility="{Binding UserVis, Mode=TwoWay}">
-                <Grid>
-                    <Border
-                        x:Name="myBorder3"
-                        Width="24"
-                        Height="24"
-                        Background="White"
-                        CornerRadius="12" />
-                    <Border
-                        Width="24"
-                        Height="24"
-                        Background="#1770F4"
-                        BorderBrush="{StaticResource color.icon.base.neutral.norm.lv1}">
-                        <Path Data="M12 13C14.2091 13 16 11.2091 16 9C16 6.79086 14.2091 5 12 5C9.79086 5 8 6.79086 8 9C8 11.2091 9.79086 13 12 13ZM12 31C17.5228 31 22 27.4183 22 23C22 18.5817 17.5228 15 12 15C6.47715 15 2 18.5817 2 23C2 27.4183 6.47715 31 12 31Z" Fill="White" />
-                        <Border.OpacityMask>
-                            <VisualBrush Visual="{Binding ElementName=myBorder3}" />
-                        </Border.OpacityMask>
-                    </Border>
-                    <Border
-                        Width="24"
-                        Height="24"
-                        BorderBrush="#1770F4"
-                        BorderThickness="2"
-                        CornerRadius="100" />
-                </Grid>
-            </Button>
-            <Separator BorderBrush="#94989C" BorderThickness="1">
-                <Separator.LayoutTransform>
-                    <RotateTransform Angle="90" />
-                </Separator.LayoutTransform>
-            </Separator>
-            <Button
-                Name="BtnMiniSize"
-                Width="40"
-                Height="40"
-                Background="Transparent"
-                BorderThickness="0"
-                Click="BtnMiniSize_Click"
-                Style="{StaticResource TitleBarBtn}">
-                <Polygon Fill="{StaticResource color.btn.sec.text.def}" Points="14 7 14 8 2 8 2 7">
-                    <Polygon.RenderTransform>
-                        <TransformGroup>
-                            <TranslateTransform Y="-3" />
-                        </TransformGroup>
-                    </Polygon.RenderTransform>
-                </Polygon>
-            </Button>
-            <Button
-                Name="BtnReStore"
-                Width="40"
-                Height="40"
-                Background="Transparent"
-                BorderThickness="0"
-                Click="BtnReStore_Click"
-                Style="{StaticResource TitleBarBtn}">
-                <Grid>
-                    <Path
-                        x:Name="ico_max"
-                        Data="M14,2 L14,14 L2,14 L2,2 L14,2 Z M13,3 L3,3 L3,13 L13,13 L13,3 Z"
-                        Fill="{StaticResource color.btn.sec.text.def}"
-                        Visibility="Collapsed" />
-                    <Grid x:Name="ico_mini" Visibility="{Binding ElementName=ico_max, Path=Visibility, Converter={StaticResource UnvisibleConvert}}">
-                        <Path Data="M11,5 L11,14 L2,14 L2,5 L11,5 Z M10,6 L3,6 L3,13 L10,13 L10,6 Z" Fill="{StaticResource color.btn.sec.text.def}" />
-                        <Polygon Fill="{StaticResource color.btn.sec.text.def}" Points="14 2 14 11 11 11 11 10 13 10 13 3 6 3 6 5 5 5 5 2" />
-                    </Grid>
-                </Grid>
-            </Button>
-            <Button
-                Name="BtnClose"
-                Width="40"
-                Height="40"
-                Background="Transparent"
-                BorderThickness="0"
-                Click="BtnClose_Click"
-                Style="{StaticResource CloseBtn}">
-                <Polygon Fill="{StaticResource color.btn.sec.text.def}" Points="11.2919922 12 12 11.2919922 6.70800781 6 12 0.708007813 11.2919922 0 6 5.29199219 0.708007812 9.76996262e-15 -2.27456942e-13 0.708007813 5.29199219 6 0 11.2919922 0.708007812 12 6 6.70800781" />
-            </Button>
-        </StackPanel>
-
-        <!--  OCR Progress Control  -->
-        <Grid Grid.RowSpan="2" Visibility="{Binding IsProcessVisible}">
-            <Grid.Background>
-                <SolidColorBrush Opacity="0.05" Color="Black" />
-            </Grid.Background>
-            <Border
-                Width="226"
-                Height="58"
-                
-                Background="{StaticResource color.sys.layout.dark.bg}"
-                BorderThickness="0"
-                CornerRadius="{StaticResource border-radius.8}"
-                Effect="{StaticResource shadow.neutral.m}">
-                <Grid Margin="16,13" Background="Transparent">
-                    <StackPanel Orientation="Horizontal">
-                        <TextBlock Foreground="{StaticResource color.sys.text.anti.norm}" Text="{Binding ProgressTitle}" />
-                        <TextBlock Foreground="{StaticResource color.sys.text.anti.norm}" Text="{Binding Value, StringFormat={}({0})}" />
-                    </StackPanel>
-                    <Button
-                        Width="12"
-                        Height="12"
-                        HorizontalAlignment="Right"
-                        VerticalAlignment="Top"
+<Window
+    x:Class="PDF_Office.Views.MainWindow"
+    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+    xmlns:convert="clr-namespace:PDF_Office.DataConvert"
+    xmlns:cus="clr-namespace:PDF_Office.CustomControl"
+    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+    xmlns:dragablz="http://dragablz.net/winfx/xaml/dragablz"
+    xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
+    xmlns:local="clr-namespace:PDF_Office"
+    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+    xmlns:prism="http://prismlibrary.com/"
+    xmlns:viewmodels="clr-namespace:PDF_Office.ViewModels"
+    Width="1280"
+    Height="800"
+    MinWidth="540"
+    MinHeight="460"
+    d:DataContext="{d:DesignInstance Type=viewmodels:MainWindowViewModel}"
+    prism:ViewModelLocator.AutoWireViewModel="True"
+    Activated="Window_Activated"
+    BorderBrush="{StaticResource color.sys.layout.bg.tabbar}"
+    BorderThickness="2"
+    Closed="Window_Closed"
+    Closing="Window_Closing"
+    PreviewMouseLeftButtonDown="Window_PreviewMouseLeftButtonDown"
+    SizeChanged="Window_SizeChanged"
+    Style="{StaticResource WindowStyle}"
+    UseLayoutRounding="True"
+    WindowStartupLocation="CenterScreen"
+    mc:Ignorable="d">
+    <Window.Resources>
+        <ResourceDictionary>
+            <Style x:Key="DragablzItemStyle" TargetType="{x:Type dragablz:DragablzItem}">
+                <Setter Property="WindowChrome.IsHitTestVisibleInChrome" Value="True" />
+                <Setter Property="Foreground" Value="{StaticResource color.sys.text.neutral.lv2}" />
+                <Setter Property="Template">
+                    <Setter.Value>
+                        <ControlTemplate TargetType="dragablz:DragablzItem">
+                            <Grid x:Name="templateRoot">
+                                <Grid.ColumnDefinitions>
+                                    <ColumnDefinition Width="*" />
+                                    <ColumnDefinition Width="auto" />
+                                </Grid.ColumnDefinitions>
+                                <Border
+                                    x:Name="Title"
+                                    Width="184"
+                                    Height="34"
+                                    Margin="4,6,0,2"
+                                    BorderBrush="{StaticResource color.sys.border.neutral.lv3}"
+                                    BorderThickness="0"
+                                    CornerRadius="4,4,0,0"
+                                    WindowChrome.IsHitTestVisibleInChrome="True">
+                                    <Grid
+                                        Name="GridRoot"
+                                        Focusable="True"
+                                        WindowChrome.IsHitTestVisibleInChrome="True">
+                                        <Grid.ColumnDefinitions>
+                                            <ColumnDefinition Width="auto" />
+                                            <ColumnDefinition Width="*" MinWidth="10" />
+                                            <ColumnDefinition Width="auto" />
+                                        </Grid.ColumnDefinitions>
+                                        <StackPanel Orientation="Horizontal">
+                                            <Path
+                                                Name="Ico_Home"
+                                                Width="20"
+                                                Height="20"
+                                                Margin="8,7,0,7"
+                                                Data="M3.8655 5.79659C3.32363 6.16983 3 6.78571 3 7.44369V15.0001C3 16.1046 3.89543 17.0001 5 17.0001H9V12.1786H11V17.0001H15C16.1046 17.0001 17 16.1046 17 15.0001V7.44369C17 6.78571 16.6764 6.16983 16.1345 5.79659L11.1345 2.35266C10.4514 1.88212 9.54865 1.88212 8.8655 2.35266L3.8655 5.79659Z"
+                                                Fill="{TemplateBinding Foreground}"
+                                                Visibility="Collapsed" />
+                                            <TextBlock
+                                                x:Name="TextTitle"
+                                                MaxWidth="145"
+                                                Margin="8,7"
+                                                VerticalAlignment="Center"
+                                                FontFamily="Segoe UI,Microsoft YaHei"
+                                                Foreground="{TemplateBinding Foreground}"
+                                                Text="{Binding DataContext.FileName}"
+                                                TextTrimming="WordEllipsis" />
+                                        </StackPanel>
+                                        <Thumb
+                                            x:Name="PART_Thumb"
+                                            Grid.ColumnSpan="2"
+                                            HorizontalAlignment="Stretch"
+                                            VerticalContentAlignment="Stretch"
+                                            Background="Transparent"
+                                            FontFamily="Segoe UI,Microsoft YaHei"
+                                            ToolTip="{Binding DataContext.FileName}">
+                                            <Thumb.Template>
+                                                <ControlTemplate>
+                                                    <Grid Background="Transparent" />
+                                                </ControlTemplate>
+                                            </Thumb.Template>
+                                        </Thumb>
+                                        <TextBlock
+                                            x:Name="ChangeIcon"
+                                            Grid.Column="1"
+                                            Width="5"
+                                            Margin="3,4,2,0"
+                                            HorizontalAlignment="Left"
+                                            VerticalAlignment="Top"
+                                            Foreground="{TemplateBinding Foreground}"
+                                            IsHitTestVisible="False"
+                                            Text="*"
+                                            Visibility="{Binding DataContext.FileChanged}" />
+                                        <Button
+                                            Grid.Column="2"
+                                            Width="16"
+                                            Height="16"
+                                            Margin="0,4,8,4"
+                                            Background="Transparent"
+                                            BorderThickness="0"
+                                            Command="{Binding DataContext.CloseTab}"
+                                            CommandParameter="{Binding}">
+                                            <Path Data="M6.50006 7.06072L9.96973 10.5304L11.0304 9.46973L7.56072 6.00006L11.0304 2.53039L9.96973 1.46973L6.50006 4.9394L3.03039 1.46973L1.96973 2.53039L5.4394 6.00006L1.96973 9.46973L3.03039 10.5304L6.50006 7.06072Z" Fill="{StaticResource color.icon.base.neutral.norm.lv2}" />
+                                        </Button>
+
+                                        <TextBox
+                                            x:Name="TxtRename"
+                                            MaxWidth="145"
+                                            Margin="8,0,10,0"
+                                            VerticalContentAlignment="Center"
+                                            FontFamily="Segoe UI,Microsoft YaHei"
+                                            Foreground="{TemplateBinding Foreground}"
+                                            PreviewKeyDown="TxtRename_PreviewKeyDown"
+                                            Text="{Binding DataContext.FileName, Mode=TwoWay, UpdateSourceTrigger=LostFocus}"
+                                            Visibility="{Binding DataContext.IsReNameTextShow}"
+                                            WindowChrome.IsHitTestVisibleInChrome="True" />
+                                    </Grid>
+                                </Border>
+                                <Grid.ContextMenu>
+                                    <ContextMenu>
+                                        <MenuItem
+                                            Command="{Binding DataContext.RenameCommand}"
+                                            Header="{Binding DataContext.T_Rename}"
+                                            IsEnabled="{Binding DataContext.IsReNameEnable}" />
+                                        <MenuItem
+                                            Command="{Binding DataContext.ShowInFolderCommand}"
+                                            Header="{Binding DataContext.T_Floder}"
+                                            IsEnabled="{Binding DataContext.IsShowInFolderEnable}" />
+                                        <MenuItem
+                                            Command="{Binding DataContext.CloseTab}"
+                                            CommandParameter="{Binding}"
+                                            Header="{Binding DataContext.T_Close}" />
+                                        <MenuItem
+                                            Command="{Binding DataContext.mainWindowViewModel.CloseAllTabCommand}"
+                                            Header="{Binding DataContext.T_CloseAll}"
+                                            IsEnabled="{Binding DataContext.mainWindowViewModel.IsCloseAllEnable}" />
+                                        <MenuItem Header="Open In New Window" Visibility="Collapsed" />
+                                    </ContextMenu>
+                                </Grid.ContextMenu>
+                            </Grid>
+                            <ControlTemplate.Triggers>
+                                <Trigger Property="IsSelected" Value="True">
+                                    <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" />
+                                </Trigger>
+                                <Trigger Property="IsMouseOver" Value="True">
+                                    <Setter TargetName="Title" Property="Background" Value="{StaticResource color.item-state.hov.bg}" />
+                                </Trigger>
+                                <Trigger SourceName="TextTitle" Property="Text" Value="Home">
+                                    <Setter TargetName="Ico_Home" Property="Visibility" Value="Visible" />
+                                </Trigger>
+                                <MultiDataTrigger>
+                                    <MultiDataTrigger.Conditions>
+                                        <Condition Binding="{Binding IsSelected, RelativeSource={RelativeSource Self}}" Value="false" />
+                                        <Condition Binding="{Binding IsMouseOver, RelativeSource={RelativeSource Self}}" Value="true" />
+                                    </MultiDataTrigger.Conditions>
+                                    <Setter TargetName="Title" Property="Background" Value="#0D000000" />
+                                    <Setter Property="Foreground" Value="{StaticResource color.sys.text.neutral.lv1}" />
+                                    <!--<Setter TargetName="btnPath" Property="Path.Fill" Value="Black"/>-->
+                                </MultiDataTrigger>
+                            </ControlTemplate.Triggers>
+                        </ControlTemplate>
+                    </Setter.Value>
+                </Setter>
+            </Style>
+
+            <convert:UnVisivleConvert x:Key="UnvisibleConvert" />
+        </ResourceDictionary>
+    </Window.Resources>
+    <Grid Background="{StaticResource color.sys.layout.bg.tabbar}">
+        <Grid.RowDefinitions>
+            <RowDefinition Height="40" />
+            <RowDefinition Height="*" />
+        </Grid.RowDefinitions>
+        <dragablz:TabablzControl
+            Name="TabablzControl"
+            Grid.RowSpan="3"
+            BorderThickness="0"
+            FocusVisualStyle="{x:Null}"
+            ItemContainerStyle="{StaticResource DragablzItemStyle}"
+            SelectedItem="{Binding SelectedItem, Mode=TwoWay}"
+            WindowChrome.IsHitTestVisibleInChrome="True">
+            <dragablz:TabablzControl.InterTabController>
+                <dragablz:InterTabController InterTabClient="{Binding InterTabClient}" />
+            </dragablz:TabablzControl.InterTabController>
+            <dragablz:TabablzControl.HeaderSuffixContent>
+                <Button
+                    x:Name="BtnAdd"
+                    Width="20"
+                    Height="20"
+                    Margin="8,13,200,7"
+                    Padding="0"
+                    HorizontalAlignment="Left"
+                    Background="Transparent"
+                    BorderThickness="0"
+                    Command="{Binding AddTab}"
+                    WindowChrome.IsHitTestVisibleInChrome="True">
+                    <Path
+                        Width="20"
+                        Height="20"
+                        Data="M9 11V16H11V11H16V9H11V4H9V9H4L4 11H9Z"
+                        Fill="{StaticResource color.icon.base.neutral.norm.lv1}" />
+                </Button>
+            </dragablz:TabablzControl.HeaderSuffixContent>
+            <dragablz:TabablzControl.HeaderPrefixContent>
+                <Grid
+                    Name="GridRoot"
+                    Width="16"
+                    Height="38"
+                    Margin="0,0,0,0"
+                    Background="Transparent" />
+            </dragablz:TabablzControl.HeaderPrefixContent>
+        </dragablz:TabablzControl>
+        <!--  标题栏右侧栏,关闭按钮,会员,试用等  -->
+        <StackPanel
+            Name="StkPnlRight"
+            HorizontalAlignment="Right"
+            Orientation="Horizontal"
+            WindowChrome.IsHitTestVisibleInChrome="True">
+
+            <Grid x:Name="Grid_Openhight" Visibility="{Binding OphVis,Mode=OneWay}">
+                <Border VerticalAlignment="Center">
+                    <Path Data="M0 4C0 1.79086 1.79086 0 4 0H132C134.209 0 136 1.79086 136 4V10.323C136 10.7319 136.249 11.0996 136.629 11.2514L141.179 13.0715C142.017 13.4068 142.017 14.5932 141.179 14.9285L136.629 16.7486C136.249 16.9004 136 17.2681 136 17.677V24C136 26.2091 134.209 28 132 28H4C1.79086 28 0 26.2091 0 24V4Z" Fill="#FFCF52" />
+                </Border>
+                <TextBlock
+                    HorizontalAlignment="Center"
+                    VerticalAlignment="Center"
+                    FontSize="12"
+                    Text="登录解锁高级功能" />
+            </Grid>
+
+            <Button
+                x:Name="Btn_Register"
+                Width="40"
+                Height="40"
+                Background="Transparent"
+                Command="{Binding OpenRegisterCommand}"
+                Style="{StaticResource subToolBar}"
+                Visibility="{Binding RegisterVis, Mode=TwoWay}">
+                <Grid>
+                    <Border
+                        x:Name="myBorder1"
+                        Width="24"
+                        Height="24"
+                        Background="White"
+                        CornerRadius="12" />
+                    <Border
+                        Width="24"
+                        Height="24"
+                        Background="{StaticResource color.icon.base.neutral.norm.lv1}"
+                        BorderBrush="{StaticResource color.icon.base.neutral.norm.lv1}">
+                        <Path Data="M12 13C14.2091 13 16 11.2091 16 9C16 6.79086 14.2091 5 12 5C9.79086 5 8 6.79086 8 9C8 11.2091 9.79086 13 12 13ZM12 31C17.5228 31 22 27.4183 22 23C22 18.5817 17.5228 15 12 15C6.47715 15 2 18.5817 2 23C2 27.4183 6.47715 31 12 31Z" Fill="White" />
+                        <Border.OpacityMask>
+                            <VisualBrush Visual="{Binding ElementName=myBorder1}" />
+                        </Border.OpacityMask>
+                    </Border>
+                    <Border
+                        Width="24"
+                        Height="24"
+                        BorderBrush="{StaticResource color.icon.base.neutral.norm.lv1}"
+                        BorderThickness="2"
+                        CornerRadius="100" />
+                </Grid>
+
+            </Button>
+
+            <Button
+                x:Name="Btn_Login"
+                Width="40"
+                Height="40"
+                Background="Transparent"
+                Command="{Binding OpenLoginCommand}"
+                Style="{StaticResource subToolBar}"
+                Visibility="{Binding LoginVis, Mode=TwoWay}">
+                <Grid>
+                    <Border
+                        x:Name="myBorder2"
+                        Width="24"
+                        Height="24"
+                        Background="White"
+                        CornerRadius="12" />
+                    <Border
+                        Width="24"
+                        Height="24"
+                        Background="{StaticResource color.icon.base.neutral.norm.lv1}"
+                        BorderBrush="{StaticResource color.icon.base.neutral.norm.lv1}">
+                        <Path Data="M12 13C14.2091 13 16 11.2091 16 9C16 6.79086 14.2091 5 12 5C9.79086 5 8 6.79086 8 9C8 11.2091 9.79086 13 12 13ZM12 31C17.5228 31 22 27.4183 22 23C22 18.5817 17.5228 15 12 15C6.47715 15 2 18.5817 2 23C2 27.4183 6.47715 31 12 31Z" Fill="White" />
+                        <Border.OpacityMask>
+                            <VisualBrush Visual="{Binding ElementName=myBorder2}" />
+                        </Border.OpacityMask>
+                    </Border>
+                    <Border
+                        Width="24"
+                        Height="24"
+                        BorderBrush="{StaticResource color.icon.base.neutral.norm.lv1}"
+                        BorderThickness="2"
+                        CornerRadius="100" />
+                </Grid>
+            </Button>
+            <Button
+                x:Name="Btn_User"
+                Width="40"
+                Height="40"
+                Background="Transparent"
+                Command="{Binding OpenUserCommand}"
+                Style="{StaticResource subToolBar}"
+                Visibility="{Binding UserVis, Mode=TwoWay}">
+                <Grid>
+                    <Border
+                        x:Name="myBorder3"
+                        Width="24"
+                        Height="24"
+                        Background="White"
+                        CornerRadius="12" />
+                    <Border
+                        Width="24"
+                        Height="24"
+                        Background="#1770F4"
+                        BorderBrush="{StaticResource color.icon.base.neutral.norm.lv1}">
+                        <Path Data="M12 13C14.2091 13 16 11.2091 16 9C16 6.79086 14.2091 5 12 5C9.79086 5 8 6.79086 8 9C8 11.2091 9.79086 13 12 13ZM12 31C17.5228 31 22 27.4183 22 23C22 18.5817 17.5228 15 12 15C6.47715 15 2 18.5817 2 23C2 27.4183 6.47715 31 12 31Z" Fill="White" />
+                        <Border.OpacityMask>
+                            <VisualBrush Visual="{Binding ElementName=myBorder3}" />
+                        </Border.OpacityMask>
+                    </Border>
+                    <Border
+                        Width="24"
+                        Height="24"
+                        BorderBrush="#1770F4"
+                        BorderThickness="2"
+                        CornerRadius="100" />
+                </Grid>
+            </Button>
+            <Separator BorderBrush="#94989C" BorderThickness="1">
+                <Separator.LayoutTransform>
+                    <RotateTransform Angle="90" />
+                </Separator.LayoutTransform>
+            </Separator>
+            <Button
+                Name="BtnMiniSize"
+                Width="40"
+                Height="40"
+                Background="Transparent"
+                BorderThickness="0"
+                Click="BtnMiniSize_Click"
+                Style="{StaticResource TitleBarBtn}">
+                <Polygon Fill="{StaticResource color.btn.sec.text.def}" Points="14 7 14 8 2 8 2 7">
+                    <Polygon.RenderTransform>
+                        <TransformGroup>
+                            <TranslateTransform Y="-3" />
+                        </TransformGroup>
+                    </Polygon.RenderTransform>
+                </Polygon>
+            </Button>
+            <Button
+                Name="BtnReStore"
+                Width="40"
+                Height="40"
+                Background="Transparent"
+                BorderThickness="0"
+                Click="BtnReStore_Click"
+                Style="{StaticResource TitleBarBtn}">
+                <Grid>
+                    <Path
+                        x:Name="ico_max"
+                        Data="M14,2 L14,14 L2,14 L2,2 L14,2 Z M13,3 L3,3 L3,13 L13,13 L13,3 Z"
+                        Fill="{StaticResource color.btn.sec.text.def}"
+                        Visibility="Collapsed" />
+                    <Grid x:Name="ico_mini" Visibility="{Binding ElementName=ico_max, Path=Visibility, Converter={StaticResource UnvisibleConvert}}">
+                        <Path Data="M11,5 L11,14 L2,14 L2,5 L11,5 Z M10,6 L3,6 L3,13 L10,13 L10,6 Z" Fill="{StaticResource color.btn.sec.text.def}" />
+                        <Polygon Fill="{StaticResource color.btn.sec.text.def}" Points="14 2 14 11 11 11 11 10 13 10 13 3 6 3 6 5 5 5 5 2" />
+                    </Grid>
+                </Grid>
+            </Button>
+            <Button
+                Name="BtnClose"
+                Width="40"
+                Height="40"
+                Background="Transparent"
+                BorderThickness="0"
+                Click="BtnClose_Click"
+                Style="{StaticResource CloseBtn}">
+                <Polygon Fill="{StaticResource color.btn.sec.text.def}" Points="11.2919922 12 12 11.2919922 6.70800781 6 12 0.708007813 11.2919922 0 6 5.29199219 0.708007812 9.76996262e-15 -2.27456942e-13 0.708007813 5.29199219 6 0 11.2919922 0.708007812 12 6 6.70800781" />
+            </Button>
+        </StackPanel>
+
+        <!--  OCR Progress Control  -->
+        <Grid Grid.RowSpan="2" Visibility="{Binding IsProcessVisible}">
+            <Grid.Background>
+                <SolidColorBrush Opacity="0.05" Color="Black" />
+            </Grid.Background>
+            <Border
+                Width="226"
+                Height="58"
+                
+                Background="{StaticResource color.sys.layout.dark.bg}"
+                BorderThickness="0"
+                CornerRadius="{StaticResource border-radius.8}"
+                Effect="{StaticResource shadow.neutral.m}">
+                <Grid Margin="16,13" Background="Transparent">
+                    <StackPanel Orientation="Horizontal">
+                        <TextBlock Foreground="{StaticResource color.sys.text.anti.norm}" Text="{Binding ProgressTitle}" />
+                        <TextBlock Foreground="{StaticResource color.sys.text.anti.norm}" Text="{Binding Value, StringFormat={}({0})}" />
+                    </StackPanel>
+                    <Button
+                        Width="12"
+                        Height="12"
+                        HorizontalAlignment="Right"
+                        VerticalAlignment="Top"
                         BorderThickness="0"
-                    Background="{StaticResource color.sys.layout.dark.bg}"
-                        Command="{Binding CloseOCRCommand}" 
-                         Padding="0,0,1,1">
-                        <Path Data="M6.00006 7.06072L9.46973 10.5304L10.5304 9.46973L7.06072 6.00006L10.5304 2.53039L9.46973 1.46973L6.00006 4.9394L2.53039 1.46973L1.46973 2.53039L4.9394 6.00006L1.46973 9.46973L2.53039 10.5304L6.00006 7.06072Z" Fill="#CED0D4"></Path>
-                    </Button>
-                    <ProgressBar
-                        Height="4"
-                        Margin="0,0,0,4"
-                        VerticalAlignment="Bottom"
-                        BorderThickness="0"
-                        Foreground="{StaticResource color.slider.track-filled.norm}"
-                        Maximum="{Binding MaxValue}"
-                        Value="{Binding Value}" />
-                </Grid>
-            </Border>
-        </Grid>
-    </Grid>
-</Window>
+                    Background="{StaticResource color.sys.layout.dark.bg}"
+                        Command="{Binding CloseOCRCommand}" 
+                         Padding="0,0,1,1">
+                        <Path Data="M6.00006 7.06072L9.46973 10.5304L10.5304 9.46973L7.06072 6.00006L10.5304 2.53039L9.46973 1.46973L6.00006 4.9394L2.53039 1.46973L1.46973 2.53039L4.9394 6.00006L1.46973 9.46973L2.53039 10.5304L6.00006 7.06072Z" Fill="#CED0D4"></Path>
+                    </Button>
+                    <ProgressBar
+                        Height="4"
+                        Margin="0,0,0,4"
+                        VerticalAlignment="Bottom"
+                        BorderThickness="0"
+                        Foreground="{StaticResource color.slider.track-filled.norm}"
+                        Maximum="{Binding MaxValue}"
+                        Value="{Binding Value}" />
+                </Grid>
+            </Border>
+        </Grid>
+    </Grid>
+</Window>

+ 35 - 35
PDF Office/Views/Tools/ToolsBarContent.xaml.cs

@@ -1,37 +1,37 @@
-using System.Windows.Controls;
-
-namespace PDF_Office.Views.Tools
-{
-    /// <summary>
-    /// Interaction logic for ToolsBarContent
-    /// </summary>
-    public partial class ToolsBarContent : UserControl
-    {
-        public ToolsBarContent()
-        {
-            InitializeComponent();
-        }
-
-        private void SecurityButtonMore_Click(object sender, System.Windows.RoutedEventArgs e)
-        {
-            SecurityMenuMore.PlacementTarget = this.SecurityButtonMore;
-            SecurityMenuMore.IsOpen = true;
-        }
-
-        private void SecurityButtonMore_Initialized(object sender, System.EventArgs e)
-        {
-            this.SecurityButtonMore.ContextMenu = null;
+using System.Windows.Controls;
+
+namespace PDF_Office.Views.Tools
+{
+    /// <summary>
+    /// Interaction logic for ToolsBarContent
+    /// </summary>
+    public partial class ToolsBarContent : UserControl
+    {
+        public ToolsBarContent()
+        {
+            InitializeComponent();
+        }
+
+        private void SecurityButtonMore_Click(object sender, System.Windows.RoutedEventArgs e)
+        {
+            SecurityMenuMore.PlacementTarget = this.SecurityButtonMore;
+            SecurityMenuMore.IsOpen = true;
+        }
+
+        private void SecurityButtonMore_Initialized(object sender, System.EventArgs e)
+        {
+            this.SecurityButtonMore.ContextMenu = null;
+        }
+
+        private void CropPageMore_Click(object sender, System.Windows.RoutedEventArgs e)
+        {
+            CropPageMenu.PlacementTarget = this.SecurityButtonMore;
+            CropPageMenu.IsOpen = true;
         }
 
-        private void CropPageMore_Click(object sender, System.Windows.RoutedEventArgs e)
-        {
-            CropPageMenu.PlacementTarget = this.SecurityButtonMore;
-            CropPageMenu.IsOpen = true;
-        }
-
-        private void CropPageMore_Initialized(object sender, System.EventArgs e)
-        {
-            this.CropPageMenuMore.ContextMenu = null;
-        }
-    }
-}
+        private void CropPageMore_Initialized(object sender, System.EventArgs e)
+        {
+            this.CropPageMenuMore.ContextMenu = null;
+        }
+    }
+}

+ 12 - 2
PDF Office/Views/ViewContent.xaml

@@ -43,10 +43,20 @@
                 <Setter Property="Height" Value="20" />
             </Style>
             <convert:BoolToVisible x:Key="BoolToVisibleConvert" />
-      </ResourceDictionary>
+            <RoutedUICommand x:Key="CloseLeft" Text="CloseLeft"/>
+            <RoutedUICommand x:Key="CloseRight" Text="CloseRight"/>
+        </ResourceDictionary>
     </UserControl.Resources>
+    <UserControl.InputBindings>
+        <KeyBinding Command="{StaticResource CloseLeft}" Modifiers="Ctrl" Key="F4" />
+        <KeyBinding Command="{StaticResource CloseRight}" Modifiers="Ctrl+Shift" Key="F4" />
+    </UserControl.InputBindings>
+
+    <UserControl.CommandBindings>
+        <CommandBinding x:Name="CloseLeftCommand" Command="{StaticResource CloseLeft}" Executed="CloseLeftCommand_Executed"/>
+        <CommandBinding x:Name="CloseRightCommand" Command="{StaticResource CloseRight}" Executed="CloseRightCommand_Executed"/>
+    </UserControl.CommandBindings>
 
-    
     <Grid Background="{StaticResource color.sys.layout.mg}">
         <Grid.RowDefinitions>
             <RowDefinition Name="HeadRow" Height="40" />

+ 10 - 0
PDF Office/Views/ViewContent.xaml.cs

@@ -251,5 +251,15 @@ namespace PDF_Office.Views
             }
             catch { }
         }
+
+        private void CloseLeftCommand_Executed(object sender, ExecutedRoutedEventArgs e)
+        {
+            BOTASplitter.Visibility = Visibility.Collapsed;
+        }
+
+        private void CloseRightCommand_Executed(object sender, ExecutedRoutedEventArgs e)
+        {
+            viewModel.ClosePropertyCommand.Execute();
+        }
     }
 }