113 lines
6.2 KiB
XML
113 lines
6.2 KiB
XML
<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="BiaWindowTemplatedDialogStyle">
|
|
<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="IsVisibleMaximizeButton" Value="False" />
|
|
<Setter Property="IsVisibleMinimizeButton" Value="False" />
|
|
<Setter Property="IsVisibleNormalizeButton" Value="False" />
|
|
|
|
<Setter Property="ShowInTaskbar" Value="False" />
|
|
|
|
<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>
|
|
<ContentPresenter
|
|
Content="{Binding Mode=OneWay}"
|
|
ContentTemplate="{DynamicResource ControlTemplateKey}"
|
|
HorizontalAlignment="Stretch"
|
|
VerticalAlignment="Stretch"
|
|
x:Name="ContentPresenter" />
|
|
|
|
<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> |