Browse Source

综合-UI整合

OYXH\oyxh 2 years ago
parent
commit
b7b00aa732

+ 3 - 3
PDF Office/Views/BOTA/AnnotationContent.xaml

@@ -47,7 +47,7 @@
             <convert:GroupHeaderConverter x:Key="GroupHeaderConverter" />
         </ResourceDictionary>
     </UserControl.Resources>
-    <Grid Background="#F2F2F2">
+    <Grid>
         <Grid.RowDefinitions>
             <RowDefinition Height="40" />
             <RowDefinition Height="*" />
@@ -163,7 +163,7 @@
                 Grid.ColumnSpan="2"
                 VerticalAlignment="Center"
                 Visibility="{Binding IsEmptyPanelVisibility}">
-                <Image Source="pack://application:,,,/Resources/BOTA/empty_annotation.png" />
+                <Image Source="pack://application:,,,/Resources/BOTA/empty_annotation.png" Width="128" Height="128" />
                 <TextBlock
                     Name="txtEmpty"
                     Margin="0,12,0,0"
@@ -184,7 +184,7 @@
             </StackPanel>
         </Grid>
 
-        <Grid Name="TopGrid" Grid.Row="0">
+        <Grid Name="TopGrid" Grid.Row="0" Background="{StaticResource color.sys.layout.mg}">
             <TextBlock
                 x:Name="Title"
                 Margin="16,0,0,0"

+ 5 - 16
PDF Office/Views/BOTA/AnnotationListItem.xaml

@@ -73,12 +73,12 @@
                             BorderThickness="1"
                             CornerRadius="3"
                             Opacity="1">
+
                             <Path
-                            Margin="-5,-5,0,0"
-                            Data="M7.5 7H20.5C20.7761 7 21 7.22386 21 7.5V20.5C21 20.7761 20.7761 21 20.5 21H7.5C7.22386 21 7 20.7761 7 20.5V7.5C7 7.22386 7.22386 7 7.5 7ZM5 7.5C5 6.11929 6.11929 5 7.5 5H20.5C21.8807 5 23 6.11929 23 7.5V20.5C23 21.8807 21.8807 23 20.5 23H7.5C6.11929 23 5 21.8807 5 20.5V7.5ZM12.1015 17.75H9.84564L12.6874 9.29492H15.3183L18.1601 17.75H15.9042L15.3828 15.8926H12.623L12.1015 17.75ZM14.0585 11.1582H13.9472L13.0566 14.3457H14.9492L14.0585 11.1582Z"
+                            Margin="4.85,4.29,0,0"
+                            Data="M0.845703 8.75H3.10156L3.62305 6.89258H6.38281L6.9043 8.75H9.16016L6.31836 0.294922H3.6875L0.845703 8.75ZM4.94727 2.1582H5.05859L5.94922 5.3457H4.05664L4.94727 2.1582Z"
                             Fill="#273C62" />
                             </Border>-->
-
                             <Border
                                 x:Name="PathHighlight"
                                 Width="20"
@@ -86,22 +86,11 @@
                                 BorderThickness="1"
                                 CornerRadius="3"
                                 Opacity="1">
-
                                 <Path
-                                    Margin="4.85,4.29,0,0"
-                                    Data="M0.845703 8.75H3.10156L3.62305 6.89258H6.38281L6.9043 8.75H9.16016L6.31836 0.294922H3.6875L0.845703 8.75ZM4.94727 2.1582H5.05859L5.94922 5.3457H4.05664L4.94727 2.1582Z"
+                                    Margin="-5,-5,0,0"
+                                    Data="M7.5 7H20.5C20.7761 7 21 7.22386 21 7.5V20.5C21 20.7761 20.7761 21 20.5 21H7.5C7.22386 21 7 20.7761 7 20.5V7.5C7 7.22386 7.22386 7 7.5 7ZM5 7.5C5 6.11929 6.11929 5 7.5 5H20.5C21.8807 5 23 6.11929 23 7.5V20.5C23 21.8807 21.8807 23 20.5 23H7.5C6.11929 23 5 21.8807 5 20.5V7.5ZM12.1015 17.75H9.84564L12.6874 9.29492H15.3183L18.1601 17.75H15.9042L15.3828 15.8926H12.623L12.1015 17.75ZM14.0585 11.1582H13.9472L13.0566 14.3457H14.9492L14.0585 11.1582Z"
                                     Fill="#273C62" />
                             </Border>
-                            <!--<Polygon
-                            Name="PathHighlight"
-                            VerticalAlignment="Center"
-                            Fill="Black"
-                            Points="0,20,3,0,20,0,17,20" />
-                            <Image
-                            Width="18"
-                            Height="18"
-                            Source="pack://application:,,,/Resources/BOTA/Annotation/Highlight.png"
-                            Stretch="UniformToFill" />-->
                         </Grid>
                     </customControl:CustomIconToggleBtn>
                     <!--  手绘  -->

+ 1 - 1
PDF Office/Views/BOTA/BookmarkContent.xaml

@@ -167,7 +167,7 @@
             Width="150"
             VerticalAlignment="Center"
             Visibility="{Binding IsEmptyPanelVisibility}">
-            <Image Source="pack://application:,,,/Resources/BOTA/empty_bookmark.png" />
+            <Image Source="pack://application:,,,/Resources/BOTA/empty_bookmark.png" Width="128" Height="128" />
             <TextBlock
                 Name="txtEmpty"
                 Margin="0,12,0,0"

+ 4 - 17
PDF Office/Views/BOTA/BookmarkContent.xaml.cs

@@ -137,6 +137,7 @@ namespace PDF_Office.Views.BOTA
             ListViewItem listItem = sender as ListViewItem;
             if (listItem != null)
             {
+                BookMarkListView.ItemContainerGenerator.StatusChanged -= ItemContainerGenerator_StatusChanged;
                 viewModel.LostFocusCommand.Execute(listItem);
 
                 TextBlock textBlock = CommonHelper.FindVisualChild<TextBlock>(listItem);
@@ -297,18 +298,10 @@ namespace PDF_Office.Views.BOTA
                 }
                 else
                 {
-                    myListBoxItem.IsSelected = true;
-                    myListBoxItem.Focus();
-
                     TextBox textBox = CommonHelper.FindVisualChild<TextBox>(myListBoxItem);
                     TextBlock textBlock = CommonHelper.FindVisualChild<TextBlock>(myListBoxItem);
-                    textBlock.Visibility = Visibility.Visible;
-                    //textBox.Dispatcher.BeginInvoke(new Action(() =>
-                    //{
-                    //    textBox.Focus();
-                    //    textBox.SelectAll();
-                    //    myListBoxItem.IsSelected = true;
-                    //}));
+
+                    SetSelectedStatus(myListBoxItem, textBox, textBlock);
                 }
             }
         }
@@ -328,15 +321,9 @@ namespace PDF_Office.Views.BOTA
                         myListBoxItem.UpdateLayout();
                         BookMarkListView.ScrollIntoView(viewModel.AddCPDFBookmark);
                     }
-                    myListBoxItem.IsSelected = true;
-                    myListBoxItem.Focus();
-
                     TextBox textBox = CommonHelper.FindVisualChild<TextBox>(myListBoxItem);
                     TextBlock textBlock = CommonHelper.FindVisualChild<TextBlock>(myListBoxItem);
-                    textBlock.Visibility = Visibility.Visible;
-
-                    //textBox.Focus();
-                    //textBox.SelectAll();
+                    SetSelectedStatus(myListBoxItem, textBox, textBlock);
                 }
             }
         }