Compare commits

..

2 Commits

Author SHA1 Message Date
Zhang Dian
d4463a6002 feat: enhance WindowDrawnDecorations with new caption button styles and layout adjustments. 2026-03-06 17:18:06 +08:00
Zhang Dian
65e4d0d4a4 feat: upgrade Avalonia to 12.0.0-preview2. 2026-03-06 15:09:57 +08:00
21 changed files with 448 additions and 363 deletions

View File

@@ -1,7 +1,7 @@
<Project>
<PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
<AvaloniaVersion>12.0.0-preview1</AvaloniaVersion>
<AvaloniaVersion>12.0.0-preview2</AvaloniaVersion>
<DataGridVersion>11.3.10</DataGridVersion>
<SkiaSharpVersion>3.119.1</SkiaSharpVersion>
</PropertyGroup>

View File

@@ -1,7 +1,7 @@
<Project>
<PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
<AvaloniaVersion>12.0.0-preview1</AvaloniaVersion>
<AvaloniaVersion>12.0.0-preview2</AvaloniaVersion>
<DataGridVersion>11.3.7</DataGridVersion>
</PropertyGroup>
<ItemGroup>

View File

@@ -1,6 +1,7 @@
using Avalonia.Controls;
using Avalonia.Media;
using Avalonia.Utilities;
using Irihi.Avalonia.Shared.Helpers;
namespace Semi.Avalonia.ColorPicker;
@@ -220,8 +221,8 @@ public class SemiColorDarkPalette: IColorPalette
public Color GetColor(int colorIndex, int shadeIndex)
{
return Colors[
MathUtilities.Clamp(colorIndex, 0, ColorCount - 1),
MathUtilities.Clamp(shadeIndex, 0, ShadeCount - 1)
MathHelpers.SafeClamp(colorIndex, 0, ColorCount - 1),
MathHelpers.SafeClamp(shadeIndex, 0, ShadeCount - 1)
];
}

View File

@@ -1,6 +1,7 @@
using Avalonia.Controls;
using Avalonia.Media;
using Avalonia.Utilities;
using Irihi.Avalonia.Shared.Helpers;
namespace Semi.Avalonia.ColorPicker;
@@ -220,8 +221,8 @@ public class SemiColorLightPalette: IColorPalette
public Color GetColor(int colorIndex, int shadeIndex)
{
return Colors[
MathUtilities.Clamp(colorIndex, 0, ColorCount - 1),
MathUtilities.Clamp(shadeIndex, 0, ShadeCount - 1)
MathHelpers.SafeClamp(colorIndex, 0, ColorCount - 1),
MathHelpers.SafeClamp(shadeIndex, 0, ShadeCount - 1)
];
}

View File

@@ -1,112 +0,0 @@
<ResourceDictionary
xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Design.PreviewWith>
<CaptionButtons />
</Design.PreviewWith>
<ControlTheme x:Key="CaptionButton" TargetType="Button">
<Setter Property="Foreground" Value="{DynamicResource CaptionButtonForeground}" />
<Setter Property="Background" Value="Transparent" />
<Setter Property="CornerRadius" Value="{StaticResource CaptionButtonCornerRadius}" />
<Setter Property="Padding" Value="{StaticResource CaptionButtonPadding}" />
<Setter Property="Width" Value="{StaticResource CaptionButtonWidth}" />
<Setter Property="Height" Value="{StaticResource CaptionButtonHeight}" />
<Setter Property="Cursor" Value="Hand" />
<Setter Property="VerticalAlignment" Value="Stretch" />
<Setter Property="Template">
<ControlTemplate TargetType="Button">
<ContentPresenter
Name="PART_ContentPresenter"
Padding="{TemplateBinding Padding}"
Foreground="{TemplateBinding Foreground}"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
Content="{TemplateBinding Content}"
ContentTemplate="{TemplateBinding ContentTemplate}"
CornerRadius="{TemplateBinding CornerRadius}" />
</ControlTemplate>
</Setter>
<Style Selector="^:pointerover">
<Setter Property="Background" Value="{DynamicResource CaptionButtonPointeroverBackground}" />
</Style>
<Style Selector="^:pressed">
<Setter Property="Background" Value="{DynamicResource CaptionButtonPressedBackground}" />
</Style>
</ControlTheme>
<ControlTheme x:Key="{x:Type CaptionButtons}" TargetType="CaptionButtons">
<Setter Property="Foreground" Value="{DynamicResource CaptionButtonForeground}" />
<Setter Property="Template">
<ControlTemplate TargetType="CaptionButtons">
<StackPanel Orientation="Horizontal">
<Button Name="PART_FullScreenButton" Theme="{StaticResource CaptionButton}">
<PathIcon
Name="PART_FullScreenButtonIcon"
Theme="{StaticResource InnerPathIcon}"
Data="{StaticResource WindowExpandGlyph}"
Foreground="{Binding $parent[Button].Foreground}" />
</Button>
<Button
Name="PART_MinimizeButton"
Theme="{StaticResource CaptionButton}"
AutomationProperties.Name="Minimize"
Win32Properties.NonClientHitTestResult="MinButton">
<PathIcon
Name="PART_MinimizeButtonIcon"
Theme="{StaticResource InnerPathIcon}"
Data="{StaticResource WindowMinimizeGlyph}"
Foreground="{Binding $parent[Button].Foreground}" />
</Button>
<Button
Name="PART_RestoreButton"
Theme="{StaticResource CaptionButton}"
AutomationProperties.Name="Maximize"
Win32Properties.NonClientHitTestResult="MaxButton">
<PathIcon
Name="PART_RestoreButtonIcon"
Theme="{StaticResource InnerPathIcon}"
Data="{StaticResource WindowMaximizeGlyph}"
Foreground="{Binding $parent[Button].Foreground}" />
</Button>
<Button
Name="PART_CloseButton"
Theme="{StaticResource CaptionButton}"
AutomationProperties.Name="Close"
Win32Properties.NonClientHitTestResult="Close">
<PathIcon
Name="PART_CloseButtonIcon"
Theme="{StaticResource InnerPathIcon}"
Data="{StaticResource WindowCloseIconGlyph}"
Foreground="{Binding $parent[Button].Foreground}" />
</Button>
</StackPanel>
</ControlTemplate>
</Setter>
<Style Selector="^ /template/ Button#PART_CloseButton:pointerover">
<Setter Property="Foreground" Value="{DynamicResource CaptionButtonCloseForeground}" />
<Setter Property="Background" Value="{DynamicResource CaptionButtonClosePointeroverBackground}" />
</Style>
<Style Selector="^ /template/ Button#PART_CloseButton:pressed">
<Setter Property="Foreground" Value="{DynamicResource CaptionButtonCloseForeground}" />
<Setter Property="Background" Value="{DynamicResource CaptionButtonClosePressedBackground}" />
</Style>
<Style Selector="^:maximized /template/ PathIcon#PART_RestoreButtonIcon">
<Setter Property="Data" Value="{StaticResource WindowRestoreGlyph}" />
</Style>
<Style Selector="^:fullscreen /template/ PathIcon#PART_FullScreenButtonIcon">
<Setter Property="Data" Value="{StaticResource WindowCollapseGlyph}" />
</Style>
<Style Selector="^:fullscreen /template/ Button#PART_RestoreButton">
<Setter Property="IsVisible" Value="False" />
</Style>
<Style Selector="^:fullscreen /template/ Button#PART_MinimizeButton">
<Setter Property="IsVisible" Value="False" />
</Style>
</ControlTheme>
</ResourceDictionary>

View File

@@ -4,54 +4,87 @@
xmlns:semi="https://irihi.tech/semi"
xmlns:converters="using:Avalonia.Controls.Converters">
<Design.PreviewWith>
<StackPanel Width="400" Margin="20">
<ProgressBar />
<ProgressBar Value="20" />
<ProgressBar Value="50" Classes="Success" />
<ProgressBar Value="80" Classes="Warning" />
<ProgressBar Value="100" Classes="Error" />
<ProgressBar ShowProgressText="True" />
<ProgressBar Value="20" ShowProgressText="True" />
<ProgressBar Value="50" Classes="Success" ShowProgressText="True" />
<ProgressBar Value="80" Classes="Warning" ShowProgressText="True" />
<ProgressBar Value="100" Classes="Error" ShowProgressText="True" />
<ProgressBar Classes="Left" ShowProgressText="True" />
<ProgressBar Value="20" Classes="Left" ShowProgressText="True" />
<ProgressBar Value="50" Classes="Left Success" ShowProgressText="True" />
<ProgressBar Value="80" Classes="Left Warning" ShowProgressText="True" />
<ProgressBar Value="100" Classes="Left Error" ShowProgressText="True" />
<ProgressBar Classes="Right" ShowProgressText="True" />
<ProgressBar Value="20" Classes="Right" ShowProgressText="True" />
<ProgressBar Value="50" Classes="Right Success" ShowProgressText="True" />
<ProgressBar Value="80" Classes="Right Warning" ShowProgressText="True" />
<ProgressBar Value="100" Classes="Right Error" ShowProgressText="True" />
<StackPanel Orientation="Horizontal">
<StackPanel.Styles>
<Style Selector="ProgressBar">
<Setter Property="Orientation" Value="Vertical" />
</Style>
</StackPanel.Styles>
<ProgressBar />
<ProgressBar Value="20" />
<ProgressBar Value="50" Classes="Success" />
<ProgressBar Value="80" Classes="Warning" />
<ProgressBar Value="100" Classes="Error" />
<ProgressBar ShowProgressText="True" />
<ProgressBar Value="20" ShowProgressText="True" />
<ProgressBar Value="50" Classes="Success" ShowProgressText="True" />
<ProgressBar Value="80" Classes="Warning" ShowProgressText="True" />
<ProgressBar Value="100" Classes="Error" ShowProgressText="True" />
<ProgressBar Classes="Top" ShowProgressText="True" />
<ProgressBar Value="20" Classes="Top" ShowProgressText="True" />
<ProgressBar Value="50" Classes="Top Success" ShowProgressText="True" />
<ProgressBar Value="80" Classes="Top Warning" ShowProgressText="True" />
<ProgressBar Value="100" Classes="Top Error" ShowProgressText="True" />
<ProgressBar Classes="Bottom" ShowProgressText="True" />
<ProgressBar Value="20" Classes="Bottom" ShowProgressText="True" />
<ProgressBar Value="50" Classes="Bottom Success" ShowProgressText="True" />
<ProgressBar Value="80" Classes="Bottom Warning" ShowProgressText="True" />
<ProgressBar Value="100" Classes="Bottom Error" ShowProgressText="True" />
<StackPanel Margin="20" Spacing="20">
<ProgressBar
Width="200"
Maximum="100"
Minimum="0"
ShowProgressText="True"
Value="20" />
<ProgressBar
Width="200"
IsIndeterminate="True"
Maximum="100"
Minimum="0"
ShowProgressText="True"
Value="20" />
<ProgressBar
Width="200"
Classes="Left"
IsIndeterminate="True"
Maximum="100"
Minimum="0"
ShowProgressText="True"
Value="20" />
<ProgressBar
Width="200"
Classes="Left"
Maximum="100"
Minimum="0"
ShowProgressText="True"
Value="20" />
<ProgressBar
Width="200"
Classes="Right"
Maximum="100"
Minimum="0"
ShowProgressText="True"
Value="20" />
<StackPanel
HorizontalAlignment="Left"
Orientation="Horizontal"
Spacing="20">
<ProgressBar
Classes="Left"
Maximum="100"
Minimum="0"
Orientation="Vertical"
ShowProgressText="True"
Value="20" />
<ProgressBar
Classes="Right"
Maximum="100"
Minimum="0"
Orientation="Vertical"
ShowProgressText="True"
Value="20" />
<ProgressBar
Maximum="100"
Minimum="0"
Orientation="Vertical"
ShowProgressText="True"
Value="20" />
<ProgressBar
Classes="Left"
Maximum="100"
Minimum="0"
Orientation="Vertical"
ShowProgressText="False"
Value="20" />
<ProgressBar
IsIndeterminate="True"
Maximum="100"
Minimum="0"
Orientation="Vertical"
ShowProgressText="True"
Value="20" />
<ProgressBar
IsIndeterminate="True"
Maximum="100"
Minimum="0"
Orientation="Vertical"
ShowProgressText="False"
Value="20" />
</StackPanel>
</StackPanel>
</Design.PreviewWith>
@@ -82,7 +115,7 @@
<Panel Name="DeterminateRoot" Opacity="1">
<Panel.Transitions>
<Transitions>
<DoubleTransition Property="Opacity" Duration="0:0:0.2" />
<DoubleTransition Property="Opacity" Duration="0:0:0.197" />
</Transitions>
</Panel.Transitions>
<Border
@@ -94,7 +127,7 @@
<Panel Name="IndeterminateRoot" Opacity="0">
<Panel.Transitions>
<Transitions>
<DoubleTransition Property="Opacity" Duration="0:0:0.2" />
<DoubleTransition Property="Opacity" Duration="0:0:0.197" />
</Transitions>
</Panel.Transitions>
<Border
@@ -125,7 +158,7 @@
<TextBlock.Text>
<MultiBinding Converter="{StaticResource StringFormatConverter}">
<TemplateBinding Property="ProgressTextFormat" />
<TemplateBinding Property="Value" />
<Binding Path="Value" RelativeSource="{RelativeSource TemplatedParent}" />
<TemplateBinding Property="Percentage" />
<TemplateBinding Property="Minimum" />
<TemplateBinding Property="Maximum" />
@@ -158,155 +191,149 @@
<Style Selector="^.Error">
<Setter Property="Foreground" Value="{DynamicResource ProgressBarErrorForeground}" />
</Style>
<Style Selector="^:horizontal /template/ Border#PART_Indicator">
<Setter Property="HorizontalAlignment" Value="Left" />
<Setter Property="VerticalAlignment" Value="Stretch" />
</Style>
<Style Selector="^:vertical /template/ Border#PART_Indicator">
<Setter Property="HorizontalAlignment" Value="Stretch" />
<Setter Property="VerticalAlignment" Value="Top" />
</Style>
<Style Selector="^:horizontal">
<Setter Property="MinWidth" Value="200" />
<Setter Property="MinHeight" Value="4" />
<Style Selector="^ /template/ Border#PART_Indicator">
<Setter Property="HorizontalAlignment" Value="Left" />
</Style>
<Style Selector="^ /template/ Border#IndeterminateProgressBarIndicator">
<Setter Property="Width" Value="{Binding $parent[ProgressBar].TemplateSettings.ContainerWidth}" />
</Style>
<Style Selector="^ /template/ Border#IndeterminateProgressBarIndicator2">
<Setter Property="Width" Value="{Binding $parent[ProgressBar].TemplateSettings.Container2Width}" />
</Style>
<Style Selector="^.Left,^.Top">
<Style Selector="^ /template/ LayoutTransformControl#PART_LayoutTransformControl">
<Setter Property="Grid.Column" Value="0" />
<Setter Property="Grid.Row" Value="1" />
<Setter Property="Margin" Value="0 0 16 0" />
<Setter Property="MinWidth" Value="45" />
</Style>
<Style Selector="^ /template/ Border#ProgressBarRoot">
<Setter Property="MinHeight" Value="4" />
<Setter Property="VerticalAlignment" Value="Center" />
</Style>
</Style>
<Style Selector="^.Right,^.Bottom">
<Style Selector="^ /template/ LayoutTransformControl#PART_LayoutTransformControl">
<Setter Property="Grid.Column" Value="2" />
<Setter Property="Grid.Row" Value="1" />
<Setter Property="Margin" Value="16 0 0 0" />
<Setter Property="MinWidth" Value="45" />
</Style>
<Style Selector="^ /template/ Border#ProgressBarRoot">
<Setter Property="MinHeight" Value="4" />
<Setter Property="VerticalAlignment" Value="Center" />
</Style>
</Style>
</Style>
<Style Selector="^:vertical">
<Style Selector="^ /template/ LayoutTransformControl#PART_LayoutTransformControl">
<Setter Property="LayoutTransform">
<RotateTransform Angle="90" />
</Setter>
</Style>
<Setter Property="MinWidth" Value="4" />
<Setter Property="MinHeight" Value="200" />
<Style Selector="^ /template/ Border#PART_Indicator">
<Setter Property="VerticalAlignment" Value="Top" />
</Style>
<Style Selector="^:vertical /template/ LayoutTransformControl#PART_LayoutTransformControl">
<Setter Property="LayoutTransform">
<RotateTransform Angle="90" />
</Setter>
</Style>
<Style Selector="^:indeterminate /template/ Panel#DeterminateRoot">
<Setter Property="Opacity" Value="0" />
</Style>
<Style Selector="^:indeterminate /template/ Panel#IndeterminateRoot">
<Setter Property="Opacity" Value="1" />
</Style>
<Style Selector="^:horizontal:indeterminate /template/ Border#IndeterminateProgressBarIndicator">
<Style.Animations>
<Animation IterationCount="Infinite" Duration="0:0:2">
<KeyFrame KeySpline="0.4,0,0.6,1" KeyTime="0:0:0">
<Setter Property="TranslateTransform.X" Value="{Binding $parent[ProgressBar].TemplateSettings.ContainerAnimationStartPosition}" />
</KeyFrame>
<KeyFrame KeySpline="0.4,0,0.6,1" KeyTime="0:0:1.5">
<Setter Property="TranslateTransform.X" Value="{Binding $parent[ProgressBar].TemplateSettings.ContainerAnimationEndPosition}" />
</KeyFrame>
<KeyFrame KeySpline="0.4,0,0.6,1" KeyTime="0:0:2">
<Setter Property="TranslateTransform.X" Value="{Binding $parent[ProgressBar].TemplateSettings.ContainerAnimationEndPosition}" />
</KeyFrame>
</Animation>
</Style.Animations>
</Style>
<Style Selector="^:horizontal:indeterminate /template/ Border#IndeterminateProgressBarIndicator2">
<Style.Animations>
<Animation IterationCount="Infinite" Duration="0:0:2">
<KeyFrame KeySpline="0.4,0,0.6,1" KeyTime="0:0:0">
<Setter Property="TranslateTransform.X" Value="{Binding $parent[ProgressBar].TemplateSettings.Container2AnimationStartPosition}" />
</KeyFrame>
<KeyFrame KeySpline="0.4,0,0.6,1" KeyTime="0:0:0.75">
<Setter Property="TranslateTransform.X" Value="{Binding $parent[ProgressBar].TemplateSettings.Container2AnimationStartPosition}" />
</KeyFrame>
<KeyFrame KeySpline="0.4,0,0.6,1" KeyTime="0:0:2">
<Setter Property="TranslateTransform.X" Value="{Binding $parent[ProgressBar].TemplateSettings.Container2AnimationEndPosition}" />
</KeyFrame>
</Animation>
</Style.Animations>
</Style>
<Style Selector="^:vertical:indeterminate /template/ Border#IndeterminateProgressBarIndicator">
<Style.Animations>
<Animation IterationCount="Infinite" Duration="0:0:2">
<KeyFrame KeySpline="0.4,0,0.6,1" KeyTime="0:0:0">
<Setter Property="TranslateTransform.Y" Value="{Binding $parent[ProgressBar].TemplateSettings.ContainerAnimationStartPosition}" />
</KeyFrame>
<KeyFrame KeySpline="0.4,0,0.6,1" KeyTime="0:0:1.5">
<Setter Property="TranslateTransform.Y" Value="{Binding $parent[ProgressBar].TemplateSettings.ContainerAnimationEndPosition}" />
</KeyFrame>
<KeyFrame KeySpline="0.4,0,0.6,1" KeyTime="0:0:2">
<Setter Property="TranslateTransform.Y" Value="{Binding $parent[ProgressBar].TemplateSettings.ContainerAnimationEndPosition}" />
</KeyFrame>
</Animation>
</Style.Animations>
</Style>
<Style Selector="^:vertical:indeterminate /template/ Border#IndeterminateProgressBarIndicator2">
<Style.Animations>
<Animation IterationCount="Infinite" Duration="0:0:2">
<KeyFrame KeySpline="0.4,0,0.6,1" KeyTime="0:0:0">
<Setter Property="TranslateTransform.Y" Value="{Binding $parent[ProgressBar].TemplateSettings.Container2AnimationStartPosition}" />
</KeyFrame>
<KeyFrame KeySpline="0.4,0,0.6,1" KeyTime="0:0:0.75">
<Setter Property="TranslateTransform.Y" Value="{Binding $parent[ProgressBar].TemplateSettings.Container2AnimationStartPosition}" />
</KeyFrame>
<KeyFrame KeySpline="0.4,0,0.6,1" KeyTime="0:0:2">
<Setter Property="TranslateTransform.Y" Value="{Binding $parent[ProgressBar].TemplateSettings.Container2AnimationEndPosition}" />
</KeyFrame>
</Animation>
</Style.Animations>
</Style>
<Style Selector="^:horizontal /template/ Border#IndeterminateProgressBarIndicator">
<Setter Property="Width" Value="{Binding $parent[ProgressBar].TemplateSettings.ContainerWidth}" />
</Style>
<Style Selector="^:horizontal /template/ Border#IndeterminateProgressBarIndicator2">
<Setter Property="Width" Value="{Binding $parent[ProgressBar].TemplateSettings.Container2Width}" />
</Style>
<Style Selector="^:vertical /template/ Border#IndeterminateProgressBarIndicator">
<Setter Property="Height" Value="{Binding $parent[ProgressBar].TemplateSettings.ContainerWidth}" />
</Style>
<Style Selector="^:vertical /template/ Border#IndeterminateProgressBarIndicator2">
<Setter Property="Height" Value="{Binding $parent[ProgressBar].TemplateSettings.Container2Width}" />
</Style>
<Style Selector="^.Left">
<Style Selector="^:horizontal /template/ LayoutTransformControl#PART_LayoutTransformControl">
<Setter Property="Grid.Column" Value="0" />
<Setter Property="Grid.Row" Value="1" />
<Setter Property="Margin" Value="4 0" />
</Style>
<Style Selector="^ /template/ Border#IndeterminateProgressBarIndicator">
<Setter Property="Height" Value="{Binding $parent[ProgressBar].TemplateSettings.ContainerWidth}" />
<Style Selector="^:vertical /template/ LayoutTransformControl#PART_LayoutTransformControl">
<Setter Property="Grid.Column" Value="1" />
<Setter Property="Grid.Row" Value="0" />
<Setter Property="Margin" Value="0 4" />
</Style>
<Style Selector="^ /template/ Border#IndeterminateProgressBarIndicator2">
<Setter Property="Height" Value="{Binding $parent[ProgressBar].TemplateSettings.Container2Width}" />
<Style Selector="^:horizontal /template/ Border#ProgressBarRoot">
<Setter Property="MinHeight" Value="4" />
<Setter Property="VerticalAlignment" Value="Center" />
</Style>
<Style Selector="^.Left,^.Top">
<Style Selector="^ /template/ LayoutTransformControl#PART_LayoutTransformControl">
<Setter Property="Grid.Column" Value="1" />
<Setter Property="Grid.Row" Value="0" />
<Setter Property="Margin" Value="0 0 0 16" />
<Setter Property="MinHeight" Value="45" />
</Style>
<Style Selector="^ /template/ Border#ProgressBarRoot">
<Setter Property="MinWidth" Value="4" />
<Setter Property="HorizontalAlignment" Value="Center" />
</Style>
<Style Selector="^:vertical /template/ Border#ProgressBarRoot">
<Setter Property="MinWidth" Value="4" />
<Setter Property="HorizontalAlignment" Value="Center" />
</Style>
<Style Selector="^.Right,^.Bottom">
<Style Selector="^ /template/ LayoutTransformControl#PART_LayoutTransformControl">
<Setter Property="Grid.Column" Value="1" />
<Setter Property="Grid.Row" Value="2" />
<Setter Property="Margin" Value="0 16 0 0" />
<Setter Property="MinHeight" Value="45" />
</Style>
<Style Selector="^ /template/ Border#ProgressBarRoot">
<Setter Property="MinWidth" Value="4" />
<Setter Property="HorizontalAlignment" Value="Center" />
</Style>
<Style Selector="^ /template/ TextBlock#PART_ProgressText">
<Setter Property="Foreground" Value="{DynamicResource ProgressBarOuterTextForeground}" />
</Style>
</Style>
<Style Selector="^:indeterminate">
<Style Selector="^ /template/ Panel#DeterminateRoot">
<Setter Property="Opacity" Value="0" />
<Style Selector="^.Right">
<Style Selector="^:horizontal /template/ LayoutTransformControl#PART_LayoutTransformControl">
<Setter Property="Grid.Column" Value="2" />
<Setter Property="Grid.Row" Value="1" />
<Setter Property="Margin" Value="4 0" />
</Style>
<Style Selector="^ /template/ Panel#IndeterminateRoot">
<Setter Property="Opacity" Value="1" />
<Style Selector="^:vertical /template/ LayoutTransformControl#PART_LayoutTransformControl">
<Setter Property="Grid.Column" Value="1" />
<Setter Property="Grid.Row" Value="2" />
<Setter Property="Margin" Value="0 4" />
</Style>
<Style Selector="^:horizontal /template/ Border#IndeterminateProgressBarIndicator">
<Style.Animations>
<Animation IterationCount="Infinite" Duration="0:0:2">
<KeyFrame KeySpline="0.4,0,0.6,1" KeyTime="0:0:0">
<Setter Property="TranslateTransform.X" Value="{Binding $parent[ProgressBar].TemplateSettings.ContainerAnimationStartPosition}" />
</KeyFrame>
<KeyFrame KeySpline="0.4,0,0.6,1" KeyTime="0:0:1.5">
<Setter Property="TranslateTransform.X" Value="{Binding $parent[ProgressBar].TemplateSettings.ContainerAnimationEndPosition}" />
</KeyFrame>
<KeyFrame KeySpline="0.4,0,0.6,1" KeyTime="0:0:2">
<Setter Property="TranslateTransform.X" Value="{Binding $parent[ProgressBar].TemplateSettings.ContainerAnimationEndPosition}" />
</KeyFrame>
</Animation>
</Style.Animations>
<Style Selector="^:horizontal /template/ Border#ProgressBarRoot">
<Setter Property="MinHeight" Value="4" />
<Setter Property="VerticalAlignment" Value="Center" />
</Style>
<Style Selector="^:horizontal /template/ Border#IndeterminateProgressBarIndicator2">
<Style.Animations>
<Animation IterationCount="Infinite" Duration="0:0:2">
<KeyFrame KeySpline="0.4,0,0.6,1" KeyTime="0:0:0">
<Setter Property="TranslateTransform.X" Value="{Binding $parent[ProgressBar].TemplateSettings.Container2AnimationStartPosition}" />
</KeyFrame>
<KeyFrame KeySpline="0.4,0,0.6,1" KeyTime="0:0:0.75">
<Setter Property="TranslateTransform.X" Value="{Binding $parent[ProgressBar].TemplateSettings.Container2AnimationStartPosition}" />
</KeyFrame>
<KeyFrame KeySpline="0.4,0,0.6,1" KeyTime="0:0:2">
<Setter Property="TranslateTransform.X" Value="{Binding $parent[ProgressBar].TemplateSettings.Container2AnimationEndPosition}" />
</KeyFrame>
</Animation>
</Style.Animations>
<Style Selector="^:vertical /template/ Border#ProgressBarRoot">
<Setter Property="MinWidth" Value="4" />
<Setter Property="HorizontalAlignment" Value="Center" />
</Style>
<Style Selector="^:vertical /template/ Border#IndeterminateProgressBarIndicator">
<Style.Animations>
<Animation IterationCount="Infinite" Duration="0:0:2">
<KeyFrame KeySpline="0.4,0,0.6,1" KeyTime="0:0:0">
<Setter Property="TranslateTransform.Y" Value="{Binding $parent[ProgressBar].TemplateSettings.ContainerAnimationStartPosition}" />
</KeyFrame>
<KeyFrame KeySpline="0.4,0,0.6,1" KeyTime="0:0:1.5">
<Setter Property="TranslateTransform.Y" Value="{Binding $parent[ProgressBar].TemplateSettings.ContainerAnimationEndPosition}" />
</KeyFrame>
<KeyFrame KeySpline="0.4,0,0.6,1" KeyTime="0:0:2">
<Setter Property="TranslateTransform.Y" Value="{Binding $parent[ProgressBar].TemplateSettings.ContainerAnimationEndPosition}" />
</KeyFrame>
</Animation>
</Style.Animations>
</Style>
<Style Selector="^:vertical /template/ Border#IndeterminateProgressBarIndicator2">
<Style.Animations>
<Animation IterationCount="Infinite" Duration="0:0:2">
<KeyFrame KeySpline="0.4,0,0.6,1" KeyTime="0:0:0">
<Setter Property="TranslateTransform.Y" Value="{Binding $parent[ProgressBar].TemplateSettings.Container2AnimationStartPosition}" />
</KeyFrame>
<KeyFrame KeySpline="0.4,0,0.6,1" KeyTime="0:0:0.75">
<Setter Property="TranslateTransform.Y" Value="{Binding $parent[ProgressBar].TemplateSettings.Container2AnimationStartPosition}" />
</KeyFrame>
<KeyFrame KeySpline="0.4,0,0.6,1" KeyTime="0:0:2">
<Setter Property="TranslateTransform.Y" Value="{Binding $parent[ProgressBar].TemplateSettings.Container2AnimationEndPosition}" />
</KeyFrame>
</Animation>
</Style.Animations>
<Style Selector="^ /template/ TextBlock#PART_ProgressText">
<Setter Property="Foreground" Value="{DynamicResource ProgressBarOuterTextForeground}" />
</Style>
</Style>
</ControlTheme>

View File

@@ -1,53 +0,0 @@
<ResourceDictionary
xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<ControlTheme x:Key="{x:Type TitleBar}" TargetType="TitleBar">
<Setter Property="VerticalAlignment" Value="Top" />
<Setter Property="HorizontalAlignment" Value="Stretch" />
<Setter Property="Background" Value="Transparent" />
<Setter Property="Template">
<ControlTemplate>
<Panel HorizontalAlignment="{TemplateBinding HorizontalAlignment}" VerticalAlignment="Stretch">
<Panel
Name="PART_MouseTracker"
Height="1"
VerticalAlignment="Top" />
<Panel Name="PART_Container">
<Border
Name="PART_Background"
Background="{TemplateBinding Background}"
IsHitTestVisible="False"
Win32Properties.NonClientHitTestResult="Caption" />
<CaptionButtons
Name="PART_CaptionButtons"
HorizontalAlignment="Right"
VerticalAlignment="Top"
Foreground="{TemplateBinding Foreground}"
Win32Properties.NonClientHitTestResult="Client" />
</Panel>
</Panel>
</ControlTemplate>
</Setter>
<Style Selector="^:fullscreen /template/ Border#PART_Background">
<Setter Property="IsHitTestVisible" Value="True" />
</Style>
<Style Selector="^:fullscreen /template/ Panel#PART_MouseTracker">
<Setter Property="Background" Value="Transparent" />
</Style>
<Style Selector="^:fullscreen /template/ Panel#PART_Container">
<Setter Property="RenderTransform" Value="translateY(-50px)" />
<Setter Property="Transitions">
<Transitions>
<TransformOperationsTransition Property="RenderTransform" Duration="0:0:0.1" />
</Transitions>
</Setter>
</Style>
<Style Selector="^:fullscreen:pointerover /template/ Panel#PART_Container">
<Setter Property="RenderTransform" Value="none" />
</Style>
</ControlTheme>
</ResourceDictionary>

View File

@@ -15,9 +15,6 @@
<Border Background="{TemplateBinding Background}" IsHitTestVisible="False" />
<Panel Margin="{TemplateBinding WindowDecorationMargin}" Background="Transparent" />
<VisualLayerManager>
<VisualLayerManager.ChromeOverlayLayer>
<TitleBar />
</VisualLayerManager.ChromeOverlayLayer>
<ContentPresenter
Name="PART_ContentPresenter"
Margin="{TemplateBinding Padding}"

View File

@@ -0,0 +1,218 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<ControlTheme x:Key="CaptionButton" TargetType="Button">
<Setter Property="Foreground" Value="{DynamicResource CaptionButtonForeground}" />
<Setter Property="Background" Value="Transparent" />
<Setter Property="CornerRadius" Value="{StaticResource CaptionButtonCornerRadius}" />
<Setter Property="Padding" Value="{StaticResource CaptionButtonPadding}" />
<Setter Property="Width" Value="{StaticResource CaptionButtonWidth}" />
<Setter Property="Height" Value="{StaticResource CaptionButtonHeight}" />
<Setter Property="Cursor" Value="Hand" />
<Setter Property="VerticalAlignment" Value="Stretch" />
<Setter Property="WindowDecorationProperties.ElementRole" Value="DecorationsElement" />
<Setter Property="Template">
<ControlTemplate TargetType="Button">
<ContentPresenter
Name="PART_ContentPresenter"
Padding="{TemplateBinding Padding}"
Foreground="{TemplateBinding Foreground}"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
Content="{TemplateBinding Content}"
ContentTemplate="{TemplateBinding ContentTemplate}"
CornerRadius="{TemplateBinding CornerRadius}" />
</ControlTemplate>
</Setter>
<Style Selector="^:pointerover">
<Setter Property="Background" Value="{DynamicResource CaptionButtonPointeroverBackground}" />
</Style>
<Style Selector="^:pressed">
<Setter Property="Background" Value="{DynamicResource CaptionButtonPressedBackground}" />
</Style>
</ControlTheme>
<ControlTheme x:Key="{x:Type WindowDrawnDecorations}" TargetType="WindowDrawnDecorations">
<Setter Property="DefaultTitleBarHeight" Value="32" />
<Setter Property="DefaultFrameThickness" Value="1" />
<Setter Property="DefaultShadowThickness" Value="8" />
<Setter Property="Template">
<WindowDrawnDecorationsTemplate>
<WindowDrawnDecorationsContent>
<WindowDrawnDecorationsContent.Underlay>
<Panel Name="PART_UnderlayWrapper">
<Border Name="PART_WindowBorder"
Background="{DynamicResource SystemControlBackgroundAltHighBrush}"
BorderThickness="{TemplateBinding FrameThickness}"
BorderBrush="{DynamicResource SystemControlForegroundBaseMediumBrush}"
IsHitTestVisible="False" />
<!-- Titlebar: background, title text, and drag area live in underlay -->
<Panel Name="PART_TitleBar" VerticalAlignment="Top"
Height="{TemplateBinding TitleBarHeight}"
Background="{DynamicResource SystemControlBackgroundAltHighBrush}"
IsVisible="{TemplateBinding HasTitleBar}"
WindowDecorationProperties.ElementRole="TitleBar" />
</Panel>
</WindowDrawnDecorationsContent.Underlay>
<WindowDrawnDecorationsContent.Overlay>
<!-- Overlay: only interactive caption buttons -->
<Panel Name="PART_OverlayWrapper">
<!-- Title text lives in overlay so it renders above client content -->
<Panel Name="PART_TitleTextPanel" VerticalAlignment="Top"
Height="{TemplateBinding TitleBarHeight}"
IsHitTestVisible="False"
IsVisible="{TemplateBinding HasTitleBar}">
<TextBlock Text="{TemplateBinding Title}"
VerticalAlignment="Center"
Margin="12,0,0,0"
FontSize="12" />
</Panel>
<StackPanel Name="PART_OverlayPanel"
VerticalAlignment="Top"
HorizontalAlignment="Right"
Height="{TemplateBinding TitleBarHeight}"
IsVisible="{TemplateBinding HasTitleBar}"
Orientation="Horizontal"
Spacing="2"
TextElement.FontSize="10">
<Button
Name="PART_FullScreenButton"
Theme="{StaticResource CaptionButton}"
WindowDecorationProperties.ElementRole="FullScreenButton">
<PathIcon
Name="PART_FullScreenButtonIcon"
Theme="{StaticResource InnerPathIcon}"
Data="{StaticResource WindowExpandGlyph}"
Foreground="{Binding $parent[Button].Foreground}" />
</Button>
<Button
Name="PART_MinimizeButton"
Theme="{StaticResource CaptionButton}"
WindowDecorationProperties.ElementRole="MinimizeButton">
<PathIcon
Name="PART_MinimizeButtonIcon"
Theme="{StaticResource InnerPathIcon}"
Data="{StaticResource WindowMinimizeGlyph}"
Foreground="{Binding $parent[Button].Foreground}" />
</Button>
<Button
Name="PART_MaximizeButton"
Theme="{StaticResource CaptionButton}"
WindowDecorationProperties.ElementRole="MaximizeButton">
<PathIcon
Name="PART_MaximizeButtonIcon"
Theme="{StaticResource InnerPathIcon}"
Data="{StaticResource WindowMaximizeGlyph}"
Foreground="{Binding $parent[Button].Foreground}" />
</Button>
<Button
Name="PART_CloseButton"
Theme="{StaticResource CaptionButton}"
WindowDecorationProperties.ElementRole="CloseButton">
<PathIcon
Name="PART_CloseButtonIcon"
Theme="{StaticResource InnerPathIcon}"
Data="{StaticResource WindowCloseIconGlyph}"
Foreground="{Binding $parent[Button].Foreground}" />
</Button>
</StackPanel>
</Panel>
</WindowDrawnDecorationsContent.Overlay>
<WindowDrawnDecorationsContent.FullscreenPopover>
<Panel Height="{TemplateBinding DefaultTitleBarHeight}"
VerticalAlignment="Top"
Background="{DynamicResource SystemControlBackgroundChromeMediumLowBrush}"
WindowDecorationProperties.ElementRole="TitleBar">
<TextBlock Text="{TemplateBinding Title}"
VerticalAlignment="Center"
Margin="12,0,0,0"
FontSize="12" />
<StackPanel HorizontalAlignment="Right"
Orientation="Horizontal"
Spacing="2"
TextElement.FontSize="10">
<Button Name="PART_PopoverFullScreenButton"
Theme="{StaticResource CaptionButton}"
WindowDecorationProperties.ElementRole="FullScreenButton">
<PathIcon
Name="PART_PopoverFullScreenButtonIcon"
Theme="{StaticResource InnerPathIcon}"
Data="{StaticResource WindowCollapseGlyph}"
Foreground="{Binding $parent[Button].Foreground}" />
</Button>
<Button Name="PART_PopoverCloseButton"
Theme="{StaticResource CaptionButton}"
WindowDecorationProperties.ElementRole="CloseButton">
<PathIcon
Name="PART_PopoverCloseButtonIcon"
Theme="{StaticResource InnerPathIcon}"
Data="{StaticResource WindowCloseIconGlyph}"
Foreground="{Binding $parent[Button].Foreground}" />
</Button>
</StackPanel>
</Panel>
</WindowDrawnDecorationsContent.FullscreenPopover>
</WindowDrawnDecorationsContent>
</WindowDrawnDecorationsTemplate>
</Setter>
<!-- Shadow: inset border and add drop shadow -->
<Style Selector="^:has-shadow">
<Style Selector="^ /template/ Panel#PART_UnderlayWrapper">
<Setter Property="Margin" Value="{TemplateBinding ShadowThickness}" />
</Style>
<Style Selector="^ /template/ Border#PART_WindowBorder">
<Setter Property="BoxShadow" Value="{DynamicResource WindowBorderShadow}" />
</Style>
<Style Selector="^ /template/ Panel#PART_OverlayWrapper">
<Setter Property="Margin" Value="{TemplateBinding ShadowThickness}" />
</Style>
</Style>
<!-- Border: inset titlebar and buttons inside frame -->
<Style Selector="^:has-border">
<Style Selector="^ /template/ Panel#PART_TitleTextPanel">
<Setter Property="Margin" Value="1,1,1,0" />
</Style>
<Style Selector="^ /template/ Panel#PART_TitleBar">
<Setter Property="Margin" Value="1,1,1,0" />
</Style>
<Style Selector="^ /template/ StackPanel#PART_OverlayPanel">
<Setter Property="Margin" Value="0,1,1,0" />
</Style>
</Style>
<!-- Fullscreen: hide overlay and titlebar (popover takes over) -->
<Style Selector="^:fullscreen">
<Style Selector="^ /template/ Panel#PART_TitleTextPanel">
<Setter Property="IsVisible" Value="False" />
</Style>
<Style Selector="^ /template/ StackPanel#PART_OverlayPanel">
<Setter Property="IsVisible" Value="False" />
</Style>
<Style Selector="^ /template/ Panel#PART_TitleBar">
<Setter Property="IsVisible" Value="False" />
</Style>
<Style Selector="^ /template/ PathIcon#PART_FullScreenButtonIcon">
<Setter Property="Data" Value="{StaticResource WindowCollapseGlyph}" />
</Style>
</Style>
<Style Selector="^:maximized /template/ PathIcon#PART_MaximizeButtonIcon">
<Setter Property="Data" Value="{StaticResource WindowRestoreGlyph}" />
</Style>
<Style Selector="^ /template/ Button:disabled">
<Setter Property="Opacity" Value="0.2" />
</Style>
</ControlTheme>
</ResourceDictionary>

View File

@@ -9,7 +9,6 @@
<ResourceInclude Source="ButtonSpinner.axaml" />
<ResourceInclude Source="Calendar.axaml" />
<ResourceInclude Source="CalendarDatePicker.axaml" />
<ResourceInclude Source="CaptionButtons.axaml" />
<ResourceInclude Source="Carousel.axaml" />
<ResourceInclude Source="CheckBox.axaml" />
<ResourceInclude Source="ComboBox.axaml" />
@@ -51,13 +50,13 @@
<ResourceInclude Source="TextBox.axaml" />
<ResourceInclude Source="ThemeVariantScope.axaml" />
<ResourceInclude Source="TimePicker.axaml" />
<ResourceInclude Source="TitleBar.axaml" />
<ResourceInclude Source="ToggleButton.axaml" />
<ResourceInclude Source="ToggleSwitch.axaml" />
<ResourceInclude Source="Tooltip.axaml" />
<ResourceInclude Source="TransitioningContentControl.axaml" />
<ResourceInclude Source="TreeView.axaml" />
<ResourceInclude Source="Window.axaml" />
<ResourceInclude Source="WindowDrawnDecorations.axaml" />
<ResourceInclude Source="WindowNotificationManager.axaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>

View File

@@ -2,6 +2,7 @@
<StaticResource x:Key="ProgressBarIndicatorBrush" ResourceKey="SemiColorPrimary" />
<StaticResource x:Key="ProgressBarBackground" ResourceKey="SemiColorFill0" />
<StaticResource x:Key="ProgressBarTextForeground" ResourceKey="SemiColorText0" />
<StaticResource x:Key="ProgressBarOuterTextForeground" ResourceKey="SemiColorText0" />
<SolidColorBrush x:Key="ProgressBarRootBorderBrush" Color="Transparent" />
<StaticResource x:Key="ProgressBarPrimaryForeground" ResourceKey="SemiColorPrimary" />
<StaticResource x:Key="ProgressBarSecondaryForeground" ResourceKey="SemiColorSecondary" />

View File

@@ -1,4 +1,6 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<StaticResource x:Key="WindowBorderShadow" ResourceKey="SemiShadowElevated"/>
<StaticResource x:Key="CaptionButtonPointeroverBackground" ResourceKey="SemiColorFill1" />
<StaticResource x:Key="CaptionButtonPressedBackground" ResourceKey="SemiColorFill2" />
<StaticResource x:Key="CaptionButtonCloseForeground" ResourceKey="SemiColorWhite" />

View File

@@ -7,7 +7,6 @@
<ResourceInclude Source="ButtonSpinner.axaml" />
<ResourceInclude Source="Calendar.axaml" />
<ResourceInclude Source="CalendarDatePicker.axaml" />
<ResourceInclude Source="CaptionButtons.axaml" />
<ResourceInclude Source="Carousel.axaml" />
<ResourceInclude Source="CheckBox.axaml" />
<ResourceInclude Source="ComboBox.axaml" />
@@ -43,5 +42,6 @@
<ResourceInclude Source="Tooltip.axaml" />
<ResourceInclude Source="TreeView.axaml" />
<ResourceInclude Source="Window.axaml" />
<ResourceInclude Source="WindowDrawnDecorations.axaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>

View File

@@ -2,6 +2,7 @@
<StaticResource x:Key="ProgressBarIndicatorBrush" ResourceKey="SemiColorHighlight" />
<StaticResource x:Key="ProgressBarBackground" ResourceKey="SemiColorHighlightText" />
<StaticResource x:Key="ProgressBarTextForeground" ResourceKey="SemiColorWindowText" />
<StaticResource x:Key="ProgressBarOuterTextForeground" ResourceKey="SemiColorWindowText" />
<StaticResource x:Key="ProgressBarRootBorderBrush" ResourceKey="SemiColorWindowText" />
<StaticResource x:Key="ProgressBarPrimaryForeground" ResourceKey="SemiColorHighlight" />
</ResourceDictionary>

View File

@@ -7,7 +7,6 @@
<ResourceInclude Source="ButtonSpinner.axaml" />
<ResourceInclude Source="Calendar.axaml" />
<ResourceInclude Source="CalendarDatePicker.axaml" />
<ResourceInclude Source="CaptionButtons.axaml" />
<ResourceInclude Source="Carousel.axaml" />
<ResourceInclude Source="CheckBox.axaml" />
<ResourceInclude Source="ComboBox.axaml" />
@@ -43,5 +42,6 @@
<ResourceInclude Source="Tooltip.axaml" />
<ResourceInclude Source="TreeView.axaml" />
<ResourceInclude Source="Window.axaml" />
<ResourceInclude Source="WindowDrawnDecorations.axaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>

View File

@@ -2,6 +2,7 @@
<StaticResource x:Key="ProgressBarIndicatorBrush" ResourceKey="SemiColorPrimary" />
<StaticResource x:Key="ProgressBarBackground" ResourceKey="SemiColorFill0" />
<StaticResource x:Key="ProgressBarTextForeground" ResourceKey="SemiColorText0" />
<StaticResource x:Key="ProgressBarOuterTextForeground" ResourceKey="SemiColorText0" />
<SolidColorBrush x:Key="ProgressBarRootBorderBrush" Color="Transparent" />
<StaticResource x:Key="ProgressBarPrimaryForeground" ResourceKey="SemiColorPrimary" />
<StaticResource x:Key="ProgressBarSecondaryForeground" ResourceKey="SemiColorSecondary" />

View File

@@ -1,4 +1,6 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<StaticResource x:Key="WindowBorderShadow" ResourceKey="SemiShadowElevated"/>
<StaticResource x:Key="CaptionButtonPointeroverBackground" ResourceKey="SemiColorFill1" />
<StaticResource x:Key="CaptionButtonPressedBackground" ResourceKey="SemiColorFill2" />
<StaticResource x:Key="CaptionButtonCloseForeground" ResourceKey="SemiColorWhite" />

View File

@@ -7,7 +7,6 @@
<ResourceInclude Source="ButtonSpinner.axaml" />
<ResourceInclude Source="Calendar.axaml" />
<ResourceInclude Source="CalendarDatePicker.axaml" />
<ResourceInclude Source="CaptionButtons.axaml" />
<ResourceInclude Source="Carousel.axaml" />
<ResourceInclude Source="CheckBox.axaml" />
<ResourceInclude Source="ComboBox.axaml" />
@@ -43,5 +42,6 @@
<ResourceInclude Source="Tooltip.axaml" />
<ResourceInclude Source="TreeView.axaml" />
<ResourceInclude Source="Window.axaml" />
<ResourceInclude Source="WindowDrawnDecorations.axaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>

View File

@@ -7,7 +7,6 @@
<ResourceInclude Source="ButtonSpinner.axaml" />
<ResourceInclude Source="Calendar.axaml" />
<ResourceInclude Source="CalendarDatePicker.axaml" />
<ResourceInclude Source="CaptionButtons.axaml" />
<ResourceInclude Source="Carousel.axaml" />
<ResourceInclude Source="CheckBox.axaml" />
<ResourceInclude Source="ComboBox.axaml" />
@@ -43,5 +42,6 @@
<ResourceInclude Source="Tooltip.axaml" />
<ResourceInclude Source="TreeView.axaml" />
<ResourceInclude Source="Window.axaml" />
<ResourceInclude Source="WindowDrawnDecorations.axaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>