123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443 |
- <Window
- x:Class="PDF_Office.Views.MainWindow"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:convert="clr-namespace:PDF_Office.DataConvert"
- xmlns:cus="clr-namespace:PDF_Office.CustomControl"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:dragablz="http://dragablz.net/winfx/xaml/dragablz"
- xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
- xmlns:local="clr-namespace:PDF_Office"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:prism="http://prismlibrary.com/"
- xmlns:viewmodels="clr-namespace:PDF_Office.ViewModels"
- Width="1280"
- Height="800"
- MinWidth="540"
- MinHeight="460"
- d:DataContext="{d:DesignInstance Type=viewmodels:MainWindowViewModel}"
- prism:ViewModelLocator.AutoWireViewModel="True"
- Activated="Window_Activated"
- BorderBrush="{StaticResource color.sys.layout.bg.tabbar}"
- BorderThickness="2"
- Closed="Window_Closed"
- Closing="Window_Closing"
- PreviewMouseLeftButtonDown="Window_PreviewMouseLeftButtonDown"
- SizeChanged="Window_SizeChanged"
- Style="{StaticResource WindowStyle}"
- UseLayoutRounding="True"
- WindowStartupLocation="CenterScreen"
- mc:Ignorable="d">
- <Window.Resources>
- <ResourceDictionary>
- <Style x:Key="DragablzItemStyle" TargetType="{x:Type dragablz:DragablzItem}">
- <Setter Property="WindowChrome.IsHitTestVisibleInChrome" Value="True" />
- <Setter Property="Foreground" Value="{StaticResource color.sys.text.neutral.lv2}" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="dragablz:DragablzItem">
- <Grid x:Name="templateRoot">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="*" />
- <ColumnDefinition Width="auto" />
- </Grid.ColumnDefinitions>
- <Border
- x:Name="Title"
- Width="184"
- Height="34"
- Margin="4,6,0,2"
- BorderBrush="{StaticResource color.sys.border.neutral.lv3}"
- BorderThickness="0"
- CornerRadius="4,4,0,0"
- WindowChrome.IsHitTestVisibleInChrome="True">
- <Grid
- Name="GridRoot"
- Focusable="True"
- WindowChrome.IsHitTestVisibleInChrome="True">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="auto" />
- <ColumnDefinition Width="*" MinWidth="10" />
- <ColumnDefinition Width="auto" />
- </Grid.ColumnDefinitions>
- <StackPanel Orientation="Horizontal">
- <Path
- Name="Ico_Home"
- Width="20"
- Height="20"
- Margin="8,7,0,7"
- Data="M3.8655 5.79659C3.32363 6.16983 3 6.78571 3 7.44369V15.0001C3 16.1046 3.89543 17.0001 5 17.0001H9V12.1786H11V17.0001H15C16.1046 17.0001 17 16.1046 17 15.0001V7.44369C17 6.78571 16.6764 6.16983 16.1345 5.79659L11.1345 2.35266C10.4514 1.88212 9.54865 1.88212 8.8655 2.35266L3.8655 5.79659Z"
- Fill="{TemplateBinding Foreground}"
- Visibility="Collapsed" />
- <TextBlock
- x:Name="TextTitle"
- MaxWidth="145"
- Margin="8,7"
- VerticalAlignment="Center"
- FontFamily="Segoe UI,Microsoft YaHei"
- Foreground="{TemplateBinding Foreground}"
- Text="{Binding DataContext.FileName}"
- TextTrimming="WordEllipsis" />
- </StackPanel>
- <Thumb
- x:Name="PART_Thumb"
- Grid.ColumnSpan="2"
- HorizontalAlignment="Stretch"
- VerticalContentAlignment="Stretch"
- Background="Transparent"
- FontFamily="Segoe UI,Microsoft YaHei"
- ToolTip="{Binding DataContext.FileName}">
- <Thumb.Template>
- <ControlTemplate>
- <Grid Background="Transparent" />
- </ControlTemplate>
- </Thumb.Template>
- </Thumb>
- <TextBlock
- x:Name="ChangeIcon"
- Grid.Column="1"
- Width="5"
- Margin="3,4,2,0"
- HorizontalAlignment="Left"
- VerticalAlignment="Top"
- Foreground="{TemplateBinding Foreground}"
- IsHitTestVisible="False"
- Text="*"
- Visibility="{Binding DataContext.FileChanged}" />
- <Button
- Grid.Column="2"
- Width="16"
- Height="16"
- Margin="0,4,8,4"
- Background="Transparent"
- BorderThickness="0"
- Command="{Binding DataContext.CloseTab}"
- CommandParameter="{Binding}">
- <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}" />
- </Button>
- <TextBox
- x:Name="TxtRename"
- MaxWidth="145"
- Margin="8,0,10,0"
- VerticalContentAlignment="Center"
- FontFamily="Segoe UI,Microsoft YaHei"
- Foreground="{TemplateBinding Foreground}"
- PreviewKeyDown="TxtRename_PreviewKeyDown"
- Text="{Binding DataContext.FileName, Mode=TwoWay, UpdateSourceTrigger=LostFocus}"
- Visibility="{Binding DataContext.IsReNameTextShow}"
- WindowChrome.IsHitTestVisibleInChrome="True" />
- </Grid>
- </Border>
- <Grid.ContextMenu>
- <ContextMenu>
- <MenuItem
- Command="{Binding DataContext.RenameCommand}"
- Header="{Binding DataContext.T_Rename}"
- IsEnabled="{Binding DataContext.IsReNameEnable}" />
- <MenuItem
- Command="{Binding DataContext.ShowInFolderCommand}"
- Header="{Binding DataContext.T_Floder}"
- IsEnabled="{Binding DataContext.IsShowInFolderEnable}" />
- <MenuItem
- Command="{Binding DataContext.CloseTab}"
- CommandParameter="{Binding}"
- Header="{Binding DataContext.T_Close}" />
- <MenuItem
- Command="{Binding DataContext.mainWindowViewModel.CloseAllTabCommand}"
- Header="{Binding DataContext.T_CloseAll}"
- IsEnabled="{Binding DataContext.mainWindowViewModel.IsCloseAllEnable}" />
- <MenuItem Header="Open In New Window" Visibility="Collapsed" />
- </ContextMenu>
- </Grid.ContextMenu>
- </Grid>
- <ControlTemplate.Triggers>
- <Trigger Property="IsSelected" Value="True">
- <Setter TargetName="Title" Property="Background" Value="{StaticResource color.sys.layout.mg}" />
- <Setter Property="Foreground" Value="{StaticResource color.sys.text.neutral.lv1}" />
- <Setter TargetName="Title" Property="BorderThickness" Value="0,0,0,1" />
- </Trigger>
- <Trigger Property="IsSelected" Value="False">
- <Setter TargetName="Title" Property="Background" Value="TransParent" />
- </Trigger>
- <Trigger Property="IsMouseOver" Value="True">
- <Setter TargetName="Title" Property="Background" Value="{StaticResource color.item-state.hov.bg}" />
- </Trigger>
- <Trigger SourceName="TextTitle" Property="Text" Value="Home">
- <Setter TargetName="Ico_Home" Property="Visibility" Value="Visible" />
- </Trigger>
- <MultiDataTrigger>
- <MultiDataTrigger.Conditions>
- <Condition Binding="{Binding IsSelected, RelativeSource={RelativeSource Self}}" Value="false" />
- <Condition Binding="{Binding IsMouseOver, RelativeSource={RelativeSource Self}}" Value="true" />
- </MultiDataTrigger.Conditions>
- <Setter TargetName="Title" Property="Background" Value="#0D000000" />
- <Setter Property="Foreground" Value="{StaticResource color.sys.text.neutral.lv1}" />
- <!--<Setter TargetName="btnPath" Property="Path.Fill" Value="Black"/>-->
- </MultiDataTrigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <convert:UnVisivleConvert x:Key="UnvisibleConvert" />
- </ResourceDictionary>
- </Window.Resources>
- <Grid Background="{StaticResource color.sys.layout.bg.tabbar}">
- <Grid.RowDefinitions>
- <RowDefinition Height="40" />
- <RowDefinition Height="*" />
- </Grid.RowDefinitions>
- <dragablz:TabablzControl
- Name="TabablzControl"
- Grid.RowSpan="3"
- BorderThickness="0"
- FocusVisualStyle="{x:Null}"
- ItemContainerStyle="{StaticResource DragablzItemStyle}"
- SelectedItem="{Binding SelectedItem, Mode=TwoWay}"
- WindowChrome.IsHitTestVisibleInChrome="True">
- <dragablz:TabablzControl.InterTabController>
- <dragablz:InterTabController InterTabClient="{Binding InterTabClient}" />
- </dragablz:TabablzControl.InterTabController>
- <dragablz:TabablzControl.HeaderSuffixContent>
- <Button
- x:Name="BtnAdd"
- Width="20"
- Height="20"
- Margin="8,13,200,7"
- Padding="0"
- HorizontalAlignment="Left"
- Background="Transparent"
- BorderThickness="0"
- Command="{Binding AddTab}"
- WindowChrome.IsHitTestVisibleInChrome="True">
- <Path
- Width="20"
- Height="20"
- Data="M9 11V16H11V11H16V9H11V4H9V9H4L4 11H9Z"
- Fill="{StaticResource color.icon.base.neutral.norm.lv1}" />
- </Button>
- </dragablz:TabablzControl.HeaderSuffixContent>
- <dragablz:TabablzControl.HeaderPrefixContent>
- <Grid
- Name="GridRoot"
- Width="16"
- Height="38"
- Margin="0,0,0,0"
- Background="Transparent" />
- </dragablz:TabablzControl.HeaderPrefixContent>
- </dragablz:TabablzControl>
- <!-- 标题栏右侧栏,关闭按钮,会员,试用等 -->
- <StackPanel
- Name="StkPnlRight"
- HorizontalAlignment="Right"
- Orientation="Horizontal"
- WindowChrome.IsHitTestVisibleInChrome="True">
- <Grid x:Name="Grid_Openhight" Visibility="{Binding OphVis,Mode=OneWay}">
- <Border VerticalAlignment="Center">
- <Path Data="M0 4C0 1.79086 1.79086 0 4 0H132C134.209 0 136 1.79086 136 4V10.323C136 10.7319 136.249 11.0996 136.629 11.2514L141.179 13.0715C142.017 13.4068 142.017 14.5932 141.179 14.9285L136.629 16.7486C136.249 16.9004 136 17.2681 136 17.677V24C136 26.2091 134.209 28 132 28H4C1.79086 28 0 26.2091 0 24V4Z" Fill="#FFCF52" />
- </Border>
- <TextBlock
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- FontSize="12"
- Text="登录解锁高级功能" />
- </Grid>
- <Button
- x:Name="Btn_Register"
- Width="40"
- Height="40"
- Background="Transparent"
- Command="{Binding OpenRegisterCommand}"
- Style="{StaticResource subToolBar}"
- Visibility="{Binding RegisterVis, Mode=TwoWay}">
- <Grid>
- <Border
- x:Name="myBorder1"
- Width="24"
- Height="24"
- Background="White"
- CornerRadius="12" />
- <Border
- Width="24"
- Height="24"
- Background="{StaticResource color.icon.base.neutral.norm.lv1}"
- BorderBrush="{StaticResource color.icon.base.neutral.norm.lv1}">
- <Path Data="M12 13C14.2091 13 16 11.2091 16 9C16 6.79086 14.2091 5 12 5C9.79086 5 8 6.79086 8 9C8 11.2091 9.79086 13 12 13ZM12 31C17.5228 31 22 27.4183 22 23C22 18.5817 17.5228 15 12 15C6.47715 15 2 18.5817 2 23C2 27.4183 6.47715 31 12 31Z" Fill="White" />
- <Border.OpacityMask>
- <VisualBrush Visual="{Binding ElementName=myBorder1}" />
- </Border.OpacityMask>
- </Border>
- <Border
- Width="24"
- Height="24"
- BorderBrush="{StaticResource color.icon.base.neutral.norm.lv1}"
- BorderThickness="2"
- CornerRadius="100" />
- </Grid>
- </Button>
- <Button
- x:Name="Btn_Login"
- Width="40"
- Height="40"
- Background="Transparent"
- Command="{Binding OpenLoginCommand}"
- Style="{StaticResource subToolBar}"
- Visibility="{Binding LoginVis, Mode=TwoWay}">
- <Grid>
- <Border
- x:Name="myBorder2"
- Width="24"
- Height="24"
- Background="White"
- CornerRadius="12" />
- <Border
- Width="24"
- Height="24"
- Background="{StaticResource color.icon.base.neutral.norm.lv1}"
- BorderBrush="{StaticResource color.icon.base.neutral.norm.lv1}">
- <Path Data="M12 13C14.2091 13 16 11.2091 16 9C16 6.79086 14.2091 5 12 5C9.79086 5 8 6.79086 8 9C8 11.2091 9.79086 13 12 13ZM12 31C17.5228 31 22 27.4183 22 23C22 18.5817 17.5228 15 12 15C6.47715 15 2 18.5817 2 23C2 27.4183 6.47715 31 12 31Z" Fill="White" />
- <Border.OpacityMask>
- <VisualBrush Visual="{Binding ElementName=myBorder2}" />
- </Border.OpacityMask>
- </Border>
- <Border
- Width="24"
- Height="24"
- BorderBrush="{StaticResource color.icon.base.neutral.norm.lv1}"
- BorderThickness="2"
- CornerRadius="100" />
- </Grid>
- </Button>
- <Button
- x:Name="Btn_User"
- Width="40"
- Height="40"
- Background="Transparent"
- Command="{Binding OpenUserCommand}"
- Style="{StaticResource subToolBar}"
- Visibility="{Binding UserVis, Mode=TwoWay}">
- <Grid>
- <Border
- x:Name="myBorder3"
- Width="24"
- Height="24"
- Background="White"
- CornerRadius="12" />
- <Border
- Width="24"
- Height="24"
- Background="#1770F4"
- BorderBrush="{StaticResource color.icon.base.neutral.norm.lv1}">
- <Path Data="M12 13C14.2091 13 16 11.2091 16 9C16 6.79086 14.2091 5 12 5C9.79086 5 8 6.79086 8 9C8 11.2091 9.79086 13 12 13ZM12 31C17.5228 31 22 27.4183 22 23C22 18.5817 17.5228 15 12 15C6.47715 15 2 18.5817 2 23C2 27.4183 6.47715 31 12 31Z" Fill="White" />
- <Border.OpacityMask>
- <VisualBrush Visual="{Binding ElementName=myBorder3}" />
- </Border.OpacityMask>
- </Border>
- <Border
- Width="24"
- Height="24"
- BorderBrush="#1770F4"
- BorderThickness="2"
- CornerRadius="100" />
- </Grid>
- </Button>
- <Separator BorderBrush="#94989C" BorderThickness="1">
- <Separator.LayoutTransform>
- <RotateTransform Angle="90" />
- </Separator.LayoutTransform>
- </Separator>
- <Button
- Name="BtnMiniSize"
- Width="40"
- Height="40"
- Background="Transparent"
- BorderThickness="0"
- Click="BtnMiniSize_Click"
- Style="{StaticResource TitleBarBtn}">
- <Polygon Fill="{StaticResource color.btn.sec.text.def}" Points="14 7 14 8 2 8 2 7">
- <Polygon.RenderTransform>
- <TransformGroup>
- <TranslateTransform Y="-3" />
- </TransformGroup>
- </Polygon.RenderTransform>
- </Polygon>
- </Button>
- <Button
- Name="BtnReStore"
- Width="40"
- Height="40"
- Background="Transparent"
- BorderThickness="0"
- Click="BtnReStore_Click"
- Style="{StaticResource TitleBarBtn}">
- <Grid>
- <Path
- x:Name="ico_max"
- Data="M14,2 L14,14 L2,14 L2,2 L14,2 Z M13,3 L3,3 L3,13 L13,13 L13,3 Z"
- Fill="{StaticResource color.btn.sec.text.def}"
- Visibility="Collapsed" />
- <Grid x:Name="ico_mini" Visibility="{Binding ElementName=ico_max, Path=Visibility, Converter={StaticResource UnvisibleConvert}}">
- <Path Data="M11,5 L11,14 L2,14 L2,5 L11,5 Z M10,6 L3,6 L3,13 L10,13 L10,6 Z" Fill="{StaticResource color.btn.sec.text.def}" />
- <Polygon Fill="{StaticResource color.btn.sec.text.def}" Points="14 2 14 11 11 11 11 10 13 10 13 3 6 3 6 5 5 5 5 2" />
- </Grid>
- </Grid>
- </Button>
- <Button
- Name="BtnClose"
- Width="40"
- Height="40"
- Background="Transparent"
- BorderThickness="0"
- Click="BtnClose_Click"
- Style="{StaticResource CloseBtn}">
- <Polygon Fill="{StaticResource color.btn.sec.text.def}" Points="11.2919922 12 12 11.2919922 6.70800781 6 12 0.708007813 11.2919922 0 6 5.29199219 0.708007812 9.76996262e-15 -2.27456942e-13 0.708007813 5.29199219 6 0 11.2919922 0.708007812 12 6 6.70800781" />
- </Button>
- </StackPanel>
- <!-- OCR Progress Control -->
- <Grid Grid.RowSpan="2" Visibility="{Binding IsProcessVisible}">
- <Grid.Background>
- <SolidColorBrush Opacity="0.05" Color="Black" />
- </Grid.Background>
- <Border
- Width="226"
- Height="58"
-
- Background="{StaticResource color.sys.layout.dark.bg}"
- BorderThickness="0"
- CornerRadius="{StaticResource border-radius.8}"
- Effect="{StaticResource shadow.neutral.m}">
- <Grid Margin="16,13" Background="Transparent">
- <StackPanel Orientation="Horizontal">
- <TextBlock Foreground="{StaticResource color.sys.text.anti.norm}" Text="{Binding ProgressTitle}" />
- <TextBlock Foreground="{StaticResource color.sys.text.anti.norm}" Text="{Binding Value, StringFormat={}({0})}" />
- </StackPanel>
- <Button
- Width="12"
- Height="12"
- HorizontalAlignment="Right"
- VerticalAlignment="Top"
- BorderThickness="0"
- Background="{StaticResource color.sys.layout.dark.bg}"
- Command="{Binding CloseOCRCommand}"
- Padding="0,0,1,1">
- <Path Data="M6.00006 7.06072L9.46973 10.5304L10.5304 9.46973L7.06072 6.00006L10.5304 2.53039L9.46973 1.46973L6.00006 4.9394L2.53039 1.46973L1.46973 2.53039L4.9394 6.00006L1.46973 9.46973L2.53039 10.5304L6.00006 7.06072Z" Fill="#CED0D4"></Path>
- </Button>
- <ProgressBar
- Height="4"
- Margin="0,0,0,4"
- VerticalAlignment="Bottom"
- BorderThickness="0"
- Foreground="{StaticResource color.slider.track-filled.norm}"
- Maximum="{Binding MaxValue}"
- Value="{Binding Value}" />
- </Grid>
- </Border>
- </Grid>
- </Grid>
- </Window>
|