Browse Source

页面编辑-修复重复点击页签后缩略图不显示的问题

ZhouJieSheng 1 year ago
parent
commit
cf13e01423

+ 16 - 10
PDF Office/Views/MainWindow.xaml

@@ -113,7 +113,13 @@
                                             Command="{Binding DataContext.CloseTab}"
                                             CommandParameter="{Binding}"
                                             Style="{StaticResource btn.selector}">
-                                            <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}" />
+                                            <Path
+                                                Width="12"
+                                                Height="12"
+                                                HorizontalAlignment="Center"
+                                                VerticalAlignment="Center"
+                                                Data="M6.5 7.06066L9.96967 10.5303L11.0303 9.46967L7.56066 6L11.0303 2.53033L9.96967 1.46967L6.5 4.93934L3.03033 1.46967L1.96967 2.53033L5.43934 6L1.96967 9.46967L3.03033 10.5303L6.5 7.06066Z"
+                                                Fill="{StaticResource color.icon.base.neutral.norm.lv2}" />
                                         </Button>
 
                                         <TextBox
@@ -349,17 +355,17 @@
                         Height="24"
                         Background="#1770F4"
                         BorderBrush="#1770F4"
-                        CornerRadius="100" >
+                        CornerRadius="100">
                         <TextBlock
-                        VerticalAlignment="Center"
-                        HorizontalAlignment="Center"
-                        FontFamily="SF Pro Text"
-                        FontSize="20"
-                        FontWeight="SemiBold"
-                        Foreground="White"
-                        Text="{Binding  Useremailchar}" />
+                            HorizontalAlignment="Center"
+                            VerticalAlignment="Center"
+                            FontFamily="SF Pro Text"
+                            FontSize="20"
+                            FontWeight="SemiBold"
+                            Foreground="White"
+                            Text="{Binding Useremailchar}" />
                     </Border>
-                    
+
                 </Grid>
             </Button>
             <Separator BorderBrush="#94989C" BorderThickness="1">

+ 1 - 0
PDF Office/Views/PageEdit/PageEditContent.xaml

@@ -25,6 +25,7 @@
     IsVisibleChanged="PageEdit_IsVisibleChanged"
     SizeChanged="PageEdit_SizeChanged"
     Unloaded="PageEdit_Unloaded"
+    Loaded="PageEdit_Loaded"
     mc:Ignorable="d">
     <UserControl.Resources>
         <ResourceDictionary>

+ 15 - 0
PDF Office/Views/PageEdit/PageEditContent.xaml.cs

@@ -861,6 +861,12 @@ namespace PDF_Master.Views.PageEdit
             {
                 ItemSuitAcutalWidth(e.NewSize.Width);
             }
+
+            if(e.NewSize.Width>0)
+            {
+                //宽度变化后刷新一次视图 修复重复点击缩略图后图片不显示的问题
+                PulishEvent();
+            }
         }
 
         private void ItemSuitAcutalWidth(double width)
@@ -1026,5 +1032,14 @@ namespace PDF_Master.Views.PageEdit
                 timer = null;
             }
         }
+
+        private void PageEdit_Loaded(object sender, RoutedEventArgs e)
+        {
+            if (timer == null)
+            {
+                timer = new DispatcherTimer();
+                timer.Tick += Timer_Tick;
+            }
+        }
     }
 }