mirror of
https://github.com/yaobiao131/downkyicore.git
synced 2025-08-10 00:52:31 +00:00
29 lines
1.0 KiB
C#
29 lines
1.0 KiB
C#
using Avalonia;
|
|
using Avalonia.Styling;
|
|
|
|
namespace DownKyi.PrismExtension.Dialog;
|
|
|
|
public class Dialog : Prism.Services.Dialogs.Dialog
|
|
{
|
|
public static readonly AvaloniaProperty ThemeProperty = AvaloniaProperty.RegisterAttached<AvaloniaObject, ControlTheme>("Theme", typeof(Dialog));
|
|
|
|
/// <summary>
|
|
/// Gets the value for the <see cref="ThemeProperty"/> attached property.
|
|
/// </summary>
|
|
/// <param name="obj">The target element.</param>
|
|
/// <returns>The <see cref="ThemeProperty"/> attached to the <paramref name="obj"/> element.</returns>
|
|
public static ControlTheme? GetTheme(AvaloniaObject obj)
|
|
{
|
|
return (ControlTheme?)obj.GetValue(ThemeProperty);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Sets the <see cref="ThemeProperty"/> attached property.
|
|
/// </summary>
|
|
/// <param name="obj">The target element.</param>
|
|
/// <param name="value">The Style to attach.</param>
|
|
public static void SetTheme(AvaloniaObject obj, ControlTheme value)
|
|
{
|
|
obj.SetValue(ThemeProperty, value);
|
|
}
|
|
} |