This commit is contained in:
ShrlAlgo
2025-07-11 09:20:23 +08:00
parent c7b104f44f
commit 4d35cadb56
840 changed files with 102347 additions and 11595 deletions

View File

@@ -40,9 +40,9 @@ public class MessageWindow : System.Windows.Window
new PropertyMetadata(string.Empty)
);
/// <summary>Identifies the <see cref="SecondaryButtonText"/> dependency property.</summary>
public static readonly DependencyProperty SecondaryButtonTextProperty = DependencyProperty.Register(
nameof(SecondaryButtonText),
/// <summary>Identifies the <see cref="AccentButtonText"/> dependency property.</summary>
public static readonly DependencyProperty AccentButtonTextProperty = DependencyProperty.Register(
nameof(AccentButtonText),
typeof(string),
typeof(MessageWindow),
new PropertyMetadata(string.Empty)
@@ -64,9 +64,9 @@ public class MessageWindow : System.Windows.Window
new PropertyMetadata(null)
);
/// <summary>Identifies the <see cref="SecondaryButtonIcon"/> dependency property.</summary>
public static readonly DependencyProperty SecondaryButtonIconProperty = DependencyProperty.Register(
nameof(SecondaryButtonIcon),
/// <summary>Identifies the <see cref="AccentButtonIcon"/> dependency property.</summary>
public static readonly DependencyProperty AccentButtonIconProperty = DependencyProperty.Register(
nameof(AccentButtonIcon),
typeof(IconElement),
typeof(MessageWindow),
new PropertyMetadata(null)
@@ -88,12 +88,12 @@ public class MessageWindow : System.Windows.Window
new PropertyMetadata(ControlAppearance.Primary)
);
/// <summary>Identifies the <see cref="SecondaryButtonAppearance"/> dependency property.</summary>
public static readonly DependencyProperty SecondaryButtonAppearanceProperty = DependencyProperty.Register(
nameof(SecondaryButtonAppearance),
/// <summary>Identifies the <see cref="AccentButtonAppearance"/> dependency property.</summary>
public static readonly DependencyProperty AccentButtonAppearanceProperty = DependencyProperty.Register(
nameof(AccentButtonAppearance),
typeof(ControlAppearance),
typeof(MessageWindow),
new PropertyMetadata(ControlAppearance.Secondary)
new PropertyMetadata(ControlAppearance.Accent)
);
/// <summary>Identifies the <see cref="CloseButtonAppearance"/> dependency property.</summary>
@@ -101,7 +101,7 @@ public class MessageWindow : System.Windows.Window
nameof(CloseButtonAppearance),
typeof(ControlAppearance),
typeof(MessageWindow),
new PropertyMetadata(ControlAppearance.Secondary)
new PropertyMetadata(ControlAppearance.Accent)
);
/// <summary>Identifies the <see cref="IsPrimaryButtonEnabled"/> dependency property.</summary>
@@ -112,9 +112,9 @@ public class MessageWindow : System.Windows.Window
new PropertyMetadata(true)
);
/// <summary>Identifies the <see cref="IsSecondaryButtonEnabled"/> dependency property.</summary>
public static readonly DependencyProperty IsSecondaryButtonEnabledProperty = DependencyProperty.Register(
nameof(IsSecondaryButtonEnabled),
/// <summary>Identifies the <see cref="IsAccentButtonEnabled"/> dependency property.</summary>
public static readonly DependencyProperty IsAccentButtonEnabledProperty = DependencyProperty.Register(
nameof(IsAccentButtonEnabled),
typeof(bool),
typeof(MessageWindow),
new PropertyMetadata(true)
@@ -149,10 +149,10 @@ public class MessageWindow : System.Windows.Window
/// <summary>
/// Gets or sets the text to be displayed on the secondary button.
/// </summary>
public string SecondaryButtonText
public string AccentButtonText
{
get => (string)GetValue(SecondaryButtonTextProperty);
set => SetValue(SecondaryButtonTextProperty, value);
get => (string)GetValue(AccentButtonTextProperty);
set => SetValue(AccentButtonTextProperty, value);
}
/// <summary>
@@ -176,10 +176,10 @@ public class MessageWindow : System.Windows.Window
/// <summary>
/// Gets or sets the <see cref="SymbolRegular"/> on the secondary button
/// </summary>
public IconElement? SecondaryButtonIcon
public IconElement? AccentButtonIcon
{
get => (IconElement?)GetValue(SecondaryButtonIconProperty);
set => SetValue(SecondaryButtonIconProperty, value);
get => (IconElement?)GetValue(AccentButtonIconProperty);
set => SetValue(AccentButtonIconProperty, value);
}
/// <summary>
@@ -203,10 +203,10 @@ public class MessageWindow : System.Windows.Window
/// <summary>
/// Gets or sets the <see cref="ControlAppearance"/> on the secondary button
/// </summary>
public ControlAppearance SecondaryButtonAppearance
public ControlAppearance AccentButtonAppearance
{
get => (ControlAppearance)GetValue(SecondaryButtonAppearanceProperty);
set => SetValue(SecondaryButtonAppearanceProperty, value);
get => (ControlAppearance)GetValue(AccentButtonAppearanceProperty);
set => SetValue(AccentButtonAppearanceProperty, value);
}
/// <summary>
@@ -221,10 +221,10 @@ public class MessageWindow : System.Windows.Window
/// <summary>
/// Gets or sets a value indicating whether the <see cref="MessageWindow"/> primary button is enabled.
/// </summary>
public bool IsSecondaryButtonEnabled
public bool IsAccentButtonEnabled
{
get => (bool)GetValue(IsSecondaryButtonEnabledProperty);
set => SetValue(IsSecondaryButtonEnabledProperty, value);
get => (bool)GetValue(IsAccentButtonEnabledProperty);
set => SetValue(IsAccentButtonEnabledProperty, value);
}
/// <summary>
@@ -432,7 +432,7 @@ public class MessageWindow : System.Windows.Window
MessageBoxResult result = button switch
{
MessageBoxButton.Primary => MessageBoxResult.Primary,
MessageBoxButton.Secondary => MessageBoxResult.Secondary,
MessageBoxButton.Accent => MessageBoxResult.Secondary,
_ => MessageBoxResult.None,
};