feat: update demo.

This commit is contained in:
rabbitism
2024-01-25 17:35:52 +08:00
parent b327a7c8ac
commit af02b46adc
7 changed files with 200 additions and 73 deletions

View File

@@ -129,6 +129,7 @@
VerticalAlignment="Center"
Height="16" />
<TextBlock
Name="PART_Title"
Grid.Column="1"
Margin="0 24 0 0 "
FontWeight="Bold"
@@ -183,6 +184,9 @@
<Style Selector="^ /template/ PathIcon#PART_Icon">
<Setter Property="IsVisible" Value="False"></Setter>
</Style>
<Style Selector="^ /template/ TextBlock#PART_Title">
<Setter Property="Margin" Value="24 24 0 0"></Setter>
</Style>
<Style Selector="^ /template/ Button#PART_OKButton">
<Setter Property="theme:ClassHelper.Classes" Value="Primary"></Setter>
</Style>
@@ -386,7 +390,7 @@
<Grid Grid.Row="0" ColumnDefinitions="*, Auto">
<TextBlock
Grid.Column="0"
Margin="8,8,0,0"
Margin="24, 24,0,0"
FontSize="14"
FontWeight="Bold"
Text="{TemplateBinding Title}"
@@ -429,7 +433,7 @@
</Setter>
<Setter Property="CanResize" Value="False" />
<Setter Property="Template">
<ControlTemplate TargetType="u:DialogWindow">
<ControlTemplate TargetType="u:DefaultDialogWindow">
<Panel>
<Border Name="PART_TransparencyFallback" IsHitTestVisible="False" />
<Border Background="{TemplateBinding Background}" IsHitTestVisible="False" />
@@ -455,6 +459,7 @@
VerticalAlignment="Center"
Height="16" />
<TextBlock
Name="PART_Title"
Grid.Column="1"
Margin="0 24 0 0 "
FontWeight="Bold"
@@ -505,10 +510,13 @@
</Panel>
</ControlTemplate>
</Setter>
<Style Selector="^[Mode=None]">
<Style Selector="^[Mode=None]">
<Style Selector="^ /template/ PathIcon#PART_Icon">
<Setter Property="IsVisible" Value="False"></Setter>
</Style>
<Style Selector="^ /template/ TextBlock#PART_Title">
<Setter Property="Margin" Value="24 24 0 0"></Setter>
</Style>
<Style Selector="^ /template/ Button#PART_OKButton">
<Setter Property="theme:ClassHelper.Classes" Value="Primary"></Setter>
</Style>

View File

@@ -41,6 +41,7 @@
Grid.Column="0"
Width="24"
Height="24"
Margin="0 0 8 0"
IsHitTestVisible="False"
VerticalAlignment="Center" />
<TextBlock
@@ -48,6 +49,7 @@
FontSize="16"
FontWeight="Bold"
IsHitTestVisible="False"
VerticalAlignment="Center"
Text="{TemplateBinding Title}"
TextTrimming="CharacterEllipsis"
TextWrapping="NoWrap" />