@@ -18,7 +18,7 @@
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate TargetType="u:CustomDialogControl">
|
||||
<Border
|
||||
Margin="8"
|
||||
Name="PART_Border"
|
||||
Padding="0"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
@@ -45,15 +45,22 @@
|
||||
Grid.Column="1"
|
||||
Margin="0,24,24,0"
|
||||
DockPanel.Dock="Right"
|
||||
Theme="{DynamicResource CloseButton}" />
|
||||
Theme="{DynamicResource OverlayCloseButton}" />
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Border>
|
||||
</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>
|
||||
@@ -192,7 +201,7 @@
|
||||
Grid.Column="2"
|
||||
Margin="0,24,24,0"
|
||||
DockPanel.Dock="Right"
|
||||
Theme="{DynamicResource CloseButton}" />
|
||||
Theme="{DynamicResource OverlayCloseButton}" />
|
||||
</Grid>
|
||||
<StackPanel
|
||||
Grid.Row="2"
|
||||
@@ -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">
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<!-- Add Resources Here -->
|
||||
|
||||
<ControlTheme x:Key="CloseButton" TargetType="Button">
|
||||
<Setter Property="CornerRadius" Value="6" />
|
||||
<Setter Property="Margin" Value="0, 4" />
|
||||
@@ -39,4 +38,34 @@
|
||||
</Style>
|
||||
</ControlTheme>
|
||||
|
||||
<ControlTheme x:Key="OverlayCloseButton" TargetType="Button">
|
||||
<Setter Property="CornerRadius" Value="6" />
|
||||
<Setter Property="Margin" Value="0, 4" />
|
||||
<Setter Property="Padding" Value="4" />
|
||||
<Setter Property="Height" Value="28" />
|
||||
<Setter Property="Width" Value="28" />
|
||||
<Setter Property="Cursor" Value="Hand" />
|
||||
<Setter Property="VerticalAlignment" Value="Stretch" />
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate TargetType="Button">
|
||||
<Border
|
||||
Name="PART_Border"
|
||||
Padding="{TemplateBinding Padding}"
|
||||
Background="Transparent"
|
||||
CornerRadius="{TemplateBinding CornerRadius}">
|
||||
<PathIcon
|
||||
Width="12"
|
||||
Height="12"
|
||||
Data="{DynamicResource WindowCloseIconGlyph}"/>
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
<Style Selector="^:pointerover /template/ Border">
|
||||
<Setter Property="Background" Value="{DynamicResource ButtonDefaultPointeroverBackground}" />
|
||||
</Style>
|
||||
<Style Selector="^:pressed /template/ Border">
|
||||
<Setter Property="Background" Value="{DynamicResource ButtonDefaultPressedBackground}" />
|
||||
</Style>
|
||||
</ControlTheme>
|
||||
|
||||
</ResourceDictionary>
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
Grid.Column="1"
|
||||
Margin="0,24,24,0"
|
||||
DockPanel.Dock="Right"
|
||||
Theme="{DynamicResource CloseButton}" />
|
||||
Theme="{DynamicResource OverlayCloseButton}" />
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Border>
|
||||
@@ -107,7 +107,7 @@
|
||||
Grid.Column="1"
|
||||
Margin="0,24,24,0"
|
||||
DockPanel.Dock="Right"
|
||||
Theme="{DynamicResource CloseButton}" />
|
||||
Theme="{DynamicResource OverlayCloseButton}" />
|
||||
</Grid>
|
||||
<StackPanel
|
||||
Grid.Row="2"
|
||||
|
||||
@@ -150,6 +150,7 @@
|
||||
<ControlTheme x:Key="{x:Type u:MessageBoxControl}" TargetType="u:MessageBoxControl">
|
||||
<Setter Property="CornerRadius" Value="12" />
|
||||
<Setter Property="Padding" Value="48 24" />
|
||||
<Setter Property="u:DialogControlBase.CanDragMove" Value="True"></Setter>
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate TargetType="u:MessageBoxControl">
|
||||
<Border
|
||||
@@ -192,7 +193,7 @@
|
||||
Name="{x:Static u:MessageBoxWindow.PART_CloseButton}"
|
||||
Grid.Column="2"
|
||||
Margin="0,24,24,0"
|
||||
Theme="{DynamicResource CloseButton}" />
|
||||
Theme="{DynamicResource OverlayCloseButton}" />
|
||||
</Grid>
|
||||
<Grid
|
||||
Grid.Row="1"
|
||||
|
||||
Reference in New Issue
Block a user