Browse Source

BOTA大纲列表-移除Esc取消选中逻辑;移除点击阅读页取消选中逻辑

OYXH\oyxh 1 year ago
parent
commit
ecc15a1d73

+ 4 - 5
PDF Office/Styles/OutLineItemStyle.xaml

@@ -96,13 +96,13 @@
                             BorderThickness="{TemplateBinding BorderThickness}"
                             CornerRadius="4"
                             SnapsToDevicePixels="True">
-                            <Grid >
+                            <Grid>
 
                                 <DockPanel x:Name="PART_DockPanel" LastChildFill="True">
                                     <ToggleButton
+                                        x:Name="Expander"
                                         Margin="0,0,0,0"
                                         VerticalAlignment="Top"
-                                        x:Name="Expander"
                                         ClickMode="Press"
                                         IsChecked="{Binding IsExpanded, RelativeSource={RelativeSource TemplatedParent}}"
                                         Style="{StaticResource ExpandCollapseToggleStyle}" />
@@ -159,9 +159,9 @@
                         <MultiTrigger>
                             <MultiTrigger.Conditions>
                                 <Condition Property="IsSelected" Value="True" />
-                                <Condition Property="IsSelectionActive" Value="False" />
+                                <Condition Property="IsSelectionActive" Value="True" />
                             </MultiTrigger.Conditions>
-                            <Setter TargetName="Bd" Property="Background" Value="{DynamicResource {x:Static SystemColors.InactiveSelectionHighlightBrushKey}}" />
+                            <Setter TargetName="Bd" Property="Background" Value="{StaticResource color.item-state.sel.bg.lv3}" />
                             <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.InactiveSelectionHighlightTextBrushKey}}" />
                         </MultiTrigger>
                     </ControlTemplate.Triggers>
@@ -181,7 +181,6 @@
         </Style.Triggers>
     </Style>
 
-
     <SolidColorBrush x:Key="TextBox.Static.Border" Color="#FFABAdB3" />
     <SolidColorBrush x:Key="TextBox.MouseOver.Border" Color="#FF7EB4EA" />
     <SolidColorBrush x:Key="TextBox.Focus.Border" Color="#FF569DE5" />

+ 2 - 1
PDF Office/ViewModels/Tools/AnnotToolContentViewModel.Command.cs

@@ -245,7 +245,8 @@ namespace PDF_Master.ViewModels.Tools
                 int annotCount = PDFViewer.GetSelectAnnotCount();
                 if (annotCount == 0)
                 {
-                    this.events.GetEvent<CleanSelectAllEvent>().Publish(new CleanSelectAllArgs() { Unicode = App.mainWindowViewModel.SelectedItem.Unicode, IsCleanSelectAll = true });
+                    //2023/08/23 Windows:BOTA列表,移除点击阅读页取消选中逻辑
+                    //this.events.GetEvent<CleanSelectAllEvent>().Publish(new CleanSelectAllArgs() { Unicode = App.mainWindowViewModel.SelectedItem.Unicode, IsCleanSelectAll = true });
                 }
             }
         }

+ 14 - 13
PDF Office/Views/BOTA/OutLineControl.xaml.cs

@@ -81,7 +81,8 @@ namespace PDF_Master.Views.BOTA
 
         public OutLineControl(IEventAggregator eventAggregator) : this()
         {
-            eventAggregator.GetEvent<CleanSelectAllEvent>().Subscribe(CleanSelectAll, e => e.Unicode == unicode);
+            //Windows:BOTA列表,移除点击阅读页取消选中逻辑
+            //eventAggregator.GetEvent<CleanSelectAllEvent>().Subscribe(CleanSelectAll, e => e.Unicode == unicode);
         }
 
         private void CleanSelectAll(CleanSelectAllArgs obj)
@@ -141,7 +142,7 @@ namespace PDF_Master.Views.BOTA
                 return;
             }
 
-              (DataContext as OutLineControlViewModel).IsOnDrop = true;
+        (DataContext as OutLineControlViewModel).IsOnDrop = true;
             TreeViewItem sourceitem = e.Data.GetData(typeof(TreeViewItem)) as TreeViewItem;
             if (sourceitem == null)
             {
@@ -161,7 +162,7 @@ namespace PDF_Master.Views.BOTA
                         {
                             Treeviewitem = treeviewitem;
                         }
-                        (DataContext as OutLineControlViewModel).IsInsertHead = true;
+                       (DataContext as OutLineControlViewModel).IsInsertHead = true;
                         (Treeviewitem.DataContext as OutlineNode).IsInsertCurrentLayer = false;
                         (Treeviewitem.DataContext as OutlineNode).IsInsertNextLayer = false;
                     }
@@ -234,7 +235,6 @@ namespace PDF_Master.Views.BOTA
 
         private void OutlineView_PreviewMouseLeftButtonUp(object sender, MouseButtonEventArgs e)
         {
-
             (DataContext as OutLineControlViewModel).IsInsertHead = false;
             if (Treeviewitem != null)
             {
@@ -278,7 +278,7 @@ namespace PDF_Master.Views.BOTA
                 HiddenaAllLine();
                 return;
             }
-           (DataContext as OutLineControlViewModel).MoveOutLine(targetoutlineNode, soureoutlineNode);
+          (DataContext as OutLineControlViewModel).MoveOutLine(targetoutlineNode, soureoutlineNode);
 
             HiddenaAllLine();
             (DataContext as OutLineControlViewModel).Updata(true);
@@ -344,9 +344,9 @@ namespace PDF_Master.Views.BOTA
                         IsReName = false;
                         return;
                     }
-                    (DataContext as OutLineControlViewModel).SetTitle(result, newtitle);
+                (DataContext as OutLineControlViewModel).SetTitle(result, newtitle);
                 }
-                (DataContext as OutLineControlViewModel).Updata(false);
+            (DataContext as OutLineControlViewModel).Updata(false);
             }
             IsReName = false;
         }
@@ -534,12 +534,13 @@ namespace PDF_Master.Views.BOTA
         {
             if (e.Key == Key.Escape)
             {
-                OutlineNode outlineNode = OutlineView.SelectedItem as OutlineNode;
-                if (outlineNode != null)
-                {
-                    outlineNode.IsSelected = false;
-                    e.Handled = true;
-                }
+                //Windows:BOTA列表,移除Esc取消选中逻辑
+                //OutlineNode outlineNode = OutlineView.SelectedItem as OutlineNode;
+                //if (outlineNode != null)
+                //{
+                //    outlineNode.IsSelected = false;
+                //    e.Handled = true;
+                //}
             }
         }