|
@@ -1,4 +1,5 @@
|
|
|
<Window x:Class="compdfkit.MainWindow"
|
|
|
+ x:Name="Window"
|
|
|
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"
|
|
@@ -9,14 +10,23 @@
|
|
|
mc:Ignorable="d"
|
|
|
SnapsToDevicePixels="True"
|
|
|
xmlns:dragablz="clr-namespace:Dragablz;assembly=Dragablz"
|
|
|
+ BorderThickness="{Binding RelativeSource={RelativeSource Mode=Self},Path=WindowState,Converter={StaticResource WindowStateToThicknessConverter}}"
|
|
|
Title="MainWindow" Height="960" Width="1280" WindowStartupLocation="CenterScreen">
|
|
|
<WindowChrome.WindowChrome>
|
|
|
<WindowChrome
|
|
|
+ CornerRadius="8"
|
|
|
NonClientFrameEdges="Left,Bottom,Right"
|
|
|
UseAeroCaptionButtons="False"
|
|
|
ResizeBorderThickness="{x:Static SystemParameters.WindowResizeBorderThickness}">
|
|
|
+ <WindowChrome.CaptionHeight>
|
|
|
+ <MultiBinding Converter="{StaticResource CaptionHeightConverter}">
|
|
|
+ <Binding ElementName="TitleBarGrid" Path="ActualHeight"/>
|
|
|
+ <Binding ElementName="Window" Path="BorderThickness.Top"/>
|
|
|
+ </MultiBinding>
|
|
|
+ </WindowChrome.CaptionHeight>
|
|
|
</WindowChrome>
|
|
|
</WindowChrome.WindowChrome>
|
|
|
+
|
|
|
<Window.Resources>
|
|
|
<ControlTemplate x:Key="CloseFileButton" TargetType="{x:Type ButtonBase}">
|
|
|
<Border BorderThickness="{TemplateBinding Border.BorderThickness}"
|
|
@@ -91,7 +101,7 @@
|
|
|
<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">
|
|
|
+ <Border x:Name="Title" Width="184" Height="32" Margin="0,4,0,0" BorderBrush="#A0A2AE" BorderThickness="1,1,1,0" CornerRadius="3,3,0,0">
|
|
|
<Grid Background="Transparent">
|
|
|
<Grid.ColumnDefinitions>
|
|
|
<ColumnDefinition Width="auto" />
|
|
@@ -114,7 +124,6 @@
|
|
|
</Grid>
|
|
|
</Border>
|
|
|
</Grid>
|
|
|
-
|
|
|
<ControlTemplate.Triggers>
|
|
|
<Trigger Property="IsSelected" Value="True">
|
|
|
<Setter TargetName="Title" Property="Background" Value="#FFFFFF" />
|
|
@@ -142,15 +151,78 @@
|
|
|
</Setter.Value>
|
|
|
</Setter>
|
|
|
</Style>
|
|
|
+ <Style x:Key="TitleBarButtonStyle" TargetType="Button">
|
|
|
+ <Setter Property="Foreground" Value="#FFFFFF" />
|
|
|
+ <Setter Property="Padding" Value="0" />
|
|
|
+ <Setter Property="Margin" Value="0" />
|
|
|
+ <Setter Property="VerticalAlignment" Value="Top" />
|
|
|
+ <Setter Property="WindowChrome.IsHitTestVisibleInChrome" Value="True" />
|
|
|
+ <Setter Property="IsTabStop" Value="False" />
|
|
|
+ <Setter Property="Width" Value="36" />
|
|
|
+ <Setter Property="Height" Value="30" />
|
|
|
+ <Setter Property="Template">
|
|
|
+ <Setter.Value>
|
|
|
+ <ControlTemplate TargetType="{x:Type Button}">
|
|
|
+ <Border x:Name="border"
|
|
|
+ Background="Transparent"
|
|
|
+ BorderThickness="0"
|
|
|
+ SnapsToDevicePixels="True">
|
|
|
+ <ContentPresenter x:Name="contentPresenter"
|
|
|
+ Margin="0"
|
|
|
+ HorizontalAlignment="Center"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ Focusable="False"
|
|
|
+ RecognizesAccessKey="True" />
|
|
|
+ </Border>
|
|
|
+ <ControlTemplate.Triggers>
|
|
|
+ <Trigger Property="IsMouseOver" Value="true">
|
|
|
+ <Setter TargetName="border" Property="Background" Value="#1AE9E9E9" />
|
|
|
+ </Trigger>
|
|
|
+ <Trigger Property="IsPressed" Value="true">
|
|
|
+ <Setter TargetName="border" Property="Background" Value="#1AEDEDED" />
|
|
|
+ </Trigger>
|
|
|
+ </ControlTemplate.Triggers>
|
|
|
+ </ControlTemplate>
|
|
|
+ </Setter.Value>
|
|
|
+ </Setter>
|
|
|
+ </Style>
|
|
|
+
|
|
|
+ <Style x:Key="TitleBarCloseButtonStyle" BasedOn="{StaticResource TitleBarButtonStyle}" TargetType="Button">
|
|
|
+ <Setter Property="Template">
|
|
|
+ <Setter.Value>
|
|
|
+ <ControlTemplate TargetType="{x:Type Button}">
|
|
|
+ <Border x:Name="border"
|
|
|
+ Background="Transparent"
|
|
|
+ BorderThickness="0"
|
|
|
+ SnapsToDevicePixels="True">
|
|
|
+ <ContentPresenter x:Name="contentPresenter"
|
|
|
+ Margin="0"
|
|
|
+ HorizontalAlignment="Center"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ Focusable="False"
|
|
|
+ RecognizesAccessKey="True" />
|
|
|
+ </Border>
|
|
|
+ <ControlTemplate.Triggers>
|
|
|
+ <Trigger Property="IsMouseOver" Value="true">
|
|
|
+ <Setter TargetName="border" Property="Background" Value="#C42B1C" />
|
|
|
+ </Trigger>
|
|
|
+ <Trigger Property="IsPressed" Value="true">
|
|
|
+ <Setter TargetName="border" Property="Background" Value="#C84031" />
|
|
|
+ </Trigger>
|
|
|
+ </ControlTemplate.Triggers>
|
|
|
+ </ControlTemplate>
|
|
|
+ </Setter.Value>
|
|
|
+ </Setter>
|
|
|
+ </Style>
|
|
|
</Window.Resources>
|
|
|
|
|
|
- <Grid Background="#273C62">
|
|
|
- <dragablz:TabablzControl Name="TabControl" ItemContainerStyle="{StaticResource DragablzItemStyle}">
|
|
|
+ <Grid Background="#273C62" Margin="0,-1,0,0">
|
|
|
+ <dragablz:TabablzControl Name="TabControl" ItemContainerStyle="{StaticResource DragablzItemStyle}" WindowChrome.IsHitTestVisibleInChrome="True">
|
|
|
<dragablz:TabablzControl.InterTabController>
|
|
|
<dragablz:InterTabController />
|
|
|
</dragablz:TabablzControl.InterTabController>
|
|
|
<dragablz:TabablzControl.HeaderSuffixContent>
|
|
|
- <Grid>
|
|
|
+ <Grid Name="TitleBarGrid" MinHeight="32">
|
|
|
<Grid.ColumnDefinitions>
|
|
|
<ColumnDefinition Width="auto"></ColumnDefinition>
|
|
|
<ColumnDefinition Width="*"></ColumnDefinition>
|
|
@@ -159,8 +231,25 @@
|
|
|
<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 Orientation="Horizontal" Margin="0,-2,0,0">
|
|
|
+ <Button x:Name="MinimizeButton" Style="{StaticResource TitleBarButtonStyle}" Width="36" Height="32" Click="MinimizeButton_Click">
|
|
|
+ <Path Width="36" Height="32"
|
|
|
+ Data="M 13,15 H 23"
|
|
|
+ Stroke="{Binding Path=Foreground, RelativeSource={RelativeSource AncestorType={x:Type Button}}}"
|
|
|
+ StrokeThickness="1" />
|
|
|
+ </Button>
|
|
|
+ <Button x:Name="MaximizeRestoreButton" Style="{StaticResource TitleBarButtonStyle}" Width="36" Height="32" Click="MaximizeRestoreButton_Click">
|
|
|
+ <Path Width="36" Height="32"
|
|
|
+ Data="{Binding ElementName=Window, Path=WindowState, Converter={StaticResource WindowStateToPathConverter}}"
|
|
|
+ Stroke="{Binding Path=Foreground,RelativeSource={RelativeSource AncestorType={x:Type Button}}}"
|
|
|
+ StrokeThickness="1" />
|
|
|
+ </Button>
|
|
|
+ <Button x:Name="CloseButton" Style="{StaticResource TitleBarCloseButtonStyle}" Width="36" Height="32" Click="CloseButton_Click">
|
|
|
+ <Path Width="36" Height="32"
|
|
|
+ Data="M 13,11 22,20 M 13,20 22,11"
|
|
|
+ Stroke="{Binding Path=Foreground,RelativeSource={RelativeSource AncestorType={x:Type Button}}}"
|
|
|
+ StrokeThickness="1" />
|
|
|
+ </Button>
|
|
|
</StackPanel>
|
|
|
</Grid>
|
|
|
</Grid>
|