154 lines
8.7 KiB
Plaintext
154 lines
8.7 KiB
Plaintext
|
|
<ResourceDictionary
|
||
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||
|
|
xmlns:controls="clr-namespace:WPFDark.Controls"
|
||
|
|
xmlns:internals="clr-namespace:WPFDark.Controls.Internals"
|
||
|
|
xmlns:wpf="clr-namespace:WPFDark"
|
||
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||
|
|
<Style TargetType="{x:Type controls:BiaWindow}" x:Key="BiaWindowSpaceSavingStyle">
|
||
|
|
<Setter Property="SnapsToDevicePixels" Value="True" />
|
||
|
|
<Setter Property="UseLayoutRounding" Value="True" />
|
||
|
|
<Setter Property="FontFamily" Value="{DynamicResource WPFDarkFontFamily}" />
|
||
|
|
|
||
|
|
<Setter Property="TextOptions.TextRenderingMode" Value="Auto" />
|
||
|
|
<Setter Property="TextOptions.TextFormattingMode" Value="Ideal" />
|
||
|
|
<Setter Property="TextOptions.TextHintingMode" Value="Animated" />
|
||
|
|
|
||
|
|
<Setter Property="ToolTipService.InitialShowDelay" Value="0" />
|
||
|
|
<Setter Property="ToolTipService.ShowDuration" Value="100000" />
|
||
|
|
<Setter Property="ToolTipService.BetweenShowDelay" Value="0" />
|
||
|
|
|
||
|
|
<Setter Property="WindowChrome.WindowChrome">
|
||
|
|
<Setter.Value>
|
||
|
|
<WindowChrome
|
||
|
|
CaptionHeight="32.0"
|
||
|
|
CornerRadius="0"
|
||
|
|
GlassFrameThickness="1"
|
||
|
|
ResizeBorderThickness="8" />
|
||
|
|
</Setter.Value>
|
||
|
|
</Setter>
|
||
|
|
|
||
|
|
<Setter Property="Template">
|
||
|
|
<Setter.Value>
|
||
|
|
<ControlTemplate TargetType="{x:Type controls:BiaWindow}">
|
||
|
|
<AdornerDecorator>
|
||
|
|
<Border
|
||
|
|
Background="{DynamicResource BackgroundBackgroundBrushKey}"
|
||
|
|
BorderThickness="1"
|
||
|
|
x:Name="Border">
|
||
|
|
<Border.Style>
|
||
|
|
<Style TargetType="{x:Type Border}">
|
||
|
|
<Setter Property="BorderBrush" Value="{DynamicResource AccentBrushKey}" />
|
||
|
|
|
||
|
|
<Style.Triggers>
|
||
|
|
<Trigger Property="IsEnabled" Value="False">
|
||
|
|
<Setter Property="BorderBrush" Value="{DynamicResource BackgroundBorderBrushKey}" />
|
||
|
|
</Trigger>
|
||
|
|
</Style.Triggers>
|
||
|
|
</Style>
|
||
|
|
</Border.Style>
|
||
|
|
|
||
|
|
<Grid>
|
||
|
|
<!-- Title Background -->
|
||
|
|
<Rectangle Fill="#303038" StrokeThickness="0.0" />
|
||
|
|
|
||
|
|
<!-- Title -->
|
||
|
|
<TextBlock
|
||
|
|
HorizontalAlignment="Center"
|
||
|
|
Margin="0,8,0,0"
|
||
|
|
Text="{TemplateBinding Title}"
|
||
|
|
VerticalAlignment="Top">
|
||
|
|
<TextBlock.Style>
|
||
|
|
<Style TargetType="{x:Type TextBlock}">
|
||
|
|
<Setter Property="Foreground" Value="{DynamicResource AccentForegroundBrushKey}" />
|
||
|
|
|
||
|
|
<Style.Triggers>
|
||
|
|
<Trigger Property="IsEnabled" Value="False">
|
||
|
|
<Setter Property="Foreground" Value="{DynamicResource InactiveForegroundBrushKey}" />
|
||
|
|
</Trigger>
|
||
|
|
</Style.Triggers>
|
||
|
|
</Style>
|
||
|
|
</TextBlock.Style>
|
||
|
|
</TextBlock>
|
||
|
|
|
||
|
|
<!-- Menu -->
|
||
|
|
<StackPanel
|
||
|
|
HorizontalAlignment="Left"
|
||
|
|
Orientation="Horizontal"
|
||
|
|
VerticalAlignment="Top"
|
||
|
|
WindowChrome.IsHitTestVisibleInChrome="True">
|
||
|
|
<ContentControl Content="{Binding Menu, RelativeSource={RelativeSource AncestorType={x:Type controls:BiaWindow}}}" />
|
||
|
|
<ContentControl Content="{Binding MenuRight, RelativeSource={RelativeSource AncestorType={x:Type controls:BiaWindow}}}" />
|
||
|
|
</StackPanel>
|
||
|
|
|
||
|
|
<ContentPresenter
|
||
|
|
HorizontalAlignment="Stretch"
|
||
|
|
Margin="0,32,0,0"
|
||
|
|
VerticalAlignment="Stretch"
|
||
|
|
x:Name="ContentPresenter" />
|
||
|
|
|
||
|
|
<!-- Shadow -->
|
||
|
|
<Rectangle
|
||
|
|
Height="5.0"
|
||
|
|
IsHitTestVisible="False"
|
||
|
|
Margin="0,32,0,0"
|
||
|
|
VerticalAlignment="Top">
|
||
|
|
<Rectangle.Fill>
|
||
|
|
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
|
||
|
|
<GradientStop Color="#FF181818" Offset="0.0" />
|
||
|
|
<GradientStop Color="#00181818" Offset="1.0" />
|
||
|
|
</LinearGradientBrush>
|
||
|
|
</Rectangle.Fill>
|
||
|
|
</Rectangle>
|
||
|
|
|
||
|
|
<!-- System Button -->
|
||
|
|
<StackPanel
|
||
|
|
HorizontalAlignment="Right"
|
||
|
|
Orientation="Horizontal"
|
||
|
|
VerticalAlignment="Top">
|
||
|
|
<internals:BiaHamburgerMenuHost MenuItem="{Binding HamburgerMenu, RelativeSource={RelativeSource AncestorType={x:Type controls:BiaWindow}}, Mode=OneWay}" />
|
||
|
|
<internals:BiaSystemButton IsVisibleButton="{TemplateBinding IsVisibleMinimizeButton}" WindowAction="{x:Static wpf:BiaWindowAction.Minimize}" />
|
||
|
|
<internals:BiaSystemButton IsVisibleButton="{TemplateBinding IsVisibleMaximizeButton}" WindowAction="{x:Static wpf:BiaWindowAction.Maximize}" />
|
||
|
|
<internals:BiaSystemButton IsVisibleButton="{TemplateBinding IsVisibleNormalizeButton}" WindowAction="{x:Static wpf:BiaWindowAction.Normalize}" />
|
||
|
|
<internals:BiaSystemButton IsVisibleButton="{TemplateBinding IsVisibleCloseButtonButton}" WindowAction="{x:Static wpf:BiaWindowAction.Close}" />
|
||
|
|
</StackPanel>
|
||
|
|
</Grid>
|
||
|
|
</Border>
|
||
|
|
</AdornerDecorator>
|
||
|
|
|
||
|
|
<ControlTemplate.Triggers>
|
||
|
|
<Trigger Property="WindowState" Value="Maximized">
|
||
|
|
<Setter Property="BorderThickness" TargetName="Border" Value="8" />
|
||
|
|
</Trigger>
|
||
|
|
<Trigger Property="WindowState" Value="Normal">
|
||
|
|
<Setter Property="BorderThickness" TargetName="Border" Value="1" />
|
||
|
|
</Trigger>
|
||
|
|
|
||
|
|
<Trigger Property="IsEnabled" Value="False">
|
||
|
|
<Trigger.EnterActions>
|
||
|
|
<BeginStoryboard>
|
||
|
|
<Storyboard TargetName="ContentPresenter">
|
||
|
|
<DoubleAnimation
|
||
|
|
Duration="0:0:0.15"
|
||
|
|
Storyboard.TargetProperty="Opacity"
|
||
|
|
To="0.5" />
|
||
|
|
</Storyboard>
|
||
|
|
</BeginStoryboard>
|
||
|
|
</Trigger.EnterActions>
|
||
|
|
|
||
|
|
<Trigger.ExitActions>
|
||
|
|
<BeginStoryboard>
|
||
|
|
<Storyboard TargetName="ContentPresenter">
|
||
|
|
<DoubleAnimation
|
||
|
|
Duration="0:0:0.1"
|
||
|
|
Storyboard.TargetProperty="Opacity"
|
||
|
|
To="1.0" />
|
||
|
|
</Storyboard>
|
||
|
|
</BeginStoryboard>
|
||
|
|
</Trigger.ExitActions>
|
||
|
|
</Trigger>
|
||
|
|
</ControlTemplate.Triggers>
|
||
|
|
</ControlTemplate>
|
||
|
|
</Setter.Value>
|
||
|
|
</Setter>
|
||
|
|
</Style>
|
||
|
|
</ResourceDictionary>
|