2025-02-10 20:53:40 +08:00
|
|
|
<ResourceDictionary
|
|
|
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
|
|
|
xmlns:local="clr-namespace:WPFluent.Controls"
|
|
|
|
|
xmlns:primitives="clr-namespace:WPFluent.Controls.Primitives"
|
|
|
|
|
xmlns:sys="clr-namespace:System;assembly=mscorlib"
|
2025-07-11 09:20:23 +08:00
|
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
2025-02-10 20:53:40 +08:00
|
|
|
|
|
|
|
|
<sys:Double x:Key="ContentDialogMinWidth">320</sys:Double>
|
|
|
|
|
<sys:Double x:Key="ContentDialogMaxWidth">548</sys:Double>
|
|
|
|
|
<sys:Double x:Key="ContentDialogMinHeight">184</sys:Double>
|
|
|
|
|
<sys:Double x:Key="ContentDialogMaxHeight">756</sys:Double>
|
|
|
|
|
<sys:Double x:Key="ContentDialogButtonMinWidth">130</sys:Double>
|
|
|
|
|
<sys:Double x:Key="ContentDialogButtonMaxWidth">202</sys:Double>
|
|
|
|
|
<sys:Double x:Key="ContentDialogButtonMinHeight">32</sys:Double>
|
|
|
|
|
<sys:Double x:Key="ContentDialogButtonHeight">32</sys:Double>
|
|
|
|
|
<sys:Double x:Key="ContentDialogTitleMaxHeight">56</sys:Double>
|
|
|
|
|
<Thickness x:Key="ContentDialogBorderWidth">0</Thickness>
|
|
|
|
|
<Thickness x:Key="ContentDialogButton1HostMargin">0,0,4,0</Thickness>
|
|
|
|
|
<Thickness x:Key="ContentDialogButton2HostMargin">0,0,0,0</Thickness>
|
|
|
|
|
<Thickness x:Key="ContentDialogContentMargin">0,0,0,0</Thickness>
|
|
|
|
|
<Thickness x:Key="ContentDialogContentScrollViewerMargin">0,0,0,0</Thickness>
|
|
|
|
|
<Thickness x:Key="ContentDialogCommandSpaceMargin">0,24,0,0</Thickness>
|
|
|
|
|
<Thickness x:Key="ContentDialogTitleMargin">0,0,0,24</Thickness>
|
|
|
|
|
<Thickness x:Key="ContentDialogPadding">24</Thickness>
|
|
|
|
|
<GridLength x:Key="ContentDialogButtonSpacing">8</GridLength>
|
2025-07-11 09:20:23 +08:00
|
|
|
<SolidColorBrush Color="Transparent" x:Key="LayerFillColorAltBrush" />
|
2025-02-10 20:53:40 +08:00
|
|
|
<FontFamily x:Key="SymbolThemeFontFamily">pack://application:,,,/WPFluent;component/Resources/Fonts/Segoe Fluent Icons.ttf#Segoe Fluent Icons</FontFamily>
|
|
|
|
|
|
|
|
|
|
<WindowChrome
|
|
|
|
|
GlassFrameThickness="-1"
|
|
|
|
|
NonClientFrameEdges="None"
|
|
|
|
|
ResizeBorderThickness="0"
|
2025-07-11 09:20:23 +08:00
|
|
|
UseAeroCaptionButtons="True"
|
|
|
|
|
x:Key="MessageBoxAeroWindowChrome"
|
|
|
|
|
x:Shared="False" />
|
2025-02-10 20:53:40 +08:00
|
|
|
|
|
|
|
|
<Style TargetType="{x:Type local:MessageBoxDialog}">
|
2025-07-11 09:20:23 +08:00
|
|
|
<Setter Property="Foreground" Value="{DynamicResource TextFillColorPrimaryBrush}" />
|
|
|
|
|
<Setter Property="Background" Value="{DynamicResource SolidBackgroundFillColorBaseBrush}" />
|
2025-02-10 20:53:40 +08:00
|
|
|
<Setter Property="BorderThickness" Value="{DynamicResource ContentDialogBorderWidth}" />
|
2025-07-11 09:20:23 +08:00
|
|
|
<Setter Property="BorderBrush" Value="{DynamicResource SurfaceStrokeColorDefaultBrush}" />
|
2025-02-10 20:53:40 +08:00
|
|
|
<Setter Property="IsTabStop" Value="False" />
|
|
|
|
|
<Setter Property="CornerRadius" Value="{DynamicResource OverlayCornerRadius}" />
|
|
|
|
|
<Setter Property="OKButtonStyle" Value="{DynamicResource DefaultButtonStyle}" />
|
|
|
|
|
<Setter Property="YesButtonStyle" Value="{DynamicResource DefaultButtonStyle}" />
|
|
|
|
|
<Setter Property="NoButtonStyle" Value="{DynamicResource DefaultButtonStyle}" />
|
|
|
|
|
<Setter Property="CancelButtonStyle" Value="{DynamicResource DefaultButtonStyle}" />
|
|
|
|
|
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled" />
|
|
|
|
|
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Disabled" />
|
|
|
|
|
<Setter Property="FontFamily" Value="{DynamicResource TextThemeFontFamily}" />
|
|
|
|
|
<Setter Property="FontSize" Value="{DynamicResource ControlContentThemeFontSize}" />
|
|
|
|
|
<Setter Property="UseLayoutRounding" Value="True" />
|
|
|
|
|
<Setter Property="WindowChrome.WindowChrome" Value="{StaticResource MessageBoxAeroWindowChrome}" />
|
|
|
|
|
<Setter Property="SizeToContent" Value="WidthAndHeight" />
|
|
|
|
|
<Setter Property="ResizeMode" Value="NoResize" />
|
|
|
|
|
<Setter Property="Template">
|
|
|
|
|
<Setter.Value>
|
|
|
|
|
<ControlTemplate TargetType="{x:Type local:MessageBoxDialog}">
|
|
|
|
|
<Border x:Name="Container">
|
2025-07-11 09:20:23 +08:00
|
|
|
<Grid SnapsToDevicePixels="True" x:Name="LayoutRoot">
|
2025-02-10 20:53:40 +08:00
|
|
|
<Grid
|
2025-07-11 09:20:23 +08:00
|
|
|
FlowDirection="{TemplateBinding FlowDirection}"
|
2025-02-10 20:53:40 +08:00
|
|
|
HorizontalAlignment="Center"
|
2025-07-11 09:20:23 +08:00
|
|
|
MaxHeight="{StaticResource ContentDialogMaxHeight}"
|
|
|
|
|
MaxWidth="{StaticResource ContentDialogMaxWidth}"
|
|
|
|
|
MinHeight="{StaticResource ContentDialogMinHeight}"
|
|
|
|
|
MinWidth="{StaticResource ContentDialogMinWidth}"
|
|
|
|
|
RenderTransformOrigin="0.5,0.5"
|
2025-02-10 20:53:40 +08:00
|
|
|
VerticalAlignment="Center"
|
2025-07-11 09:20:23 +08:00
|
|
|
x:Name="BackgroundElement">
|
2025-02-10 20:53:40 +08:00
|
|
|
<Grid.RenderTransform>
|
|
|
|
|
<ScaleTransform x:Name="ScaleTransform" />
|
|
|
|
|
</Grid.RenderTransform>
|
|
|
|
|
<Border
|
|
|
|
|
Background="{TemplateBinding Background}"
|
|
|
|
|
CornerRadius="{TemplateBinding CornerRadius}"
|
2025-07-11 09:20:23 +08:00
|
|
|
Opacity="0"
|
|
|
|
|
x:Name="BackgroundBorder" />
|
2025-02-10 20:53:40 +08:00
|
|
|
<Border
|
|
|
|
|
Background="{TemplateBinding Background}"
|
|
|
|
|
BorderBrush="{TemplateBinding BorderBrush}"
|
|
|
|
|
BorderThickness="{TemplateBinding BorderThickness}"
|
|
|
|
|
ClipToBounds="True"
|
|
|
|
|
CornerRadius="{TemplateBinding CornerRadius}">
|
|
|
|
|
<Border x:Name="DialogSpace">
|
|
|
|
|
<Grid>
|
|
|
|
|
<Grid.RowDefinitions>
|
|
|
|
|
<RowDefinition Height="*" />
|
|
|
|
|
<RowDefinition Height="Auto" />
|
|
|
|
|
</Grid.RowDefinitions>
|
|
|
|
|
<ScrollViewer
|
|
|
|
|
HorizontalScrollBarVisibility="Disabled"
|
|
|
|
|
IsTabStop="False"
|
2025-07-11 09:20:23 +08:00
|
|
|
VerticalScrollBarVisibility="Disabled"
|
|
|
|
|
x:Name="ContentScrollViewer">
|
|
|
|
|
<Border Background="{DynamicResource LayerFillColorAltBrush}" Padding="{StaticResource ContentDialogPadding}">
|
2025-02-10 20:53:40 +08:00
|
|
|
<Grid>
|
|
|
|
|
<Grid.RowDefinitions>
|
|
|
|
|
<RowDefinition Height="Auto" />
|
|
|
|
|
<RowDefinition Height="*" />
|
|
|
|
|
</Grid.RowDefinitions>
|
|
|
|
|
<ContentControl
|
|
|
|
|
Content="{TemplateBinding Caption}"
|
|
|
|
|
ContentTemplate="{TemplateBinding CaptionTemplate}"
|
|
|
|
|
FontFamily="{DynamicResource TextThemeFontFamily}"
|
|
|
|
|
FontSize="20"
|
|
|
|
|
FontWeight="SemiBold"
|
|
|
|
|
Foreground="{TemplateBinding Foreground}"
|
2025-07-11 09:20:23 +08:00
|
|
|
HorizontalAlignment="Left"
|
2025-02-10 20:53:40 +08:00
|
|
|
IsTabStop="False"
|
2025-07-11 09:20:23 +08:00
|
|
|
Margin="{StaticResource ContentDialogTitleMargin}"
|
|
|
|
|
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
|
|
|
|
|
VerticalAlignment="Top"
|
|
|
|
|
x:Name="Title">
|
2025-02-10 20:53:40 +08:00
|
|
|
<ContentControl.Template>
|
|
|
|
|
<ControlTemplate TargetType="ContentControl">
|
|
|
|
|
<ContentPresenter
|
|
|
|
|
Content="{TemplateBinding Content}"
|
2025-07-11 09:20:23 +08:00
|
|
|
ContentTemplate="{TemplateBinding ContentTemplate}"
|
|
|
|
|
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
|
|
|
|
Margin="{TemplateBinding Padding}"
|
|
|
|
|
VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
|
2025-02-10 20:53:40 +08:00
|
|
|
</ControlTemplate>
|
|
|
|
|
</ContentControl.Template>
|
|
|
|
|
</ContentControl>
|
2025-07-11 09:20:23 +08:00
|
|
|
<Grid Grid.Row="1" x:Name="MessagePanel">
|
2025-02-10 20:53:40 +08:00
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
|
<ColumnDefinition Width="Auto" />
|
|
|
|
|
<ColumnDefinition Width="*" />
|
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
<Grid Grid.Column="0">
|
|
|
|
|
<!-- UserIconBox is not supported nowadays -->
|
|
|
|
|
<ContentControl
|
|
|
|
|
Content="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.IconElement}"
|
|
|
|
|
IsTabStop="False"
|
2025-07-11 09:20:23 +08:00
|
|
|
Margin="0,0,16,0"
|
|
|
|
|
VerticalAlignment="Center"
|
|
|
|
|
Visibility="Collapsed"
|
|
|
|
|
x:Name="UserIconBox" />
|
2025-02-10 20:53:40 +08:00
|
|
|
<TextBlock
|
|
|
|
|
FontFamily="{DynamicResource SymbolThemeFontFamily}"
|
|
|
|
|
FontSize="36"
|
|
|
|
|
Foreground="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=MessageBoxIcon, Converter={x:Static local:MessageBoxIconForegroundConverter.New}}"
|
2025-07-11 09:20:23 +08:00
|
|
|
Height="36"
|
|
|
|
|
HorizontalAlignment="Center"
|
|
|
|
|
Margin="4,0,16,0"
|
|
|
|
|
Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=MessageBoxIcon, Converter={x:Static local:MessageBoxIconConverter.New}}"
|
|
|
|
|
VerticalAlignment="Top"
|
|
|
|
|
Width="36"
|
|
|
|
|
x:Name="UserIconBlock" />
|
2025-02-10 20:53:40 +08:00
|
|
|
</Grid>
|
|
|
|
|
<Grid Grid.Column="1" VerticalAlignment="Center">
|
|
|
|
|
<Grid.Resources>
|
|
|
|
|
<DataTemplate x:Key="StringTemplate">
|
|
|
|
|
<ScrollViewer Padding="0,0,12,0">
|
|
|
|
|
<TextBlock Text="{Binding}" TextWrapping="Wrap" />
|
|
|
|
|
</ScrollViewer>
|
|
|
|
|
</DataTemplate>
|
|
|
|
|
<DataTemplate x:Key="DefaultTemplate">
|
|
|
|
|
<ContentPresenter Content="{Binding}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
|
|
|
|
|
</DataTemplate>
|
|
|
|
|
<local:MessageBoxContentTemplateSelector
|
|
|
|
|
DefaultTemplate="{StaticResource DefaultTemplate}"
|
2025-07-11 09:20:23 +08:00
|
|
|
StringTemplate="{StaticResource StringTemplate}"
|
|
|
|
|
x:Key="TemplateSelector" />
|
2025-02-10 20:53:40 +08:00
|
|
|
</Grid.Resources>
|
|
|
|
|
<ContentPresenter ContentTemplateSelector="{StaticResource TemplateSelector}" />
|
|
|
|
|
</Grid>
|
|
|
|
|
</Grid>
|
|
|
|
|
</Grid>
|
|
|
|
|
</Border>
|
|
|
|
|
</ScrollViewer>
|
|
|
|
|
<Grid
|
|
|
|
|
Grid.Row="1"
|
|
|
|
|
HorizontalAlignment="Stretch"
|
2025-07-11 09:20:23 +08:00
|
|
|
KeyboardNavigation.DirectionalNavigation="Contained"
|
|
|
|
|
Margin="{StaticResource ContentDialogPadding}"
|
2025-02-10 20:53:40 +08:00
|
|
|
VerticalAlignment="Bottom"
|
2025-07-11 09:20:23 +08:00
|
|
|
x:Name="CommandSpace">
|
2025-02-10 20:53:40 +08:00
|
|
|
<Grid.ColumnDefinitions>
|
2025-07-11 09:20:23 +08:00
|
|
|
<ColumnDefinition Width="*" x:Name="PrimaryColumn" />
|
|
|
|
|
<ColumnDefinition Width="{StaticResource ContentDialogButtonSpacing}" x:Name="FirstSpacer" />
|
|
|
|
|
<ColumnDefinition Width="*" x:Name="SecondaryColumn" />
|
|
|
|
|
<ColumnDefinition Width="{StaticResource ContentDialogButtonSpacing}" x:Name="SecondSpacer" />
|
|
|
|
|
<ColumnDefinition Width="*" x:Name="CloseColumn" />
|
2025-02-10 20:53:40 +08:00
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
<Button
|
|
|
|
|
Content="{Binding TemplateSettings.OKButtonText, RelativeSource={RelativeSource Mode=TemplatedParent}}"
|
|
|
|
|
FontFamily="{DynamicResource TextThemeFontFamily}"
|
|
|
|
|
Grid.Column="0"
|
|
|
|
|
HorizontalAlignment="Stretch"
|
2025-07-11 09:20:23 +08:00
|
|
|
Style="{TemplateBinding OKButtonStyle}"
|
|
|
|
|
x:Name="PART_OKButton" />
|
|
|
|
|
<Button
|
2025-02-10 20:53:40 +08:00
|
|
|
Content="{Binding TemplateSettings.YesButtonText, RelativeSource={RelativeSource Mode=TemplatedParent}}"
|
|
|
|
|
FontFamily="{DynamicResource TextThemeFontFamily}"
|
2025-07-11 09:20:23 +08:00
|
|
|
Grid.Column="0"
|
2025-02-10 20:53:40 +08:00
|
|
|
HorizontalAlignment="Stretch"
|
2025-07-11 09:20:23 +08:00
|
|
|
Style="{TemplateBinding YesButtonStyle}"
|
|
|
|
|
x:Name="PART_YesButton" />
|
|
|
|
|
<Button
|
2025-02-10 20:53:40 +08:00
|
|
|
Content="{Binding TemplateSettings.NoButtonText, RelativeSource={RelativeSource Mode=TemplatedParent}}"
|
|
|
|
|
FontFamily="{DynamicResource TextThemeFontFamily}"
|
2025-07-11 09:20:23 +08:00
|
|
|
Grid.Column="2"
|
2025-02-10 20:53:40 +08:00
|
|
|
HorizontalAlignment="Stretch"
|
2025-07-11 09:20:23 +08:00
|
|
|
Style="{TemplateBinding NoButtonStyle}"
|
|
|
|
|
x:Name="PART_NoButton" />
|
|
|
|
|
<Button
|
2025-02-10 20:53:40 +08:00
|
|
|
Content="{Binding TemplateSettings.CancelButtonText, RelativeSource={RelativeSource Mode=TemplatedParent}}"
|
|
|
|
|
FontFamily="{DynamicResource TextThemeFontFamily}"
|
2025-07-11 09:20:23 +08:00
|
|
|
Grid.Column="4"
|
|
|
|
|
HorizontalAlignment="Stretch"
|
|
|
|
|
Style="{TemplateBinding CancelButtonStyle}"
|
|
|
|
|
x:Name="PART_CancelButton" />
|
2025-02-10 20:53:40 +08:00
|
|
|
</Grid>
|
|
|
|
|
</Grid>
|
|
|
|
|
</Border>
|
|
|
|
|
</Border>
|
|
|
|
|
</Grid>
|
|
|
|
|
</Grid>
|
|
|
|
|
<VisualStateManager.VisualStateGroups>
|
|
|
|
|
<VisualStateGroup x:Name="ButtonsVisibilityStates">
|
|
|
|
|
<VisualState x:Name="YesNoCancelVisible">
|
|
|
|
|
<Storyboard>
|
|
|
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_OKButton" Storyboard.TargetProperty="Visibility">
|
|
|
|
|
<DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{x:Static Visibility.Collapsed}" />
|
|
|
|
|
</ObjectAnimationUsingKeyFrames>
|
|
|
|
|
</Storyboard>
|
|
|
|
|
</VisualState>
|
|
|
|
|
<VisualState x:Name="OKVisible">
|
|
|
|
|
<Storyboard>
|
|
|
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="FirstSpacer" Storyboard.TargetProperty="Width">
|
|
|
|
|
<DiscreteObjectKeyFrame KeyTime="0:0:0">
|
|
|
|
|
<DiscreteObjectKeyFrame.Value>
|
|
|
|
|
<GridLength>0</GridLength>
|
|
|
|
|
</DiscreteObjectKeyFrame.Value>
|
|
|
|
|
</DiscreteObjectKeyFrame>
|
|
|
|
|
</ObjectAnimationUsingKeyFrames>
|
|
|
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="SecondSpacer" Storyboard.TargetProperty="Width">
|
|
|
|
|
<DiscreteObjectKeyFrame KeyTime="0:0:0">
|
|
|
|
|
<DiscreteObjectKeyFrame.Value>
|
|
|
|
|
<GridLength>0</GridLength>
|
|
|
|
|
</DiscreteObjectKeyFrame.Value>
|
|
|
|
|
</DiscreteObjectKeyFrame>
|
|
|
|
|
</ObjectAnimationUsingKeyFrames>
|
|
|
|
|
<Int32AnimationUsingKeyFrames Storyboard.TargetName="PART_OKButton" Storyboard.TargetProperty="(Grid.Column)">
|
|
|
|
|
<DiscreteInt32KeyFrame KeyTime="0:0:0" Value="4" />
|
|
|
|
|
</Int32AnimationUsingKeyFrames>
|
|
|
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_YesButton" Storyboard.TargetProperty="Visibility">
|
|
|
|
|
<DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{x:Static Visibility.Collapsed}" />
|
|
|
|
|
</ObjectAnimationUsingKeyFrames>
|
|
|
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_NoButton" Storyboard.TargetProperty="Visibility">
|
|
|
|
|
<DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{x:Static Visibility.Collapsed}" />
|
|
|
|
|
</ObjectAnimationUsingKeyFrames>
|
|
|
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_CancelButton" Storyboard.TargetProperty="Visibility">
|
|
|
|
|
<DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{x:Static Visibility.Collapsed}" />
|
|
|
|
|
</ObjectAnimationUsingKeyFrames>
|
|
|
|
|
</Storyboard>
|
|
|
|
|
</VisualState>
|
|
|
|
|
<VisualState x:Name="OKCancelVisible">
|
|
|
|
|
<Storyboard>
|
|
|
|
|
<Int32AnimationUsingKeyFrames Storyboard.TargetName="PART_OKButton" Storyboard.TargetProperty="(Grid.Column)">
|
|
|
|
|
<DiscreteInt32KeyFrame KeyTime="0:0:0" Value="2" />
|
|
|
|
|
</Int32AnimationUsingKeyFrames>
|
|
|
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_YesButton" Storyboard.TargetProperty="Visibility">
|
|
|
|
|
<DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{x:Static Visibility.Collapsed}" />
|
|
|
|
|
</ObjectAnimationUsingKeyFrames>
|
|
|
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_NoButton" Storyboard.TargetProperty="Visibility">
|
|
|
|
|
<DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{x:Static Visibility.Collapsed}" />
|
|
|
|
|
</ObjectAnimationUsingKeyFrames>
|
|
|
|
|
</Storyboard>
|
|
|
|
|
</VisualState>
|
|
|
|
|
<VisualState x:Name="YesNoVisible">
|
|
|
|
|
<Storyboard>
|
|
|
|
|
<Int32AnimationUsingKeyFrames Storyboard.TargetName="PART_YesButton" Storyboard.TargetProperty="(Grid.Column)">
|
|
|
|
|
<DiscreteInt32KeyFrame KeyTime="0:0:0" Value="2" />
|
|
|
|
|
</Int32AnimationUsingKeyFrames>
|
|
|
|
|
<Int32AnimationUsingKeyFrames Storyboard.TargetName="PART_NoButton" Storyboard.TargetProperty="(Grid.Column)">
|
|
|
|
|
<DiscreteInt32KeyFrame KeyTime="0:0:0" Value="4" />
|
|
|
|
|
</Int32AnimationUsingKeyFrames>
|
|
|
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_OKButton" Storyboard.TargetProperty="Visibility">
|
|
|
|
|
<DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{x:Static Visibility.Collapsed}" />
|
|
|
|
|
</ObjectAnimationUsingKeyFrames>
|
|
|
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_CancelButton" Storyboard.TargetProperty="Visibility">
|
|
|
|
|
<DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{x:Static Visibility.Collapsed}" />
|
|
|
|
|
</ObjectAnimationUsingKeyFrames>
|
|
|
|
|
</Storyboard>
|
|
|
|
|
</VisualState>
|
|
|
|
|
</VisualStateGroup>
|
|
|
|
|
<VisualStateGroup x:Name="DefaultButtonStates">
|
|
|
|
|
<primitives:VisualStateGroupListener.Listener>
|
|
|
|
|
<primitives:VisualStateGroupListener x:Name="DefaultButtonStatesListener" />
|
|
|
|
|
</primitives:VisualStateGroupListener.Listener>
|
|
|
|
|
<VisualState x:Name="OKAsDefaultButton" />
|
|
|
|
|
<VisualState x:Name="YesAsDefaultButton" />
|
|
|
|
|
</VisualStateGroup>
|
|
|
|
|
<VisualStateGroup x:Name="TitleVisibleStates">
|
|
|
|
|
<VisualState x:Name="TitleVisible">
|
|
|
|
|
<Storyboard>
|
|
|
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="Title" Storyboard.TargetProperty="Visibility">
|
|
|
|
|
<DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{x:Static Visibility.Visible}" />
|
|
|
|
|
</ObjectAnimationUsingKeyFrames>
|
|
|
|
|
</Storyboard>
|
|
|
|
|
</VisualState>
|
|
|
|
|
<VisualState x:Name="TitleCollapsed">
|
|
|
|
|
<Storyboard>
|
|
|
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="MessagePanel" Storyboard.TargetProperty="VerticalAlignment">
|
|
|
|
|
<DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{x:Static VerticalAlignment.Center}" />
|
|
|
|
|
</ObjectAnimationUsingKeyFrames>
|
|
|
|
|
</Storyboard>
|
|
|
|
|
</VisualState>
|
|
|
|
|
</VisualStateGroup>
|
|
|
|
|
<VisualStateGroup x:Name="IconVisibleStates">
|
|
|
|
|
<VisualState x:Name="IconVisible">
|
|
|
|
|
<Storyboard>
|
|
|
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="UserIconBlock" Storyboard.TargetProperty="Visibility">
|
|
|
|
|
<DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{x:Static Visibility.Visible}" />
|
|
|
|
|
</ObjectAnimationUsingKeyFrames>
|
|
|
|
|
</Storyboard>
|
|
|
|
|
</VisualState>
|
|
|
|
|
<VisualState x:Name="IconCollapsed" />
|
|
|
|
|
</VisualStateGroup>
|
|
|
|
|
</VisualStateManager.VisualStateGroups>
|
|
|
|
|
</Border>
|
|
|
|
|
<ControlTemplate.Triggers>
|
|
|
|
|
<Trigger Property="WindowStyle" Value="None">
|
2025-07-11 09:20:23 +08:00
|
|
|
<Setter Property="Opacity" TargetName="BackgroundBorder" Value="0" />
|
2025-02-10 20:53:40 +08:00
|
|
|
</Trigger>
|
|
|
|
|
<!-- OKAsDefaultButton -->
|
2025-07-11 09:20:23 +08:00
|
|
|
<Trigger Property="CurrentStateName" SourceName="DefaultButtonStatesListener" Value="OKAsDefaultButton">
|
|
|
|
|
<Setter Property="Style" TargetName="PART_OKButton" Value="{DynamicResource AccentButtonStyle}" />
|
2025-02-10 20:53:40 +08:00
|
|
|
</Trigger>
|
|
|
|
|
<!-- YesAsDefaultButton -->
|
2025-07-11 09:20:23 +08:00
|
|
|
<Trigger Property="CurrentStateName" SourceName="DefaultButtonStatesListener" Value="YesAsDefaultButton">
|
|
|
|
|
<Setter Property="Style" TargetName="PART_YesButton" Value="{DynamicResource AccentButtonStyle}" />
|
2025-02-10 20:53:40 +08:00
|
|
|
</Trigger>
|
|
|
|
|
</ControlTemplate.Triggers>
|
|
|
|
|
</ControlTemplate>
|
|
|
|
|
</Setter.Value>
|
|
|
|
|
</Setter>
|
|
|
|
|
</Style>
|
|
|
|
|
|
|
|
|
|
</ResourceDictionary>
|