123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764 |
- <UserControl
- x:Class="PDF_Master.Views.ViewContent"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:convert="clr-namespace:PDF_Master.DataConvert"
- xmlns:cus="clr-namespace:PDF_Master.CustomControl"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:helper="clr-namespace:PDF_Master.Helper"
- xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:prism="http://prismlibrary.com/"
- xmlns:viewmodels="clr-namespace:PDF_Master.ViewModels"
- d:DataContext="{d:DesignInstance Type=viewmodels:ViewContentViewModel}"
- d:DesignHeight="450"
- d:DesignWidth="800"
- prism:ViewModelLocator.AutoWireViewModel="True"
- AllowDrop="True"
- DragEnter="UserControl_DragEnter"
- DragLeave="UserControl_DragLeave"
- DragOver="UserControl_DragOver"
- Loaded="UserControl_Loaded"
- MouseDown="UserControl_MouseDown"
- PreviewDrop="UserControl_Drop"
- Unloaded="UserControl_Unloaded"
- mc:Ignorable="d">
- <i:Interaction.Triggers>
- <i:EventTrigger EventName="Loaded">
- <prism:InvokeCommandAction Command="{Binding Load}" />
- </i:EventTrigger>
- <i:EventTrigger EventName="PreviewMouseDown">
- <prism:InvokeCommandAction Command="{Binding MouseDown}" />
- </i:EventTrigger>
- </i:Interaction.Triggers>
- <UserControl.Resources>
- <ResourceDictionary>
- <ResourceDictionary.MergedDictionaries>
- <ResourceDictionary Source="pack://application:,,,/Styles/ButtonStyle.xaml" />
- </ResourceDictionary.MergedDictionaries>
- <convert:InvertBoolConvert x:Key="UnBoolConvert" />
- <Style x:Key="MenuButtonStyle" TargetType="{x:Type Button}">
- <Setter Property="Width" Value="20" />
- <Setter Property="Height" Value="20" />
- </Style>
- <convert:BoolToVisible x:Key="BoolToVisibleConvert" />
- <RoutedUICommand x:Key="CloseLeft" Text="CloseLeft" />
- <RoutedUICommand x:Key="CloseRight" Text="CloseRight" />
- <RoutedUICommand x:Key="AddTab" Text="AddTab" />
- <RoutedUICommand x:Key="CloseTab" Text="CloseTab" />
- </ResourceDictionary>
- </UserControl.Resources>
- <UserControl.InputBindings>
- <KeyBinding
- Key="F4"
- Command="{StaticResource CloseLeft}"
- Modifiers="Ctrl" />
- <KeyBinding
- Key="F4"
- Command="{StaticResource CloseRight}"
- Modifiers="Ctrl+Shift" />
- <KeyBinding Command="{Binding OpenFileCommand}" Gesture="Ctrl+O" />
- <KeyBinding
- Key="T"
- Command="{StaticResource AddTab}"
- Modifiers="Ctrl" />
- <KeyBinding Command="{Binding SaveFile}" Gesture="Ctrl+S" />
- <KeyBinding Command="{Binding SaveAsFile}" Gesture="Ctrl+Shift+S" />
- <KeyBinding Command="{Binding CloseWindowCommand}" Gesture="Ctrl+Shift+W" />
- <KeyBinding Command="{Binding PropertyCommand}" Gesture="Ctrl+I" />
- <KeyBinding
- Key="W"
- Command="{StaticResource CloseTab}"
- Modifiers="Ctrl" />
- <KeyBinding
- Key="P"
- Command="{Binding PrintCommand}"
- Modifiers="Ctrl" />
- <KeyBinding
- Key="S"
- Command="{Binding SaveFile}"
- Modifiers="Ctrl" />
- <KeyBinding
- Key="Z"
- Command="{Binding UndoCommand}"
- Modifiers="Ctrl" />
- <KeyBinding Command="{Binding RedoCommand}" Gesture="Ctrl+Shift+Z" />
- <KeyBinding
- Key="Up"
- Command="{Binding FirstPageCommand}"
- Modifiers="Ctrl" />
- <KeyBinding
- Key="Down"
- Command="{Binding LastPageCommand}"
- Modifiers="Ctrl" />
- <KeyBinding Key="Up" Command="{Binding UpCommand}" />
- <KeyBinding Key="Left" Command="{Binding LeftCommand}" />
- <KeyBinding Key="PageUp" Command="{Binding PrePageCommand}" />
- <KeyBinding Key="Down" Command="{Binding DownCommand}" />
- <KeyBinding Key="PageDown" Command="{Binding NextPageCommmand}" />
- <KeyBinding Key="Right" Command="{Binding RightCommand}" />
- <KeyBinding
- Key="B"
- Command="{x:Static helper:GlobalCommands.BookMarkCommand}"
- Modifiers="Ctrl" />
- <KeyBinding Key="F11" Command="{Binding OpenFullCommand}" />
- <KeyBinding
- Key="NumPad1"
- Command="{Binding SinglePageCommand}"
- Modifiers="Ctrl" />
- <KeyBinding
- Key="D1"
- Command="{Binding SinglePageCommand}"
- Modifiers="Ctrl" />
- <KeyBinding
- Key="NumPad2"
- Command="{Binding DoublePageCommand}"
- Modifiers="Ctrl" />
- <KeyBinding
- Key="D2"
- Command="{Binding DoublePageCommand}"
- Modifiers="Ctrl" />
- <KeyBinding
- Key="NumPad0"
- Command="{Binding RealSizeCommand}"
- Modifiers="Ctrl" />
- <KeyBinding
- Key="D0"
- Command="{Binding RealSizeCommand}"
- Modifiers="Ctrl" />
- <KeyBinding
- Key="Add"
- Command="{Binding ZoomInCommand}"
- Modifiers="Ctrl" />
- <KeyBinding
- Key="OemPlus"
- Command="{Binding ZoomInCommand}"
- Modifiers="Ctrl" />
- <KeyBinding
- Key="Subtract"
- Command="{Binding ZoomOutCommand}"
- Modifiers="Ctrl" />
- <KeyBinding
- Key="OemMinus"
- Command="{Binding ZoomOutCommand}"
- Modifiers="Ctrl" />
- <KeyBinding
- Key="OemOpenBrackets"
- Command="{Binding PreViewCommand}"
- Modifiers="Ctrl" />
- <KeyBinding
- Key="OemCloseBrackets"
- Command="{Binding NextViewCommand}"
- Modifiers="Ctrl" />
- </UserControl.InputBindings>
- <UserControl.CommandBindings>
- <CommandBinding
- x:Name="CloseLeftCommand"
- Command="{StaticResource CloseLeft}"
- Executed="CloseLeftCommand_Executed" />
- <CommandBinding
- x:Name="AddTabCommand"
- Command="{StaticResource AddTab}"
- Executed="AddTabCommand_Executed" />
- <CommandBinding
- x:Name="CloseTabCommand"
- Command="{StaticResource CloseTab}"
- Executed="CloseTabCommand_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" />
- <RowDefinition Name="ToolRow" Height="{Binding ToolTooRow, Mode=TwoWay}" />
- <RowDefinition Height="*" />
- <RowDefinition Height="32" />
- </Grid.RowDefinitions>
- <Grid Visibility="{Binding GridVisibility}">
- <!-- 左边菜单按钮 -->
- <StackPanel
- x:Name="Leftpanel"
- Margin="16,6,0,6"
- HorizontalAlignment="Left"
- Orientation="Horizontal"
- Visibility="{Binding IsReadMode}">
- <Button
- Name="BtnFile"
- Click="BtnFile_Click"
- Content="Files"
- Initialized="BtnFile_Initialized"
- Style="{StaticResource subToolBar}"
- ToolTip="{Binding T_File}">
- <Button.ContextMenu>
- <!-- 设置一个最小宽度,修复清空最近文件列表后,大概率偶现右键菜单宽度显示不全的问题 -->
- <ContextMenu Name="FileMenu" MinWidth="240">
- <MenuItem
- Command="{Binding OpenFileCommand}"
- Header="Open Files"
- InputGestureText="Ctrl+O" />
- <MenuItem
- Name="MenuRecent"
- Header="Open Recent"
- Loaded="MenuRecent_Loaded">
- <Separator Name="Menu_Separator" Style="{StaticResource HorizontalSeparatorStyle}" />
- <MenuItem
- Name="MenuDeleteAll"
- Click="MenuDeleteAll_Click"
- Header="Delete All" />
- </MenuItem>
- <MenuItem Header="Create Files">
- <MenuItem Command="{Binding CreateFromFile}" Header="Create From File" />
- <MenuItem Command="{Binding CreateBlankFileCommand}" Header="Create Blank Page" />
- <MenuItem
- Command="{Binding mainViewModel.homeContentViewModel.CreateFromScanner}"
- CommandParameter="View"
- Header="Create Form Scanner" />
- </MenuItem>
- <Separator Margin="8,0" Style="{StaticResource HorizontalSeparatorStyle}" />
- <MenuItem
- Command="{Binding SaveFile}"
- Header="Save"
- InputGestureText="Ctrl+S" />
- <MenuItem
- Command="{Binding SaveAsFile}"
- Header="Save As"
- InputGestureText="Ctrl+Shift+S" />
- <MenuItem Command="{Binding SaveAsFlattenCommand}" Header="Save as Flattened PDF" />
- <Separator Margin="8,0" Style="{StaticResource HorizontalSeparatorStyle}" />
- <MenuItem Command="{Binding CompressCommand}" Header="Compress" />
- <MenuItem Header="Security">
- <MenuItem Command="{Binding EncryptCommand}" Header="Set Passwords" />
- <MenuItem Command="{Binding DecryptCommand}" Header="Remove Security" />
- </MenuItem>
- <MenuItem Header="Convert To">
- <MenuItem
- Command="{Binding ConvertCommand}"
- CommandParameter="Word"
- Header="Word" />
- <MenuItem
- Command="{Binding ConvertCommand}"
- CommandParameter="Excel"
- Header="Excel" />
- <MenuItem
- Command="{Binding ConvertCommand}"
- CommandParameter="PPT"
- Header="PowerPoint" />
- <MenuItem
- Command="{Binding ConvertCommand}"
- CommandParameter="RTF"
- Header="RTF" />
- <MenuItem
- Command="{Binding ConvertCommand}"
- CommandParameter="HTML"
- Header="HTML" />
- <MenuItem
- Command="{Binding ConvertCommand}"
- CommandParameter="Text"
- Header="Text" />
- <MenuItem
- Command="{Binding ConvertCommand}"
- CommandParameter="CSV"
- Header="CSV" />
- <MenuItem
- Command="{Binding ConvertCommand}"
- CommandParameter="Image"
- Header="Image" />
- </MenuItem>
- <MenuItem Command="{Binding MergeFileCommand}" Header="Merge PDF Files" />
- <!--暂时隐藏,V1.2.0上线前确认后删除
- <Separator Margin="8,0" Style="{StaticResource HorizontalSeparatorStyle}" />
- <MenuItem
- Command="{Binding CloseWindowCommand}"
- Header="Close Window"
- InputGestureText="Ctrl+Shift+W" />
- <MenuItem
- Command="{Binding mainViewModel.CloseTab}"
- Header="Close Tab"
- InputGestureText="Ctrl+W" />-->
- <Separator Margin="8,0" Style="{StaticResource HorizontalSeparatorStyle}" />
- <!--<MenuItem Command="{Binding ShowInFolderCommand}" Header="Show in Folder" />-->
- <MenuItem Command="{Binding PropertyCommand}" Header="Properties" />
- <Separator Margin="8,0" Style="{StaticResource HorizontalSeparatorStyle}" />
- <MenuItem Command="{Binding ShareCommand}" Header="Share" />
- <MenuItem
- Command="{Binding PrintCommand}"
- Header="Print"
- InputGestureText="Ctrl+P" />
- </ContextMenu>
- </Button.ContextMenu>
- </Button>
- <Separator
- Width="1"
- Height="12"
- Margin="8,0"
- Background="{StaticResource color.sys.layout.divider}"
- Style="{StaticResource {x:Static ToolBar.SeparatorStyleKey}}" />
- <Button
- Command="{Binding SaveFile}"
- IsEnabled="{Binding CanSave}"
- Style="{StaticResource subToolBar}"
- ToolTip="{Binding T_Save}">
- <Path
- Width="20"
- Height="20"
- Data="M16 16V6.82843L13.1716 4H12V8C12 9.10457 11.1046 10 10 10H7C5.89543 10 5 9.10457 5 8V4H4V16H16ZM7 4H10V8H7V4ZM13.1716 2H12H10H7H5H4C2.89543 2 2 2.89543 2 4V16C2 17.1046 2.89543 18 4 18H16C17.1046 18 18 17.1046 18 16V6.82843C18 6.29799 17.7893 5.78929 17.4142 5.41421L14.5858 2.58579C14.2107 2.21071 13.702 2 13.1716 2ZM9.25 5H7.75V7H9.25V5Z"
- Fill="{StaticResource color.icon.base.neutral.norm.lv1}" />
- </Button>
- <Button
- Margin="2,0"
- Command="{Binding UndoCommand}"
- IsEnabled="{Binding CanUndo}"
- Style="{StaticResource subToolBar}"
- ToolTip="{Binding T_Undo}">
- <Path
- Width="20"
- Height="20"
- Data="M5.75766 8.00008L6.70741 8.94982L5.2932 10.364L2.46477 7.53561C2.07424 7.14508 2.07424 6.51192 2.46477 6.1214L5.2932 3.29297L6.70741 4.70718L5.41451 6.00008H12.5001C15.5377 6.00008 18.0001 8.46251 18.0001 11.5001C18.0001 14.5376 15.5377 17.0001 12.5001 17.0001H3.00012V15.0001H12.5001C14.4331 15.0001 16.0001 13.4331 16.0001 11.5001C16.0001 9.56708 14.4331 8.00008 12.5001 8.00008H5.75766Z"
- Fill="{StaticResource color.icon.base.neutral.norm.lv1}" />
- </Button>
- <Button
- Command="{Binding RedoCommand}"
- IsEnabled="{Binding CanRedo}"
- Style="{StaticResource subToolBar}"
- ToolTip="{Binding T_Redo}">
- <Path
- Width="20"
- Height="20"
- Data="M14.2424 8.00006L13.2926 8.94982L14.7068 10.364L17.5352 7.53561C17.9258 7.14508 17.9258 6.51192 17.5352 6.1214L14.7068 3.29297L13.2926 4.70718L14.5855 6.00006H7.49969C4.46213 6.00006 1.9997 8.46249 1.9997 11.5001C1.9997 14.5376 4.46213 17.0001 7.4997 17.0001H16.9997V15.0001H7.4997C5.5667 15.0001 3.9997 13.4331 3.9997 11.5001C3.9997 9.56706 5.5667 8.00006 7.49969 8.00006H14.2424Z"
- Fill="{StaticResource color.icon.base.neutral.norm.lv1}" />
- </Button>
- <Button
- Name="BtnMore"
- Margin="2,0"
- Click="BtnMore_Click"
- Initialized="BtnMore_Initialized"
- Style="{StaticResource subToolBar}">
- <Path
- Width="28"
- Height="28"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Data="M9 14C9 15.1046 8.10457 16 7 16C5.89543 16 5 15.1046 5 14C5 12.8954 5.89543 12 7 12C8.10457 12 9 12.8954 9 14ZM16 14C16 15.1046 15.1046 16 14 16C12.8954 16 12 15.1046 12 14C12 12.8954 12.8954 12 14 12C15.1046 12 16 12.8954 16 14ZM21 16C22.1046 16 23 15.1046 23 14C23 12.8954 22.1046 12 21 12C19.8954 12 19 12.8954 19 14C19 15.1046 19.8954 16 21 16Z"
- Fill="{StaticResource color.icon.base.neutral.norm.lv1}" />
- <Button.ContextMenu>
- <ContextMenu Name="MenuMore">
- <MenuItem Command="{Binding SettingsCommand}" Header="Settings" />
- <MenuItem Header="Help">
- <MenuItem
- Command="{Binding HelpCommand}"
- CommandParameter="Guid"
- Header="Quick Guide" />
- <MenuItem
- Command="{Binding HelpCommand}"
- CommandParameter="Online"
- Header="在线帮助"
- Visibility="Collapsed" />
- <MenuItem
- Command="{Binding HelpCommand}"
- CommandParameter="More"
- Header="More Products" />
- <MenuItem
- Command="{Binding HelpCommand}"
- CommandParameter="Template"
- Header="Free Template" />
- <MenuItem
- Command="{Binding HelpCommand}"
- CommandParameter="Blog"
- Header="订阅电子报"
- Visibility="Collapsed" />
- <MenuItem
- Command="{Binding HelpCommand}"
- CommandParameter="ComPDF"
- Header="Powered by ComPDFKit" />
- <Separator Style="{StaticResource HorizontalSeparatorStyle}" />
- <MenuItem
- Command="{Binding HelpCommand}"
- CommandParameter="FeedBack"
- Header="Feedback" />
- </MenuItem>
- <MenuItem Command="{Binding RefreshCommand}" Header="Account Refresh" />
- <MenuItem Click="MenuItem_Click" Header="Check Update" />
- <MenuItem Command="{Binding AboutDialogCommmand}" Header="About" />
- </ContextMenu>
- </Button.ContextMenu>
- </Button>
- </StackPanel>
- <!-- 右边菜单按钮 -->
- <StackPanel
- x:Name="Rightpanel"
- Margin="0,6,16,6"
- HorizontalAlignment="Right"
- Orientation="Horizontal"
- Visibility="{Binding IsReadMode}">
- <Button
- x:Name="ButLeft"
- Width="20"
- Height="40"
- HorizontalAlignment="Left"
- VerticalAlignment="Center"
- Click="ButLeft_Click"
- Style="{StaticResource subToolBar}">
- <Path
- Width="24"
- Height="24"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Data="M10.0607 12.1L14.6303 7.53039L13.5696 6.46973L8.46967 11.5697C8.17678 11.8626 8.17678 12.3374 8.46967 12.6303L13.5696 17.7303L14.6303 16.6696L10.0607 12.1Z"
- Fill="{Binding RelativeSource={RelativeSource AncestorType={x:Type Button}}, Path=Foreground}" />
- </Button>
- <Button
- x:Name="ButRight"
- Width="20"
- Height="40"
- HorizontalAlignment="Right"
- VerticalAlignment="Center"
- Click="ButRight_Click"
- Style="{StaticResource subToolBar}">
- <Path
- Width="24"
- Height="24"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Data="M13.9393 12.1L9.36972 7.53039L10.4304 6.46973L15.5303 11.5697C15.8232 11.8626 15.8232 12.3374 15.5303 12.6303L10.4304 17.7303L9.36972 16.6696L13.9393 12.1Z"
- Fill="{Binding RelativeSource={RelativeSource AncestorType={x:Type Button}}, Path=Foreground}" />
- </Button>
- <Button
- Margin="6,0"
- Command="{Binding AITranslationCommand}"
- Style="{StaticResource subToolBar}"
- ToolTip="AI Translation">
- <Image
- Width="28"
- Height="28"
- Source="pack://application:,,,/PDF Master;component/Resources/HomeTools/ChatGPTTranslation.png" />
- </Button>
- <Button
- Margin="2,0"
- Command="{Binding ShareCommand}"
- Style="{StaticResource subToolBar}"
- ToolTip="{Binding T_Share}">
- <Path
- Width="20"
- Height="20"
- Data="M15.0858 3.5H11.25V1.5H16.6395C17.667 1.5 18.5 2.33298 18.5 3.36051V8.75H16.5V4.91421L11.136 10.2782L9.72183 8.86396L15.0858 3.5ZM4.25 4C4.11193 4 4 4.11193 4 4.25V15.75C4 15.8881 4.11193 16 4.25 16H15.75C15.8881 16 16 15.8881 16 15.75V10.875H18V15.75C18 16.9926 16.9926 18 15.75 18H4.25C3.00736 18 2 16.9926 2 15.75V4.25C2 3.00736 3.00736 2 4.25 2H9.125V4H4.25Z"
- Fill="{StaticResource color.icon.base.neutral.norm.lv1}" />
- </Button>
- <ToggleButton
- Name="TbtnProperty"
- Width="28"
- Height="28"
- BorderThickness="0"
- Command="{Binding OpenPropertyCommand}"
- CommandParameter="{Binding ElementName=TbtnProperty, Path=IsChecked}"
- IsChecked="{Binding IsPropertyOpen, Mode=TwoWay}"
- IsEnabled="{Binding isInPageEdit, Converter={StaticResource UnBoolConvert}}"
- Style="{StaticResource SubToolbarTgb}"
- ToolTip="{Binding T_Properties}">
- <Path
- Width="20"
- Height="20"
- Data="M2 4V7H18V4H2ZM2 16V9H13V16H2ZM15 16H18V9H15V16ZM1.72101 2C0.770524 2 0 2.77052 0 3.72101V16.279C0 17.2295 0.770524 18 1.72101 18H18.279C19.2295 18 20 17.2295 20 16.279V3.72101C20 2.77052 19.2295 2 18.279 2H1.72101Z"
- Fill="{Binding ElementName=TbtnProperty, Path=Foreground}" />
- </ToggleButton>
- </StackPanel>
- <ScrollViewer
- x:Name="ScrViewTab"
- Margin="180,0,145,0"
- VerticalAlignment="Center"
- CanContentScroll="False"
- HorizontalScrollBarVisibility="Hidden"
- ScrollChanged="ScrViewTab_ScrollChanged"
- VerticalScrollBarVisibility="Disabled">
- <TabControl
- x:Name="ToolTabControl"
- Grid.Row="0"
- Grid.RowSpan="2"
- HorizontalAlignment="Center"
- VerticalAlignment="Top"
- BorderThickness="0"
- FocusVisualStyle="{x:Null}"
- Keyboard.PreviewKeyDown="ToolTabControl_PreviewKeyDown"
- PreviewMouseLeftButtonDown="ToolTabControl_PreviewMouseLeftButtonDown"
- SelectedIndex="{Binding TabSelectedIndex, Mode=TwoWay}"
- Style="{StaticResource TabControlWithUnderLineStyle}"
- Visibility="{Binding IsReadMode}">
- <cus:IconAndTextTabItem
- x:Name="TabItemAnnotation"
- Header="{Binding T_Annotation}"
- Style="{StaticResource ToolbarTabs}">
- <Grid Grid.Row="1" Height="40" />
- </cus:IconAndTextTabItem>
- <cus:IconAndTextTabItem
- x:Name="TabItemEdit"
- Height="40"
- Header="{Binding T_EditPDF}"
- Style="{StaticResource ToolbarTabs}"
- Visibility="Visible">
- <Grid Grid.Row="1" Height="40" />
- </cus:IconAndTextTabItem>
- <cus:IconAndTextTabItem
- x:Name="TabItemPageEdit"
- Header="{Binding T_PageEdit}"
- Style="{StaticResource ToolbarTabs}" />
- <cus:IconAndTextTabItem
- x:Name="TabItemConvert"
- Header="{Binding T_Converter}"
- Style="{StaticResource ToolbarTabs}" />
- <cus:IconAndTextTabItem
- x:Name="TabItemScan"
- Header="扫描和OCR"
- Style="{StaticResource ToolbarTabs}"
- Visibility="Collapsed">
- <Grid Grid.Row="1" Height="40" />
- </cus:IconAndTextTabItem>
- <cus:IconAndTextTabItem
- x:Name="TabItemForm"
- Height="40"
- Header="表单"
- Style="{StaticResource ToolbarTabs}"
- Visibility="Collapsed">
- <Grid Grid.Row="1" Height="40" />
- </cus:IconAndTextTabItem>
- <cus:IconAndTextTabItem
- x:Name="TabItemFill"
- Height="40"
- Header="{Binding T_FillSign}"
- Style="{StaticResource ToolbarTabs}"
- Visibility="Collapsed">
- <Grid Grid.Row="1" Height="40" />
- </cus:IconAndTextTabItem>
- <cus:IconAndTextTabItem
- x:Name="TabItemTool"
- Height="40"
- Header="{Binding T_Tools}"
- Style="{StaticResource ToolbarTabs}">
- <Grid Grid.Row="1" Height="40" />
- </cus:IconAndTextTabItem>
- <i:Interaction.Triggers>
- <i:EventTrigger EventName="SelectionChanged">
- <i:InvokeCommandAction Command="{Binding TabControlSelectionChangedCommand}" PassEventArgsToCommand="True" />
- </i:EventTrigger>
- </i:Interaction.Triggers>
- </TabControl>
- </ScrollViewer>
- </Grid>
- <!-- 底部工具栏 -->
- <ContentControl Grid.Row="3" prism:RegionManager.RegionName="{Binding BottomToolRegionName}" />
- <!-- 专门用来显示菜单二级工具栏 -->
- <!-- 调整工具栏的显示图层,方便阅读模式处理 -->
- <ContentControl
- Name="ContentToolsBar"
- Grid.Row="{Binding GridToolRow}"
- prism:RegionManager.RegionName="{Binding ToolsBarContentRegionName}"
- Visibility="{Binding ToolsBarContentVisible}" />
- <!--<ContentControl
- Name="ContentConverterBar"
- Grid.Row="{Binding GridToolRow}"
- prism:RegionManager.RegionName="{Binding ToolsBarContentRegionName}"
- Visibility="{Binding ConverterBarContentVisible}" />-->
- <ContentControl
- Name="TextEditContentBar"
- Grid.Row="{Binding GridToolRow}"
- prism:RegionManager.RegionName="{Binding TextEditContentRegionName}"
- Visibility="{Binding TextEditToolContentVisible}" />
- <Border
- Name="DocumentView"
- Grid.Row="2"
- BorderBrush="{StaticResource color.sys.layout.divider}"
- BorderThickness="0,1,0,0">
- <Grid Panel.ZIndex="0">
- <Grid.ColumnDefinitions>
- <ColumnDefinition
- x:Name="BOTACloumn"
- Width="{Binding BOTAWidth, Mode=TwoWay}"
- MinWidth="48"
- MaxWidth="472" />
- <ColumnDefinition Width="auto" />
- <ColumnDefinition
- Name="ViewerColumn"
- Width="*"
- MinWidth="20" />
- <ColumnDefinition Name="PropertyColumn" MinWidth="0">
- <ColumnDefinition.Style>
- <Style TargetType="{x:Type ColumnDefinition}">
- <Style.Triggers>
- <DataTrigger Binding="{Binding ElementName=TbtnProperty, Path=IsChecked}" Value="True">
- <Setter Property="Width" Value="260" />
- </DataTrigger>
- <DataTrigger Binding="{Binding ElementName=TbtnProperty, Path=IsChecked}" Value="False">
- <Setter Property="Width" Value="0" />
- </DataTrigger>
- </Style.Triggers>
- </Style>
- </ColumnDefinition.Style>
- </ColumnDefinition>
- </Grid.ColumnDefinitions>
- <ContentControl
- x:Name="BOTAContent"
- prism:RegionManager.RegionName="{Binding BOTARegionName}"
- SizeChanged="ContentControl_SizeChanged" />
- <GridSplitter
- Name="BOTASplitter"
- Grid.Column="1"
- Width="3"
- Background="Transparent"
- Cursor="SizeWE"
- FocusVisualStyle="{x:Null}"
- PreviewMouseUp="BOTASplitter_PreviewMouseUp"
- ResizeBehavior="PreviousAndNext"
- ShowsPreview="True" />
- <Grid Name="GridViewer" Grid.Column="2">
- <!-- 分屏功能需要的布局 -->
- <Grid.RowDefinitions>
- <RowDefinition Height="*" />
- <RowDefinition Height="auto" />
- <RowDefinition Name="RowRight" Height="0" />
- </Grid.RowDefinitions>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="*" />
- <ColumnDefinition Name="ColumnSplitter" Width="auto" />
- <ColumnDefinition Name="ColumnBottom" Width="0" />
- </Grid.ColumnDefinitions>
- <ContentControl />
- <ContentControl
- x:Name="PDFViewerContent"
- HorizontalAlignment="Stretch"
- prism:RegionManager.RegionName="{Binding ViwerRegionName}" />
- <ContentControl
- Name="SplitPDFViewer"
- Grid.Row="2"
- Grid.Column="2"
- prism:RegionManager.RegionName="{Binding SplitViewerRegionName}" />
- <GridSplitter
- Name="VerticalSplitter"
- Grid.Column="1"
- Width="12"
- Background="Gray"
- BorderThickness="0"
- ResizeBehavior="PreviousAndNext"
- ShowsPreview="True"
- Visibility="Collapsed" />
- <GridSplitter
- Name="HorizontalSplitter"
- Grid.Row="1"
- Height="12"
- HorizontalAlignment="Stretch"
- Background="Gray"
- BorderThickness="0"
- ResizeBehavior="PreviousAndNext"
- ShowsPreview="True"
- Visibility="Collapsed" />
- </Grid>
- <ContentControl
- x:Name="OCRViewerContent"
- Grid.ColumnSpan="3"
- HorizontalAlignment="Stretch"
- prism:RegionManager.RegionName="{Binding OCRViewerRegionName}"
- Visibility="{Binding OCRContentVisible}" />
- <ScrollViewer
- Name="Scroller"
- Grid.Column="4"
- Focusable="False"
- VerticalScrollBarVisibility="Auto">
- <ContentControl Height="{Binding ElementName=Scroller, Path=ViewportHeight}" prism:RegionManager.RegionName="{Binding PropertyRegionName}" />
- </ScrollViewer>
- <!-- 阅读页顶部提示栏区域 -->
- <ContentControl
- Grid.Column="2"
- Width="{Binding ElementName=PDFViewerContent, Path=Width}"
- VerticalAlignment="Top"
- prism:RegionManager.RegionName="{Binding TipContentRegionName}"
- Visibility="{Binding TipVisible}" />
- <!-- 阅读页顶部侧面提示区域 -->
- <ContentControl
- Grid.Column="2"
- Margin="16,8"
- HorizontalAlignment="Right"
- VerticalAlignment="Top"
- prism:RegionManager.RegionName="{Binding LeftTipContentRegionName}"
- Visibility="{Binding LeftTipVisible}" />
- <!-- 便签弹窗 -->
- <Canvas
- x:Name="CanvasNote"
- Grid.Column="2"
- Visibility="{Binding NotePopupVisible}">
- <StackPanel Canvas.Left="{Binding CanvasNoteLeft}" Canvas.Bottom="{Binding CanvasNoteBottom}">
- <!--<TextBlock Text="000" />-->
- <ContentControl prism:RegionManager.RegionName="{Binding NotePopupRegionName}" />
- </StackPanel>
- </Canvas>
- </Grid>
- </Border>
- <!-- 用于显示页面编辑、水印、背景、标记密文等功能的区域 -->
- <Border
- Grid.Row="{Binding GridToolRow}"
- Grid.RowSpan="{Binding GridToolRowSpan}"
- BorderBrush="{StaticResource color.sys.layout.divider}"
- BorderThickness="0,1"
- Visibility="{Binding ToolContentVisible}">
- <ContentControl Name="ContentTool" prism:RegionManager.RegionName="{Binding ToolContentRegionName}" />
- </Border>
- <!--<cus:LoadingControl Grid.RowSpan="3" Visibility="{Binding IsLoading}" />-->
- <Rectangle
- x:Name="RectangleBota"
- Grid.Row="2"
- Width="10"
- Height="{Binding ActualHeight, ElementName=GridViewer, Mode=OneWay}"
- Margin="0,0,0,0"
- HorizontalAlignment="Left"
- VerticalAlignment="Bottom"
- Fill="Red"
- Visibility="Collapsed" />
- <!-- 阅读模式下的页面控件 -->
- <Border
- x:Name="ReadModeContent"
- Grid.RowSpan="4"
- Height="44"
- Margin="0,0,0,16"
- HorizontalAlignment="Center"
- VerticalAlignment="Bottom"
- CornerRadius="4"
- MouseEnter="RectangleReadMode_MouseEnter"
- MouseLeave="ReadModeContent_MouseLeave"
- Visibility="Collapsed">
- <ContentControl prism:RegionManager.RegionName="{Binding ReadModeRegionName}" />
- </Border>
- <Rectangle
- x:Name="RectangleReadMode"
- Grid.RowSpan="4"
- Width="{Binding ActualWidth, ElementName=ReadModeContent, Mode=OneWay}"
- Height="44"
- Margin="0,0,0,5"
- HorizontalAlignment="Center"
- VerticalAlignment="Bottom"
- Fill="Transparent"
- IsHitTestVisible="False"
- MouseEnter="RectangleReadMode_MouseEnter"
- Visibility="Collapsed" />
- </Grid>
- </UserControl>
|