|
@@ -1,24 +1,29 @@
|
|
|
-<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:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
|
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
|
- xmlns:local="clr-namespace:PDF_Office"
|
|
|
- xmlns:dragablz ="http://dragablz.net/winfx/xaml/dragablz"
|
|
|
- xmlns:prism ="http://prismlibrary.com/"
|
|
|
- xmlns:viewmodels="clr-namespace:PDF_Office.ViewModels"
|
|
|
- prism:ViewModelLocator.AutoWireViewModel="True"
|
|
|
- WindowStartupLocation="CenterScreen"
|
|
|
- mc:Ignorable="d"
|
|
|
- Title="{Binding Title}" Height="450" Width="800">
|
|
|
-
|
|
|
+<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:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
|
+ xmlns:dragablz="http://dragablz.net/winfx/xaml/dragablz"
|
|
|
+ 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"
|
|
|
+ Title="{Binding Title}"
|
|
|
+ Width="1280"
|
|
|
+ Height="800"
|
|
|
+ MinWidth="1280"
|
|
|
+ MinHeight="800"
|
|
|
+ prism:ViewModelLocator.AutoWireViewModel="True"
|
|
|
+ WindowStartupLocation="CenterScreen"
|
|
|
+ mc:Ignorable="d">
|
|
|
<WindowChrome.WindowChrome>
|
|
|
- <WindowChrome CornerRadius="0"
|
|
|
- CaptionHeight="30"
|
|
|
- GlassFrameThickness="-1"
|
|
|
- UseAeroCaptionButtons="False"
|
|
|
-
|
|
|
- NonClientFrameEdges="None"/>
|
|
|
+ <WindowChrome
|
|
|
+ CaptionHeight="30"
|
|
|
+ CornerRadius="0"
|
|
|
+ GlassFrameThickness="-1"
|
|
|
+ NonClientFrameEdges="None"
|
|
|
+ ResizeBorderThickness="3"
|
|
|
+ UseAeroCaptionButtons="False" />
|
|
|
</WindowChrome.WindowChrome>
|
|
|
<Window.Resources>
|
|
|
<ResourceDictionary>
|
|
@@ -26,53 +31,82 @@
|
|
|
<Setter Property="Template">
|
|
|
<Setter.Value>
|
|
|
<ControlTemplate TargetType="dragablz:DragablzItem">
|
|
|
- <Grid x:Name="templateRoot">
|
|
|
+ <Grid x:Name="templateRoot">
|
|
|
<Grid.ColumnDefinitions>
|
|
|
- <ColumnDefinition Width="*"></ColumnDefinition>
|
|
|
- <ColumnDefinition Width="auto"></ColumnDefinition>
|
|
|
+ <ColumnDefinition Width="*" />
|
|
|
+ <ColumnDefinition Width="auto" />
|
|
|
</Grid.ColumnDefinitions>
|
|
|
- <Border x:Name="Title" BorderBrush="#A0A2AE" BorderThickness="1 1 1 0" CornerRadius="5,5,0,0" Width="184" Height="28" Margin="4,0,0,2">
|
|
|
+ <Border
|
|
|
+ x:Name="Title"
|
|
|
+ Width="184"
|
|
|
+ Height="28"
|
|
|
+ Margin="4,0,0,2"
|
|
|
+ BorderBrush="#A0A2AE"
|
|
|
+ BorderThickness="1,1,1,0"
|
|
|
+ CornerRadius="5,5,0,0">
|
|
|
<Grid Background="Transparent">
|
|
|
<Grid.ColumnDefinitions>
|
|
|
- <ColumnDefinition Width="auto"></ColumnDefinition>
|
|
|
- <ColumnDefinition Width="*" MinWidth="10"></ColumnDefinition>
|
|
|
- <ColumnDefinition Width="auto"></ColumnDefinition>
|
|
|
+ <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" TextTrimming="WordEllipsis" Text="{Binding FileName}"/>
|
|
|
- <Thumb Grid.ColumnSpan="2" HorizontalAlignment="Stretch" VerticalContentAlignment="Stretch" x:Name="PART_Thumb" Background="Transparent" FontFamily="Segoe UI,Microsoft YaHei" ToolTip="{Binding FileName}">
|
|
|
+ <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"/>
|
|
|
+ <Grid Background="Transparent" />
|
|
|
</ControlTemplate>
|
|
|
</Thumb.Template>
|
|
|
</Thumb>
|
|
|
- <TextBlock Grid.Column="1" Width="5" x:Name="ChangeIcon" Margin="3,4,2,0" HorizontalAlignment="Left" VerticalAlignment="Top" Visibility="{Binding FileChanged}" Text="*" IsHitTestVisible="False"/>
|
|
|
+ <TextBlock
|
|
|
+ x:Name="ChangeIcon"
|
|
|
+ Grid.Column="1"
|
|
|
+ Width="5"
|
|
|
+ Margin="3,4,2,0"
|
|
|
+ HorizontalAlignment="Left"
|
|
|
+ VerticalAlignment="Top"
|
|
|
+ IsHitTestVisible="False"
|
|
|
+ Text="*"
|
|
|
+ Visibility="{Binding FileChanged}" />
|
|
|
|
|
|
</Grid>
|
|
|
</Border>
|
|
|
</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="#477EDE"/>
|
|
|
- <Setter TargetName="ChangeIcon" Property="Foreground" Value="#477EDE"/>
|
|
|
+ <Setter TargetName="Title" Property="Background" Value="#FFFFFF" />
|
|
|
+ <Setter TargetName="Title" Property="BorderThickness" Value="1,1,1,0" />
|
|
|
+ <Setter TargetName="TextTitle" Property="Foreground" Value="#477EDE" />
|
|
|
+ <Setter TargetName="ChangeIcon" Property="Foreground" Value="#477EDE" />
|
|
|
</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="#666666"/>
|
|
|
- <Setter TargetName="ChangeIcon" Property="Foreground" Value="#666666"/>
|
|
|
+ <Setter TargetName="Title" Property="Background" Value="TransParent" />
|
|
|
+ <Setter TargetName="Title" Property="BorderThickness" Value="1,1,1,0" />
|
|
|
+ <Setter TargetName="TextTitle" Property="Foreground" Value="#666666" />
|
|
|
+ <Setter TargetName="ChangeIcon" Property="Foreground" Value="#666666" />
|
|
|
<!--<Setter TargetName="btnPath" Property="Path.Fill" Value="#FF666666"/>-->
|
|
|
</Trigger>
|
|
|
<MultiDataTrigger>
|
|
|
<MultiDataTrigger.Conditions>
|
|
|
- <Condition Binding="{Binding IsSelected, RelativeSource={RelativeSource Self}}" Value="false"/>
|
|
|
- <Condition Binding="{Binding IsMouseOver, RelativeSource={RelativeSource Self}}" Value="true"/>
|
|
|
+ <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"/>
|
|
|
+ <Setter TargetName="Title" Property="Background" Value="#0D000000" />
|
|
|
+ <Setter TargetName="TextTitle" Property="Foreground" Value="black" />
|
|
|
+ <Setter TargetName="ChangeIcon" Property="Foreground" Value="black" />
|
|
|
<!--<Setter TargetName="btnPath" Property="Path.Fill" Value="Black"/>-->
|
|
|
</MultiDataTrigger>
|
|
|
</ControlTemplate.Triggers>
|
|
@@ -84,51 +118,71 @@
|
|
|
</Window.Resources>
|
|
|
<Grid>
|
|
|
<Grid.RowDefinitions>
|
|
|
- <RowDefinition Height="40"/>
|
|
|
- <RowDefinition Height="*"/>
|
|
|
+ <RowDefinition Height="40" />
|
|
|
+ <RowDefinition Height="*" />
|
|
|
</Grid.RowDefinitions>
|
|
|
- <dragablz:TabablzControl WindowChrome.IsHitTestVisibleInChrome="True"
|
|
|
- Name="PDFViewerTab"
|
|
|
- BorderThickness="0" Grid.RowSpan="2">
|
|
|
+ <dragablz:TabablzControl
|
|
|
+ Name="PDFViewerTab"
|
|
|
+ Grid.RowSpan="2"
|
|
|
+ BorderThickness="0"
|
|
|
+ ItemContainerStyle="{StaticResource DragablzItemStyle}"
|
|
|
+ WindowChrome.IsHitTestVisibleInChrome="True">
|
|
|
<dragablz:TabablzControl.InterTabController>
|
|
|
- <dragablz:InterTabController/>
|
|
|
+ <dragablz:InterTabController />
|
|
|
</dragablz:TabablzControl.InterTabController>
|
|
|
<dragablz:TabablzControl.HeaderSuffixContent>
|
|
|
- <Button x:Name="addBtn" Margin="9,7,50,5" BorderThickness="0" Background="Transparent"
|
|
|
- Content="+" Width="16" Height="16" HorizontalAlignment="Left">
|
|
|
- </Button>
|
|
|
+ <Button
|
|
|
+ x:Name="BtnAdd"
|
|
|
+ Width="16"
|
|
|
+ Height="16"
|
|
|
+ Margin="9,7,200,5"
|
|
|
+ HorizontalAlignment="Left"
|
|
|
+ Background="Transparent"
|
|
|
+ BorderThickness="0"
|
|
|
+ Click="BtnAdd_Click"
|
|
|
+ Content="+" />
|
|
|
</dragablz:TabablzControl.HeaderSuffixContent>
|
|
|
<dragablz:TabablzControl.HeaderPrefixContent>
|
|
|
- <Grid Background="Transparent" Width="16" Height="38" Margin="0 2 0 0"/>
|
|
|
+ <Grid
|
|
|
+ Width="16"
|
|
|
+ Height="38"
|
|
|
+ Margin="0,2,0,0"
|
|
|
+ Background="Transparent" />
|
|
|
</dragablz:TabablzControl.HeaderPrefixContent>
|
|
|
<TabItem Name="HomeTabControlItem">
|
|
|
<TabItem.Header>
|
|
|
- <DockPanel VerticalAlignment="Center" Height="40">
|
|
|
- <TextBlock Text="Home"/>
|
|
|
- </DockPanel>
|
|
|
- </TabItem.Header>
|
|
|
- <TabItem.Content>
|
|
|
- <ContentControl Name="ViwerContent"/>
|
|
|
- </TabItem.Content>
|
|
|
- </TabItem>
|
|
|
- <TabItem Name="Home1TabControlItem">
|
|
|
- <TabItem.Header>
|
|
|
- <DockPanel VerticalAlignment="Center" Height="40">
|
|
|
- <TextBlock Text="Home"/>
|
|
|
+ <DockPanel Height="40" VerticalAlignment="Center">
|
|
|
+ <TextBlock Text="Home" />
|
|
|
</DockPanel>
|
|
|
</TabItem.Header>
|
|
|
<TabItem.Content>
|
|
|
- <ContentControl Name="ViwerContent1"/>
|
|
|
+ <ContentControl prism:RegionManager.RegionName="ViwerRegion" />
|
|
|
</TabItem.Content>
|
|
|
</TabItem>
|
|
|
</dragablz:TabablzControl>
|
|
|
|
|
|
- <!--标题栏右侧栏,关闭按钮,会员,试用等-->
|
|
|
- <StackPanel Orientation="Horizontal" WindowChrome.IsHitTestVisibleInChrome="True" HorizontalAlignment="Right">
|
|
|
- <Button Width="40" Height="40" Content="--" Command="{x:Static SystemCommands.MinimizeWindowCommand}" CommandParameter="{Binding RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type Window}}}" />
|
|
|
- <Button Width="40" Height="40">
|
|
|
- </Button>
|
|
|
- <Button Width="40" Height="40" Content="X" Command="{x:Static SystemCommands.CloseWindowCommand}"/>
|
|
|
+ <!-- 标题栏右侧栏,关闭按钮,会员,试用等 -->
|
|
|
+ <StackPanel
|
|
|
+ HorizontalAlignment="Right"
|
|
|
+ Orientation="Horizontal"
|
|
|
+ WindowChrome.IsHitTestVisibleInChrome="True">
|
|
|
+ <Button
|
|
|
+ Name="BtnMiniSize"
|
|
|
+ Width="40"
|
|
|
+ Height="40"
|
|
|
+ Click="BtnMiniSize_Click"
|
|
|
+ Content="--" />
|
|
|
+ <Button
|
|
|
+ Name="BtnReStore"
|
|
|
+ Width="40"
|
|
|
+ Height="40"
|
|
|
+ Click="BtnReStore_Click" />
|
|
|
+ <Button
|
|
|
+ Name="BtnClose"
|
|
|
+ Width="40"
|
|
|
+ Height="40"
|
|
|
+ Click="BtnClose_Click"
|
|
|
+ Content="X" />
|
|
|
</StackPanel>
|
|
|
</Grid>
|
|
|
</Window>
|