|
@@ -6,351 +6,166 @@
|
|
|
xmlns:local="clr-namespace:compdfkit"
|
|
|
xmlns:cpdftools="clr-namespace:compdfkit_tools.PDFControl;assembly=com.compdfkit.tools"
|
|
|
xmlns:cpdfcommon="clr-namespace:compdfkit_tools.Common;assembly=com.compdfkit.tools"
|
|
|
- mc:Ignorable="d"
|
|
|
- Title="ComPDFKit" Height="720" Width="1080" WindowStartupLocation="CenterScreen">
|
|
|
+ mc:Ignorable="d"
|
|
|
+ SnapsToDevicePixels="True"
|
|
|
+ xmlns:dragablz="clr-namespace:Dragablz;assembly=Dragablz"
|
|
|
+ Title="MainWindow" Height="960" Width="1280" WindowStartupLocation="CenterScreen">
|
|
|
+ <WindowChrome.WindowChrome>
|
|
|
+ <WindowChrome
|
|
|
+ NonClientFrameEdges="Left,Bottom,Right"
|
|
|
+ UseAeroCaptionButtons="False"
|
|
|
+ ResizeBorderThickness="{x:Static SystemParameters.WindowResizeBorderThickness}">
|
|
|
+ </WindowChrome>
|
|
|
+ </WindowChrome.WindowChrome>
|
|
|
<Window.Resources>
|
|
|
- <ResourceDictionary>
|
|
|
- <ResourceDictionary.MergedDictionaries>
|
|
|
- <ResourceDictionary Source="pack://application:,,,/compdfkit-assets;component/Styles/ToggleButtonStyle.xaml"></ResourceDictionary>
|
|
|
- <ResourceDictionary Source="pack://application:,,,/compdfkit-assets;component/Styles/ButtonStyle.xaml"></ResourceDictionary>
|
|
|
- <ResourceDictionary Source="pack://application:,,,/compdfkit-assets;component/Styles/ComboBoxStyle.xaml"></ResourceDictionary>
|
|
|
- </ResourceDictionary.MergedDictionaries>
|
|
|
- </ResourceDictionary>
|
|
|
- </Window.Resources>
|
|
|
- <Grid>
|
|
|
- <Grid>
|
|
|
- <Grid.RowDefinitions>
|
|
|
- <RowDefinition Height="40"></RowDefinition>
|
|
|
- <RowDefinition Height="40"></RowDefinition>
|
|
|
- <RowDefinition Height="*"></RowDefinition>
|
|
|
- </Grid.RowDefinitions>
|
|
|
- <!--顶部工具栏-->
|
|
|
- <cpdftools:CPDFTitleBarControl></cpdftools:CPDFTitleBarControl>
|
|
|
- <Grid Grid.Row="1">
|
|
|
- <Grid.ColumnDefinitions>
|
|
|
- <ColumnDefinition Width="auto"></ColumnDefinition>
|
|
|
- <ColumnDefinition Width="*"></ColumnDefinition>
|
|
|
- <ColumnDefinition Width="auto"></ColumnDefinition>
|
|
|
- </Grid.ColumnDefinitions>
|
|
|
-
|
|
|
- <!--左侧工具栏-->
|
|
|
- <StackPanel Orientation="Horizontal" Height="40" Margin="20,0,0,0">
|
|
|
- <!--打开文件-->
|
|
|
- <Button BorderThickness="0" VerticalContentAlignment="Center" Width="30" Height="30" Style="{StaticResource LightButtonStyle}" Background="Transparent" Click="OpenFile_Click">
|
|
|
- <Button.Content>
|
|
|
- <Viewbox Width="20" Height="20">
|
|
|
- <Path Fill="#43474D" >
|
|
|
- <Path.Data>
|
|
|
- M3.75,2 L3.91967773,2.00463867 C4.08325195,2.01391602 4.22851562,2.03710938 4.35546875,2.07421875 C4.52473958,2.12369792
|
|
|
- 4.67578125,2.18489583 4.80859375,2.2578125 C4.94140625,2.33072917 5.05989583,2.41145833 5.1640625,2.5 C5.26822917,2.58854167
|
|
|
- 5.37369792,2.66927083 5.48046875,2.7421875 C5.58723958,2.81510417 5.70182292,2.87630208 5.82421875,2.92578125 C5.94661458,2.97526042
|
|
|
- 6.08854167,3 6.25,3 L6.25,3 L12,3 L12.1371528,3.00868056 C12.2262731,3.02025463 12.3107639,3.04340278 12.390625,3.078125
|
|
|
- C12.5104167,3.13020833 12.6158854,3.20182292 12.7070312,3.29296875 C12.7981771,3.38411458 12.8697917,3.48958333 12.921875,3.609375
|
|
|
- C12.9739583,3.72916667 13,3.859375 13,4 L13,4 L13,6 L15,6 L15.1332465,6.00868056 C15.2206308,6.02025463 15.3051215,6.04340278
|
|
|
- 15.3867188,6.078125 C15.5091146,6.13020833 15.6158854,6.20182292 15.7070312,6.29296875 C15.7981771,6.38411458 15.8697917,6.48958333
|
|
|
- 15.921875,6.609375 C15.9739583,6.72916667 16,6.85677083 16,6.9921875 C16,7.1484375 15.9635417,7.29947917 15.890625,7.4453125
|
|
|
- L15.890625,7.4453125 L12.6171875,14 L0,14 L0,3 L0.00868055556,2.86284722 C0.0202546296,2.77372685 0.0434027778,2.68923611 0.078125,2.609375
|
|
|
- C0.130208333,2.48958333 0.201822917,2.38411458 0.29296875,2.29296875 C0.384114583,2.20182292 0.489583333,2.13020833 0.609375,2.078125
|
|
|
- C0.729166667,2.02604167 0.859375,2 1,2 L1,2 L3.75,2 Z M15,7 L4.3125,7 L1.3125,13 L12,13 L15,7 Z M3.75,3 L1,3 L1,11.3828125 L3.4140625,6.5546875
|
|
|
- L3.48706055,6.43261719 C3.56665039,6.31738281 3.66601562,6.22265625 3.78515625,6.1484375 C3.94401042,6.04947917 4.11979167,6 4.3125,6
|
|
|
- L4.3125,6 L12,6 L12,4 L6.25,4 L6.08032227,3.99536133 C5.91674805,3.98608398 5.77148438,3.96289062 5.64453125,3.92578125 C5.47526042,3.87630208
|
|
|
- 5.32421875,3.81510417 5.19140625,3.7421875 C5.05859375,3.66927083 4.94010417,3.58854167 4.8359375,3.5 C4.73177083,3.41145833 4.62630208,3.33072917
|
|
|
- 4.51953125,3.2578125 C4.41276042,3.18489583 4.29817708,3.12369792 4.17578125,3.07421875 C4.05338542,3.02473958 3.91145833,3 3.75,3 L3.75,3 Z
|
|
|
- </Path.Data>
|
|
|
- </Path>
|
|
|
- </Viewbox>
|
|
|
- </Button.Content>
|
|
|
- </Button>
|
|
|
-
|
|
|
- <!--保存文件-->
|
|
|
- <Button BorderThickness="0" VerticalContentAlignment="Center" Margin="10,0,0,0" Width="30" Height="30" Style="{StaticResource LightButtonStyle}" Background="Transparent"
|
|
|
- Click="SaveFileBtn_Click" IsEnabled="{Binding CanSave,Mode=OneWay}">
|
|
|
- <Button.Content>
|
|
|
- <Viewbox Width="20" Height="20">
|
|
|
- <Path IsEnabled="{Binding CanSave,Mode=OneWay}">
|
|
|
- <Path.Style>
|
|
|
- <Style TargetType="Path">
|
|
|
- <Style.Triggers>
|
|
|
- <Trigger Property="IsEnabled" Value="False">
|
|
|
- <Setter Property="Fill" Value="LightGray"/>
|
|
|
- </Trigger>
|
|
|
- <Trigger Property="IsEnabled" Value="True">
|
|
|
- <Setter Property="Fill" Value="#43474D"/>
|
|
|
- </Trigger>
|
|
|
- </Style.Triggers>
|
|
|
- </Style>
|
|
|
- </Path.Style>
|
|
|
- <Path.Data>
|
|
|
- M11.707107,1 L15,4.29289322 L15,15 L1,15 L1,1 L11.707107,1 Z M11.293,2 L2,2 L2,14 L4,14 L4,8 L12,8 L12,14 L14,14 L14,4.707 L11.293,2 Z
|
|
|
- M11,9 L5,9 L5,14 L11,14 L11,9 Z M7,5 L7,6 L4,6 L4,5 L7,5 Z
|
|
|
- </Path.Data>
|
|
|
-
|
|
|
- </Path>
|
|
|
- </Viewbox>
|
|
|
- </Button.Content>
|
|
|
- </Button>
|
|
|
-
|
|
|
- <!--工具栏展开收缩-->
|
|
|
- <ToggleButton x:Name="LeftToolPanelButton" Margin="13,0,0,0" BorderThickness="0" Width="30" Height="30" Style="{StaticResource ToggleButtonStyle}" Background="Transparent" Click="LeftToolPanelButton_Click">
|
|
|
- <ToggleButton.Content>
|
|
|
- <Path Fill="#43474D" Width="30" Height="30">
|
|
|
- <Path.Data>
|
|
|
- M22.5 8.5H7.5V12.25H13H22.5V8.5ZM12.25 13.75H7.5V21.5H12.25V13.75ZM13.75 21.5V13.75H22.5V21.5H13.75ZM7.5 7H6V8.5V21.5V23H7.5H22.5H24V21.5V8.5V7H22.5H7.5Z
|
|
|
- </Path.Data>
|
|
|
- </Path>
|
|
|
- </ToggleButton.Content>
|
|
|
- </ToggleButton>
|
|
|
-
|
|
|
- <Line Margin="13,0,13,0" Stroke="#E0E0E0" X1="0" Y1="5" X2="0" Y2="35"></Line>
|
|
|
-
|
|
|
- <cpdftools:CPDFScalingControl x:Name="CPDFSaclingControl"></cpdftools:CPDFScalingControl>
|
|
|
-
|
|
|
- </StackPanel>
|
|
|
-
|
|
|
- <!--中间工具栏-->
|
|
|
- <ComboBox Style="{StaticResource ComboBoxStyle1}" Width="120" Height="26" Grid.Column="1" HorizontalAlignment="Center" FontSize="14" Foreground="#001A4E" SelectedIndex="0" SelectionChanged="ComboBox_SelectionChanged">
|
|
|
- <ComboBoxItem>Viewer</ComboBoxItem>
|
|
|
- <ComboBoxItem>Annotation</ComboBoxItem>
|
|
|
- <ComboBoxItem>Edit</ComboBoxItem>
|
|
|
- </ComboBox>
|
|
|
-
|
|
|
- <!--右侧工具栏-->
|
|
|
- <StackPanel Orientation="Horizontal" Grid.Column="2">
|
|
|
-
|
|
|
- <!--搜索按钮-->
|
|
|
- <Button BorderThickness="0" Width="40" Height="40" Style="{StaticResource LightButtonStyle}" Background="Transparent" Click="ExpandSearchBtn_Click">
|
|
|
- <Button.Content>
|
|
|
- <Path Fill="#43474D">
|
|
|
- <Path.Data>
|
|
|
- M5.10992 13.9353C2.71184 11.5372 2.71184 7.64917 5.10992 5.25108C7.50801 2.853 11.3961 2.853 13.7942 5.25108C16.1922 7.64917
|
|
|
- 16.1922 11.5372 13.7942 13.9353C11.3961 16.3334 7.50801 16.3334 5.10992 13.9353ZM4.04926 4.19042C1.06539 7.17429 1.06539 12.0121
|
|
|
- 4.04926 14.996C6.85422 17.8009 11.2975 17.9691 14.2989 15.5005L17.1989 18.4006C17.4918 18.6935 17.9667 18.6935 18.2596
|
|
|
- 18.4006C18.5525 18.1077 18.5525 17.6328 18.2596 17.3399L15.3595 14.4399C17.828 11.4384 17.6597 6.99533 14.8548
|
|
|
- 4.19042C11.8709 1.20655 7.03313 1.20655 4.04926 4.19042Z
|
|
|
- </Path.Data>
|
|
|
- </Path>
|
|
|
- </Button.Content>
|
|
|
- </Button>
|
|
|
-
|
|
|
- <!--页面显示-->
|
|
|
- <ToggleButton Name="ViewSettingBtn" BorderThickness="0" Width="40" Height="40" Style="{StaticResource ToggleButtonStyle}" Background="Transparent" Click="ViewSettingBtn_Click">
|
|
|
- <ToggleButton.Content>
|
|
|
- <Path Stroke="#43474D" VerticalAlignment="Center" StrokeThickness="2">
|
|
|
- <Path.Data>
|
|
|
- <CombinedGeometry GeometryCombineMode="Exclude">
|
|
|
- <CombinedGeometry.Geometry1>
|
|
|
- M18.3327 10C18.3327 10 14.6017 16.25 9.99935 16.25C5.39698 16.25 1.66602 10 1.66602 10C1.66602 10 5.39698 3.75 9.99935 3.75C14.6017 3.75 18.3327 10 18.3327 10Z
|
|
|
- </CombinedGeometry.Geometry1>
|
|
|
- <CombinedGeometry.Geometry2>
|
|
|
- <EllipseGeometry Center="10,10" RadiusX="2" RadiusY="2"/>
|
|
|
- </CombinedGeometry.Geometry2>
|
|
|
- </CombinedGeometry>
|
|
|
- </Path.Data>
|
|
|
- </Path>
|
|
|
- </ToggleButton.Content>
|
|
|
- </ToggleButton>
|
|
|
-
|
|
|
- <!--右侧属性面板开关-->
|
|
|
- <ToggleButton x:Name="RightPanelButton" BorderThickness="0" Width="40" Height="40" Style="{StaticResource ToggleButtonStyle}" Background="Transparent" Click="RightPanelButton_Click">
|
|
|
- <ToggleButton.Content>
|
|
|
- <Path Fill="#43474D" Width="30" Height="30">
|
|
|
- <Path.Data>
|
|
|
- M22.5 8.5H7.5V12.25H13H22.5V8.5ZM12.25 13.75H7.5V21.5H12.25V13.75ZM13.75 21.5V13.75H22.5V21.5H13.75ZM7.5 7H6V8.5V21.5V23H7.5H22.5H24V21.5V8.5V7H22.5H7.5Z
|
|
|
- </Path.Data>
|
|
|
- </Path>
|
|
|
- </ToggleButton.Content>
|
|
|
- </ToggleButton>
|
|
|
-
|
|
|
- <!--页面信息-->
|
|
|
- <Button BorderThickness="0" Width="40" Height="40" Style="{StaticResource LightButtonStyle}" Background="Transparent" Click="PageInfoBtn_Click">
|
|
|
- <Button.Content>
|
|
|
- <Path Fill="#43474D" VerticalAlignment="Center">
|
|
|
- <Path.Data>
|
|
|
- M2.75 10C2.75 5.99594 5.99594 2.75 10 2.75C14.0041 2.75 17.25 5.99594 17.25 10C17.25 14.0041 14.0041 17.25 10
|
|
|
- 17.25C5.99594 17.25 2.75 14.0041 2.75 10ZM10 1.25C5.16751 1.25 1.25 5.16751 1.25 10C1.25 14.8325 5.16751
|
|
|
- 18.75 10 18.75C14.8325 18.75 18.75 14.8325 18.75 10C18.75 5.16751 14.8325 1.25 10 1.25ZM6.5 11C7.05228 11
|
|
|
- 7.5 10.5523 7.5 10C7.5 9.44771 7.05228 9 6.5 9C5.94772 9 5.5 9.44771 5.5 10C5.5 10.5523 5.94772 11 6.5 11ZM10
|
|
|
- 11C10.5523 11 11 10.5523 11 10C11 9.44771 10.5523 9 10 9C9.44771 9 9 9.44771 9 10C9 10.5523 9.44771 11 10 11ZM14.5
|
|
|
- 10C14.5 10.5523 14.0523 11 13.5 11C12.9477 11 12.5 10.5523 12.5 10C12.5 9.44771 12.9477 9 13.5 9C14.0523 9 14.5 9.44771 14.5 10Z
|
|
|
- </Path.Data>
|
|
|
- </Path>
|
|
|
- </Button.Content>
|
|
|
- </Button>
|
|
|
- </StackPanel>
|
|
|
- </Grid>
|
|
|
- <Grid Name="BodyGrid" Grid.Row="2">
|
|
|
- <Grid.RowDefinitions>
|
|
|
- <RowDefinition Height="auto"/>
|
|
|
- <RowDefinition Height="*"/>
|
|
|
- </Grid.RowDefinitions>
|
|
|
- <Grid.ColumnDefinitions>
|
|
|
- <ColumnDefinition Width="0"></ColumnDefinition>
|
|
|
- <ColumnDefinition Width="0"></ColumnDefinition>
|
|
|
- <ColumnDefinition Width="*"></ColumnDefinition>
|
|
|
- <ColumnDefinition Width="auto"></ColumnDefinition>
|
|
|
- </Grid.ColumnDefinitions>
|
|
|
- <Border x:Name="ToolBarContainer" Height="46" Visibility="Collapsed" BorderThickness="1" BorderBrush="#1A000000" Background="#F2F3F5" Grid.ColumnSpan="4">
|
|
|
- <Grid>
|
|
|
- <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
|
|
|
- <Grid>
|
|
|
- <cpdftools:CPDFAnnotationBarControl x:Name="AnnotationBarControl" Height="44" Loaded="AnnotationBarControl_Loaded" Unloaded="AnnotationBarControl_Unloaded"/>
|
|
|
- <Border Name="PDFEditTool" Background="#F2F3F5" Visibility="Collapsed">
|
|
|
- <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
|
|
|
- <!--文字编辑按钮-->
|
|
|
- <ToggleButton Style="{StaticResource ToggleButtonStyle}" Name="PDFTextEditButton" BorderThickness="0" Padding="10,5,10,5" Click="PDFTextEditButton_Click" Width="99" Height="40">
|
|
|
- <StackPanel Orientation="Horizontal">
|
|
|
- <Path Fill="#273C62" VerticalAlignment="Center">
|
|
|
- <Path.Data>
|
|
|
- M1.25 0H0.5V0.75V13.25V14H1.25H17.75H18.5V13.25V7H17V12.5H2V1.5H12.5V0H1.25ZM11.5 5V2.5H3.5V5H5V4H6.75V10H6V11.5H9V10H8.25V4H10V5H11.5ZM15.75
|
|
|
- 3.75H13.5V2.25H15.75V0H17.25V2.25H19.5V3.75H17.25V6H15.75V3.75Z
|
|
|
- </Path.Data>
|
|
|
- </Path>
|
|
|
- <TextBlock FontSize="12" VerticalAlignment="Center" Margin="8,0,0,0">Add Text</TextBlock>
|
|
|
- </StackPanel>
|
|
|
- </ToggleButton>
|
|
|
-
|
|
|
- <!--图片编辑按钮-->
|
|
|
- <ToggleButton Style="{StaticResource ToggleButtonStyle}" Name="PDFImageEditButton" BorderThickness="0" Padding="10,5,10,5" Margin="10,0,0,0" Click="PDFImageEditButton_Click">
|
|
|
- <StackPanel Orientation="Horizontal">
|
|
|
- <Path Fill="#273C62" VerticalAlignment="Center">
|
|
|
- <Path.Data>
|
|
|
- M1.5 0H0.75V0.75V13.25V14H1.5H18H18.75V13.25V7H17.25V12.5H17.2147L11.8718 7.81776L9.56428 10.25L5.29496 6.75L2.25 9.95948V1.5H12.75V0H1.5ZM13.5 5.25C13.5
|
|
|
- 6.07843 12.8284 6.75 12 6.75C11.1716 6.75 10.5 6.07843 10.5 5.25C10.5 4.42157 11.1716 3.75 12 3.75C12.8284 3.75 13.5 4.42157 13.5 5.25ZM15.75
|
|
|
- 3.75H13.5V2.25H15.75V0H17.25V2.25H19.5V3.75H17.25V6H15.75V3.75Z
|
|
|
- </Path.Data>
|
|
|
- </Path>
|
|
|
- <TextBlock FontSize="12" VerticalAlignment="Center" Margin="8,0,0,0">Add Picture</TextBlock>
|
|
|
- </StackPanel>
|
|
|
- </ToggleButton>
|
|
|
- </StackPanel>
|
|
|
- </Border>
|
|
|
- </Grid>
|
|
|
- <Line Height="40" Stroke="#D5D6D8" StrokeThickness="2" X1="0" Y1="10" X2="0" Y2="30" Margin="8,0,8,0" />
|
|
|
- <!--撤销-->
|
|
|
- <Button Name="UndoBtn" Style="{StaticResource LightButtonStyle}" BorderThickness="0" Width="40" Height="40" IsEnabled="{Binding CanUndo,Mode=OneWay}" Click="UndoBtn_Click"
|
|
|
- Background="Transparent">
|
|
|
- <Path x:Name="UndoPath" IsEnabled="{Binding CanUndo,Mode=OneWay}">
|
|
|
- <Path.Style>
|
|
|
- <Style TargetType="Path">
|
|
|
- <Style.Triggers>
|
|
|
- <Trigger Property="IsEnabled" Value="False">
|
|
|
- <Setter Property="Fill" Value="LightGray"/>
|
|
|
- </Trigger>
|
|
|
- <Trigger Property="IsEnabled" Value="True">
|
|
|
- <Setter Property="Fill" Value="#43474D"/>
|
|
|
- </Trigger>
|
|
|
- </Style.Triggers>
|
|
|
- </Style>
|
|
|
- </Path.Style>
|
|
|
- <Path.Data>
|
|
|
- M1.03033 3.62131L0.5 4.15164L1.03033 4.68197L4.65164 8.30328L5.7123 7.24261L3.37132 4.90164H10.0607C11.5794 4.90164 12.8107 6.13285 12.8107
|
|
|
- 7.65164C12.8107 9.17042 11.5794 10.4016 10.0607 10.4016H2.56066V11.9016H10.0607C12.4079 11.9016 14.3107 9.99885 14.3107 7.65164C14.3107
|
|
|
- 5.30443 12.4079 3.40164 10.0607 3.40164H3.37132L5.7123 1.06066L4.65164 0L1.03033 3.62131Z
|
|
|
- </Path.Data>
|
|
|
- </Path>
|
|
|
- </Button>
|
|
|
- <!--重做-->
|
|
|
- <Button Style="{StaticResource LightButtonStyle}" BorderThickness="0" Width="40" Height="40" Margin="10,0,0,0" IsEnabled="{Binding CanRedo,Mode=OneWay}" Click="RedoBtn_Click"
|
|
|
- Background="Transparent">
|
|
|
- <Path IsEnabled="{Binding CanRedo,Mode=OneWay}">
|
|
|
- <Path.Resources>
|
|
|
- <Style TargetType="Path">
|
|
|
- <Style.Triggers>
|
|
|
- <Trigger Property="IsEnabled" Value="False">
|
|
|
- <Setter Property="Fill" Value="LightGray"/>
|
|
|
- </Trigger>
|
|
|
- <Trigger Property="IsEnabled" Value="True">
|
|
|
- <Setter Property="Fill" Value="#43474D"/>
|
|
|
- </Trigger>
|
|
|
- </Style.Triggers>
|
|
|
- </Style>
|
|
|
- </Path.Resources>
|
|
|
- <Path.Data>
|
|
|
- M13.7802 3.62131L14.3105 4.15164L13.7802 4.68197L10.1589 8.30328L9.09825 7.24261L11.4392 4.90164H4.74989C3.2311 4.90164 1.99989 6.13285
|
|
|
- 1.99989 7.65164C1.99989 9.17042 3.2311 10.4016 4.74989 10.4016H12.2499V11.9016H4.74989C2.40268 11.9016 0.499887 9.99885 0.499887
|
|
|
- 7.65164C0.499887 5.30443 2.40268 3.40164 4.74989 3.40164H11.4392L9.09825 1.06066L10.1589 0L13.7802 3.62131Z
|
|
|
- </Path.Data>
|
|
|
- </Path>
|
|
|
- </Button>
|
|
|
- </StackPanel>
|
|
|
-
|
|
|
- </Grid>
|
|
|
- </Border>
|
|
|
-
|
|
|
- <!--工具栏展开-->
|
|
|
-
|
|
|
- <cpdftools:CPDFBOTABarControl Grid.Row="1" Visibility="Collapsed" Name="BotaSideTool"/>
|
|
|
-
|
|
|
- <!--拖动调节控件大小-->
|
|
|
- <GridSplitter Name="Splitter" Grid.Row="1" Grid.Column="1" Width="15" ResizeBehavior="PreviousAndNext" Visibility="Collapsed">
|
|
|
- <GridSplitter.Template>
|
|
|
- <ControlTemplate TargetType="{x:Type GridSplitter}">
|
|
|
- <Border BorderThickness="{TemplateBinding Border.BorderThickness}"
|
|
|
- BorderBrush="{TemplateBinding Border.BorderBrush}"
|
|
|
- Background="{TemplateBinding Panel.Background}" >
|
|
|
- <Path Fill="Gray" VerticalAlignment="Center">
|
|
|
- <Path.Data>
|
|
|
- M15 3.75H1V2.25H15V3.75ZM15 8.75H1V7.25H15V8.75ZM1 13.75H15V12.25H1V13.75Z
|
|
|
- </Path.Data>
|
|
|
- </Path>
|
|
|
+ <ControlTemplate x:Key="CloseFileButton" TargetType="{x:Type ButtonBase}">
|
|
|
+ <Border BorderThickness="{TemplateBinding Border.BorderThickness}"
|
|
|
+ BorderBrush="{TemplateBinding Border.BorderBrush}"
|
|
|
+ Background="{TemplateBinding Panel.Background}"
|
|
|
+ Name="border"
|
|
|
+ SnapsToDevicePixels="True">
|
|
|
+ <Path Name="content" VerticalAlignment="Center" HorizontalAlignment="Center" Fill="#666666">
|
|
|
+ <Path.RenderTransform>
|
|
|
+ <TransformGroup>
|
|
|
+ <TranslateTransform X="8" Y="-8"/>
|
|
|
+ <RotateTransform Angle="45"/>
|
|
|
+ <TranslateTransform X="-4" Y="-5"/>
|
|
|
+ </TransformGroup>
|
|
|
+ </Path.RenderTransform>
|
|
|
+ <Path.Data>
|
|
|
+ M9.48528137,2.98528137 L9.48428137,8.48428137 L14.9852814,8.48528137 L14.9852814,9.48528137 L9.48428137,9.48428137 L9.48528137,14.9852814 L8.48528137,14.9852814
|
|
|
+ L8.48428137,9.48428137 L2.98528137,9.48528137 L2.98528137,8.48528137 L8.48428137,8.48428137 L8.48528137,2.98528137 L9.48528137,2.98528137 Z
|
|
|
+ </Path.Data>
|
|
|
+ </Path>
|
|
|
+ </Border>
|
|
|
+ <ControlTemplate.Triggers>
|
|
|
+ <Trigger Property="Button.IsDefaulted" Value="True">
|
|
|
+ <Setter Property="Path.Fill" TargetName="content" Value="#666666" />
|
|
|
+ </Trigger>
|
|
|
+ <Trigger Property="UIElement.IsMouseOver" Value="True">
|
|
|
+ <Setter Property="Path.Fill" TargetName="content" Value="#333333" />
|
|
|
+ </Trigger>
|
|
|
+ <Trigger Property="ButtonBase.IsPressed" Value="True">
|
|
|
+ <Setter Property="Path.Fill" TargetName="content" Value="#000000" />
|
|
|
+ </Trigger>
|
|
|
+ </ControlTemplate.Triggers>
|
|
|
+ </ControlTemplate>
|
|
|
+
|
|
|
+ <ControlTemplate x:Key="AddFileButton" TargetType="{x:Type ButtonBase}">
|
|
|
+ <Border BorderThickness="{TemplateBinding Border.BorderThickness}"
|
|
|
+ BorderBrush="{TemplateBinding Border.BorderBrush}"
|
|
|
+ Background="{TemplateBinding Panel.Background}"
|
|
|
+ Name="border"
|
|
|
+ SnapsToDevicePixels="True">
|
|
|
+ <Path Name="content" VerticalAlignment="Center" HorizontalAlignment="Center" Fill="#666666">
|
|
|
+ <Path.RenderTransform>
|
|
|
+ <TransformGroup>
|
|
|
+ <TranslateTransform X="-2" Y="-2"/>
|
|
|
+ </TransformGroup>
|
|
|
+ </Path.RenderTransform>
|
|
|
+ <Path.Data>
|
|
|
+ M9.48528137,2.98528137 L9.48428137,8.48428137 L14.9852814,8.48528137 L14.9852814,9.48528137 L9.48428137,9.48428137 L9.48528137,14.9852814 L8.48528137,14.9852814
|
|
|
+ L8.48428137,9.48428137 L2.98528137,9.48528137 L2.98528137,8.48528137 L8.48428137,8.48428137 L8.48528137,2.98528137 L9.48528137,2.98528137 Z
|
|
|
+ </Path.Data>
|
|
|
+ </Path>
|
|
|
+ </Border>
|
|
|
+ <ControlTemplate.Triggers>
|
|
|
+ <Trigger Property="Button.IsDefaulted" Value="True">
|
|
|
+ <Setter Property="Path.Fill" TargetName="content" Value="#666666" />
|
|
|
+ </Trigger>
|
|
|
+ <Trigger Property="UIElement.IsMouseOver" Value="True">
|
|
|
+ <Setter Property="Path.Fill" TargetName="content" Value="#333333" />
|
|
|
+ </Trigger>
|
|
|
+ <Trigger Property="ButtonBase.IsPressed" Value="True">
|
|
|
+ <Setter Property="Path.Fill" TargetName="content" Value="#000000" />
|
|
|
+ </Trigger>
|
|
|
+ </ControlTemplate.Triggers>
|
|
|
+ </ControlTemplate>
|
|
|
+
|
|
|
+ <Style x:Key="DragablzItemStyle" TargetType="{x:Type dragablz:DragablzItem}">
|
|
|
+ <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="28" Margin="4,0,0,2" BorderBrush="#A0A2AE" BorderThickness="1,1,1,0">
|
|
|
+ <Grid Background="Transparent">
|
|
|
+ <Grid.ColumnDefinitions>
|
|
|
+ <ColumnDefinition Width="auto" />
|
|
|
+ <ColumnDefinition Width="*" MinWidth="10" />
|
|
|
+ <ColumnDefinition Width="auto" />
|
|
|
+ </Grid.ColumnDefinitions>
|
|
|
+ <TextBlock x:Name="TextTitle" MaxWidth="145" Margin="8,4,0,4" FontFamily="Segoe UI,Microsoft YaHei" Text="{Binding FileName}" TextTrimming="WordEllipsis" />
|
|
|
+ <Thumb x:Name="PART_Thumb" Grid.ColumnSpan="2" HorizontalAlignment="Stretch" VerticalContentAlignment="Stretch" Background="Transparent" FontFamily="Segoe UI,Microsoft YaHei" ToolTip="{Binding 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" IsHitTestVisible="False" Text="*" Visibility="{Binding FileChanged}" />
|
|
|
+
|
|
|
+ <Button Grid.Column="2" Width="16" Height="16" Margin="0,4,8,4" Background="Transparent" BorderThickness="0" Command="{x:Static dragablz:TabablzControl.CloseItemCommand}"
|
|
|
+ CommandParameter="{Binding RelativeSource={RelativeSource TemplatedParent}}" Template="{StaticResource CloseFileButton}">
|
|
|
+ </Button>
|
|
|
+ </Grid>
|
|
|
</Border>
|
|
|
- </ControlTemplate>
|
|
|
- </GridSplitter.Template>
|
|
|
- </GridSplitter>
|
|
|
-
|
|
|
- <Grid Grid.Row="1" Grid.Column="2" >
|
|
|
- <Grid.RowDefinitions>
|
|
|
- <RowDefinition Height="auto"/>
|
|
|
- <RowDefinition Height="*"/>
|
|
|
- </Grid.RowDefinitions>
|
|
|
-
|
|
|
- <Grid Grid.Row="1">
|
|
|
- <Grid.ColumnDefinitions>
|
|
|
- <ColumnDefinition></ColumnDefinition>
|
|
|
- <ColumnDefinition Width="auto"></ColumnDefinition>
|
|
|
- </Grid.ColumnDefinitions>
|
|
|
- <!--PDFViewer-->
|
|
|
- <Border x:Name="PDFGrid" Background="{StaticResource color.bg.mainpage}"></Border>
|
|
|
- <!--右侧面板-->
|
|
|
- <Border Grid.Column="1" Name="PropertyContainer" Visibility="Collapsed"></Border>
|
|
|
- </Grid>
|
|
|
-
|
|
|
- <!--页码工具-->
|
|
|
- <cpdfcommon:PageNumberControl Grid.Row="1" Name="FloatPageTool" HorizontalAlignment="Center" VerticalAlignment="Bottom" Margin="0,0,0,20"></cpdfcommon:PageNumberControl>
|
|
|
- </Grid>
|
|
|
- </Grid>
|
|
|
- </Grid>
|
|
|
- <Border Name="PopupBorder" Background="#A0000000" Visibility="Collapsed">
|
|
|
- <Grid>
|
|
|
+ </Grid>
|
|
|
+
|
|
|
+ <ControlTemplate.Triggers>
|
|
|
+ <Trigger Property="IsSelected" Value="True">
|
|
|
+ <Setter TargetName="Title" Property="Background" Value="#FFFFFF" />
|
|
|
+ <Setter TargetName="Title" Property="BorderThickness" Value="1,1,1,0" />
|
|
|
+ <Setter TargetName="TextTitle" Property="Foreground" Value="Black" />
|
|
|
+ <Setter TargetName="ChangeIcon" Property="Foreground" Value="Black" />
|
|
|
+ </Trigger>
|
|
|
+ <Trigger Property="IsSelected" Value="False">
|
|
|
+ <Setter TargetName="Title" Property="Background" Value="TransParent" />
|
|
|
+ <Setter TargetName="Title" Property="BorderThickness" Value="1,1,1,0" />
|
|
|
+ <Setter TargetName="TextTitle" Property="Foreground" Value="White" />
|
|
|
+ <Setter TargetName="ChangeIcon" Property="Foreground" Value="white" />
|
|
|
+ </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 TargetName="TextTitle" Property="Foreground" Value="black" />
|
|
|
+ <Setter TargetName="ChangeIcon" Property="Foreground" Value="black" />
|
|
|
+ </MultiDataTrigger>
|
|
|
+ </ControlTemplate.Triggers>
|
|
|
+ </ControlTemplate>
|
|
|
+ </Setter.Value>
|
|
|
+ </Setter>
|
|
|
+ </Style>
|
|
|
+ </Window.Resources>
|
|
|
|
|
|
- <!--文件信息-->
|
|
|
- <Grid Name="FileInfoUI" Width="422" Height="680" HorizontalAlignment="Center" VerticalAlignment="Center" Background="White" Visibility="Collapsed">
|
|
|
+ <Grid Background="#273C62">
|
|
|
+ <dragablz:TabablzControl Name="TabControl" ItemContainerStyle="{StaticResource DragablzItemStyle}">
|
|
|
+ <dragablz:TabablzControl.InterTabController>
|
|
|
+ <dragablz:InterTabController />
|
|
|
+ </dragablz:TabablzControl.InterTabController>
|
|
|
+ <dragablz:TabablzControl.HeaderSuffixContent>
|
|
|
+ <Grid>
|
|
|
<Grid.ColumnDefinitions>
|
|
|
+ <ColumnDefinition Width="auto"></ColumnDefinition>
|
|
|
<ColumnDefinition Width="*"></ColumnDefinition>
|
|
|
- <ColumnDefinition Width="*"></ColumnDefinition>
|
|
|
+ <ColumnDefinition Width="auto"></ColumnDefinition>
|
|
|
</Grid.ColumnDefinitions>
|
|
|
- <Grid.RowDefinitions>
|
|
|
- <RowDefinition Height="auto"></RowDefinition>
|
|
|
- <RowDefinition Height="*"></RowDefinition>
|
|
|
- </Grid.RowDefinitions>
|
|
|
-
|
|
|
- <TextBlock Width="50" Height="20" FontSize="14" LineHeight="16" Margin="12,6,0,0" HorizontalAlignment="Left">FileInfo:</TextBlock>
|
|
|
- <Button Grid.Column="1" Width="16" Height="16" HorizontalAlignment="Right" Margin="0,8,8,0" BorderThickness="0" Click="FileInfoCloseBtn_Click">
|
|
|
- <Button.Content>
|
|
|
- <Path Fill="Black">
|
|
|
- <Path.Data>
|
|
|
- M6.69495 6L11.5 1.19495L10.805 0.5L6 5.30505L1.19495 0.5L0.5 1.19495L5.30505 6L0.5 10.805L1.19495 11.5L6 6.69495L10.805 11.5L11.5 10.805L6.69495 6Z
|
|
|
- </Path.Data>
|
|
|
- </Path>
|
|
|
- </Button.Content>
|
|
|
- </Button>
|
|
|
- <cpdftools:CPDFInfoControl Grid.Row="1" Margin="25,10,25,0" Grid.ColumnSpan="2" Name="FileInfoControl"></cpdftools:CPDFInfoControl>
|
|
|
+ <Button x:Name="addBtn" Width="16" Height="16" Margin="9,7,0,5" HorizontalAlignment="Left" Background="Transparent" BorderThickness="0"
|
|
|
+ Click="DefaultAddButton_Click" Template="{StaticResource AddFileButton}"></Button>
|
|
|
+ <Grid Grid.Column="2" HorizontalAlignment="Right">
|
|
|
+ <StackPanel>
|
|
|
+ <Button Width="30" Height="32"/>
|
|
|
+ </StackPanel>
|
|
|
+ </Grid>
|
|
|
</Grid>
|
|
|
+ </dragablz:TabablzControl.HeaderSuffixContent>
|
|
|
|
|
|
- <!--密码验证-->
|
|
|
- <cpdfcommon:PasswordDialog x:Name="PasswordUI" Visibility="Collapsed"></cpdfcommon:PasswordDialog>
|
|
|
- </Grid>
|
|
|
-
|
|
|
- </Border>
|
|
|
+ </dragablz:TabablzControl>
|
|
|
</Grid>
|
|
|
</Window>
|