feat: support full screen.

This commit is contained in:
rabbitism
2024-03-27 18:29:54 +08:00
parent ac43911000
commit 13e5629b21
7 changed files with 74 additions and 12 deletions

View File

@@ -18,7 +18,7 @@
<Setter Property="Template">
<ControlTemplate TargetType="u:CustomDialogControl">
<Border
Margin="8"
Name="PART_Border"
Padding="0"
HorizontalAlignment="Center"
VerticalAlignment="Center"
@@ -52,8 +52,15 @@
</Border>
</ControlTemplate>
</Setter>
<Style Selector="^[IsClosed=True]">
<Setter Property="RenderTransform" Value="scale(0.95)"/>
<Style Selector="^:full-screen">
<Setter Property="CornerRadius" Value="0"/>
<Style Selector="^ /template/ Border#PART_Border">
<Setter Property="HorizontalAlignment" Value="Stretch"/>
<Setter Property="VerticalAlignment" Value="Stretch"/>
<Setter Property="Theme" Value="{x:Null}"/>
<Setter Property="Margin" Value="0"/>
<Setter Property="Background" Value="{DynamicResource BorderCardBackground}"></Setter>
</Style>
</Style>
<Style Selector="^ /template/ Panel#PART_TitleArea">
<Setter Property="ContextFlyout">
@@ -143,10 +150,10 @@
<Setter Property="Template">
<ControlTemplate TargetType="u:DefaultDialogControl">
<Border
Margin="10"
Name="PART_Border"
Padding="0"
HorizontalAlignment="Center"
VerticalAlignment="Center"
HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
VerticalAlignment="{TemplateBinding VerticalAlignment}"
BoxShadow="0 0 8 0 #1A000000"
Classes="Shadow"
ClipToBounds="False"
@@ -159,6 +166,8 @@
<ContentPresenter
Name="PART_ContentPresenter"
Grid.Row="1"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Margin="24,8"
Content="{TemplateBinding Content}" />
</ScrollViewer>
@@ -228,8 +237,15 @@
</Border>
</ControlTemplate>
</Setter>
<Style Selector="^[IsClosed=True]">
<Setter Property="RenderTransform" Value="scale(0.95)"/>
<Style Selector="^:full-screen">
<Setter Property="CornerRadius" Value="0"/>
</Style>
<Style Selector="^:full-screen /template/ Border#PART_Border">
<Setter Property="HorizontalAlignment" Value="Stretch"/>
<Setter Property="VerticalAlignment" Value="Stretch"/>
<Setter Property="Theme" Value="{x:Null}"/>
<Setter Property="Margin" Value="0"></Setter>
<Setter Property="Background" Value="{DynamicResource BorderCardBackground}"></Setter>
</Style>
<Style Selector="^[Mode=None]">
<Style Selector="^ /template/ PathIcon#PART_Icon">