|
@@ -6,9 +6,9 @@
|
|
xmlns:customcontrol="clr-namespace:PDF_Master.CustomControl"
|
|
xmlns:customcontrol="clr-namespace:PDF_Master.CustomControl"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:local="clr-namespace:PDF_Master.Views.BOTA"
|
|
xmlns:local="clr-namespace:PDF_Master.Views.BOTA"
|
|
|
|
+ xmlns:mainPageLoader="clr-namespace:PDF_Master.Strings.MainPage"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:model="clr-namespace:PDF_Master.Model.BOTA"
|
|
xmlns:model="clr-namespace:PDF_Master.Model.BOTA"
|
|
- xmlns:mainPageLoader="clr-namespace:PDF_Master.Strings.MainPage"
|
|
|
|
d:DataContext="{d:DesignInstance Type=bota:OutLineControlViewModel}"
|
|
d:DataContext="{d:DesignInstance Type=bota:OutLineControlViewModel}"
|
|
KeyDown="UserControl_KeyDown"
|
|
KeyDown="UserControl_KeyDown"
|
|
mc:Ignorable="d">
|
|
mc:Ignorable="d">
|
|
@@ -19,16 +19,19 @@
|
|
</ResourceDictionary.MergedDictionaries>
|
|
</ResourceDictionary.MergedDictionaries>
|
|
|
|
|
|
<ContextMenu x:Key="OutLineItemMenu">
|
|
<ContextMenu x:Key="OutLineItemMenu">
|
|
- <MenuItem x:Name="AddMenu"
|
|
|
|
- Click="AddMenu_Click"
|
|
|
|
- Header="{x:Static mainPageLoader:MainPage.Outline_Add}" />
|
|
|
|
- <MenuItem x:Name="AddChlidMenu"
|
|
|
|
- Click="AddChlidMenu_Click"
|
|
|
|
- Header="{x:Static mainPageLoader:MainPage.Outline_AddSub}" />
|
|
|
|
- <MenuItem x:Name="AddParentMenu"
|
|
|
|
- Click="AddParentMenu_Click"
|
|
|
|
- Header="{x:Static mainPageLoader:MainPage.Outline_AddLevel}"
|
|
|
|
- IsEnabled="{Binding CanAddParent}" />
|
|
|
|
|
|
+ <MenuItem
|
|
|
|
+ x:Name="AddMenu"
|
|
|
|
+ Click="AddMenu_Click"
|
|
|
|
+ Header="{x:Static mainPageLoader:MainPage.Outline_Add}" />
|
|
|
|
+ <MenuItem
|
|
|
|
+ x:Name="AddChlidMenu"
|
|
|
|
+ Click="AddChlidMenu_Click"
|
|
|
|
+ Header="{x:Static mainPageLoader:MainPage.Outline_AddSub}" />
|
|
|
|
+ <MenuItem
|
|
|
|
+ x:Name="AddParentMenu"
|
|
|
|
+ Click="AddParentMenu_Click"
|
|
|
|
+ Header="{x:Static mainPageLoader:MainPage.Outline_AddLevel}"
|
|
|
|
+ IsEnabled="{Binding CanAddParent}" />
|
|
|
|
|
|
<MenuItem
|
|
<MenuItem
|
|
x:Name="DeleteMenu"
|
|
x:Name="DeleteMenu"
|
|
@@ -56,17 +59,18 @@
|
|
IsEnabled="{Binding CanDown}" />
|
|
IsEnabled="{Binding CanDown}" />
|
|
</ContextMenu>
|
|
</ContextMenu>
|
|
<!-- 圆角 https://wpf.2000things.com/2012/05/11/556-clipping-to-a-border-using-an-opacity-mask -->
|
|
<!-- 圆角 https://wpf.2000things.com/2012/05/11/556-clipping-to-a-border-using-an-opacity-mask -->
|
|
- <ToolTip x:Key="OutLineItemToolTip"
|
|
|
|
- Width="320"
|
|
|
|
- Height="120"
|
|
|
|
- Closed="ToolTip_Closed"
|
|
|
|
- Opened="ToolTip_Opened"
|
|
|
|
- Style="{StaticResource ErrorRoundedTooltip}">
|
|
|
|
|
|
+ <ToolTip
|
|
|
|
+ x:Key="OutLineItemToolTip"
|
|
|
|
+ Width="320"
|
|
|
|
+ Height="120"
|
|
|
|
+ Closed="ToolTip_Closed"
|
|
|
|
+ Opened="ToolTip_Opened"
|
|
|
|
+ Style="{StaticResource ErrorRoundedTooltip}">
|
|
<customcontrol:CustomImageControl
|
|
<customcontrol:CustomImageControl
|
|
- Width="320"
|
|
|
|
- Height="120"
|
|
|
|
- HorizontalAlignment="Stretch"
|
|
|
|
- VerticalAlignment="Stretch" />
|
|
|
|
|
|
+ Width="320"
|
|
|
|
+ Height="120"
|
|
|
|
+ HorizontalAlignment="Stretch"
|
|
|
|
+ VerticalAlignment="Stretch" />
|
|
</ToolTip>
|
|
</ToolTip>
|
|
</ResourceDictionary>
|
|
</ResourceDictionary>
|
|
</UserControl.Resources>
|
|
</UserControl.Resources>
|
|
@@ -79,13 +83,13 @@
|
|
<Grid x:Name="Header">
|
|
<Grid x:Name="Header">
|
|
<TextBlock
|
|
<TextBlock
|
|
x:Name="TxtTitle"
|
|
x:Name="TxtTitle"
|
|
- Text="{Binding T_Title}"
|
|
|
|
Margin="16,0,0,0"
|
|
Margin="16,0,0,0"
|
|
HorizontalAlignment="Left"
|
|
HorizontalAlignment="Left"
|
|
VerticalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
FontFamily="Segoe UI"
|
|
FontFamily="Segoe UI"
|
|
FontSize="14"
|
|
FontSize="14"
|
|
- FontWeight="SemiBold"/>
|
|
|
|
|
|
+ FontWeight="SemiBold"
|
|
|
|
+ Text="{Binding T_Title}" />
|
|
<StackPanel HorizontalAlignment="Right" Orientation="Horizontal">
|
|
<StackPanel HorizontalAlignment="Right" Orientation="Horizontal">
|
|
<customcontrol:PathButton
|
|
<customcontrol:PathButton
|
|
x:Name="BtnAdd"
|
|
x:Name="BtnAdd"
|
|
@@ -133,18 +137,18 @@
|
|
</ContextMenu.ItemContainerStyle>
|
|
</ContextMenu.ItemContainerStyle>
|
|
<MenuItem
|
|
<MenuItem
|
|
Name="MenuExpandAll"
|
|
Name="MenuExpandAll"
|
|
- Header="{Binding T_Expand}"
|
|
|
|
Command="{Binding ExpandAllCommand}"
|
|
Command="{Binding ExpandAllCommand}"
|
|
- CommandParameter="{Binding Outlinelist}" />
|
|
|
|
|
|
+ CommandParameter="{Binding Outlinelist}"
|
|
|
|
+ Header="{Binding T_Expand}" />
|
|
<MenuItem
|
|
<MenuItem
|
|
Name="MenuCollapseAll"
|
|
Name="MenuCollapseAll"
|
|
- Header="{Binding T_Collapse}"
|
|
|
|
Command="{Binding CollapseAllCommand}"
|
|
Command="{Binding CollapseAllCommand}"
|
|
- CommandParameter="{Binding Outlinelist}"/>
|
|
|
|
|
|
+ CommandParameter="{Binding Outlinelist}"
|
|
|
|
+ Header="{Binding T_Collapse}" />
|
|
<MenuItem
|
|
<MenuItem
|
|
Name="MenuDeleteAll"
|
|
Name="MenuDeleteAll"
|
|
- Header="{Binding T_RemoveAll}"
|
|
|
|
- Command="{Binding DeleteAllCommand}" />
|
|
|
|
|
|
+ Command="{Binding DeleteAllCommand}"
|
|
|
|
+ Header="{Binding T_RemoveAll}" />
|
|
</ContextMenu>
|
|
</ContextMenu>
|
|
</customcontrol:PathButton.ContextMenu>
|
|
</customcontrol:PathButton.ContextMenu>
|
|
</customcontrol:PathButton>
|
|
</customcontrol:PathButton>
|
|
@@ -192,14 +196,14 @@
|
|
HorizontalAlignment="Center"
|
|
HorizontalAlignment="Center"
|
|
FontFamily="Segoe UI"
|
|
FontFamily="Segoe UI"
|
|
FontSize="14"
|
|
FontSize="14"
|
|
- Text="No outline found" />
|
|
|
|
|
|
+ Text="No Outlines" />
|
|
<TextBlock
|
|
<TextBlock
|
|
Width="168"
|
|
Width="168"
|
|
HorizontalAlignment="Center"
|
|
HorizontalAlignment="Center"
|
|
FontFamily="Segoe UI"
|
|
FontFamily="Segoe UI"
|
|
FontSize="12"
|
|
FontSize="12"
|
|
Foreground="#94989C"
|
|
Foreground="#94989C"
|
|
- Text="Please right-click on the selected page and select Add Outline, or click the Add button on the upper right to create a outline."
|
|
|
|
|
|
+ Text="Please right-click on the selected page and select 'Add Outline', or click the 'Add' button on the upper right to create a outline."
|
|
TextWrapping="Wrap" />
|
|
TextWrapping="Wrap" />
|
|
</StackPanel>
|
|
</StackPanel>
|
|
<TreeView
|
|
<TreeView
|
|
@@ -211,8 +215,8 @@
|
|
Drop="OutlineView_Drop"
|
|
Drop="OutlineView_Drop"
|
|
ItemsSource="{Binding Outlinelist}"
|
|
ItemsSource="{Binding Outlinelist}"
|
|
PreviewMouseDoubleClick="OutlineView_PreviewMouseDoubleClick"
|
|
PreviewMouseDoubleClick="OutlineView_PreviewMouseDoubleClick"
|
|
- PreviewMouseLeftButtonUp="OutlineView_PreviewMouseLeftButtonUp"
|
|
|
|
PreviewMouseDown="OutlineView_PreviewMouseDown"
|
|
PreviewMouseDown="OutlineView_PreviewMouseDown"
|
|
|
|
+ PreviewMouseLeftButtonUp="OutlineView_PreviewMouseLeftButtonUp"
|
|
PreviewMouseMove="OutlineView_PreviewMouseMove"
|
|
PreviewMouseMove="OutlineView_PreviewMouseMove"
|
|
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
|
|
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
|
|
VirtualizingPanel.ScrollUnit="Pixel"
|
|
VirtualizingPanel.ScrollUnit="Pixel"
|
|
@@ -270,18 +274,18 @@
|
|
x:Name="ReName"
|
|
x:Name="ReName"
|
|
HorizontalAlignment="Left"
|
|
HorizontalAlignment="Left"
|
|
VerticalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
- TextWrapping="WrapWithOverflow"
|
|
|
|
IsVisibleChanged="ReName_IsVisibleChanged"
|
|
IsVisibleChanged="ReName_IsVisibleChanged"
|
|
KeyDown="ReName_KeyDown"
|
|
KeyDown="ReName_KeyDown"
|
|
- Style="{StaticResource TextBoxStyleRadius}" />
|
|
|
|
|
|
+ Style="{StaticResource TextBoxStyleRadius}"
|
|
|
|
+ TextWrapping="WrapWithOverflow" />
|
|
</Grid>
|
|
</Grid>
|
|
</Grid>
|
|
</Grid>
|
|
</HierarchicalDataTemplate>
|
|
</HierarchicalDataTemplate>
|
|
</TreeView.ItemTemplate>
|
|
</TreeView.ItemTemplate>
|
|
<TreeView.ItemContainerStyle>
|
|
<TreeView.ItemContainerStyle>
|
|
<Style BasedOn="{StaticResource OutLineItemStyle}" TargetType="TreeViewItem">
|
|
<Style BasedOn="{StaticResource OutLineItemStyle}" TargetType="TreeViewItem">
|
|
- <Setter Property="ContextMenu" Value="{StaticResource OutLineItemMenu}" />
|
|
|
|
- <Setter Property="ToolTip" Value="{StaticResource OutLineItemToolTip}" />
|
|
|
|
|
|
+ <Setter Property="ContextMenu" Value="{StaticResource OutLineItemMenu}" />
|
|
|
|
+ <Setter Property="ToolTip" Value="{StaticResource OutLineItemToolTip}" />
|
|
<EventSetter Event="PreviewMouseLeftButtonUp" Handler="TreeViewItem_PreviewMouseLeftButtonUp" />
|
|
<EventSetter Event="PreviewMouseLeftButtonUp" Handler="TreeViewItem_PreviewMouseLeftButtonUp" />
|
|
<EventSetter Event="PreviewMouseLeftButtonDown" Handler="TreeViewItem_PreviewMouseLeftButtonDown" />
|
|
<EventSetter Event="PreviewMouseLeftButtonDown" Handler="TreeViewItem_PreviewMouseLeftButtonDown" />
|
|
</Style>
|
|
</Style>
|