2024-11-07 17:56:29 +08:00

53 lines
2.2 KiB
XML

<ResourceDictionary
xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:CompileBindings="True">
<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" />
<CaptionButtons
Name="PART_CaptionButtons"
HorizontalAlignment="Right"
VerticalAlignment="Top"
Foreground="{TemplateBinding Foreground}" />
</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>