feat: add icon, improve demo.

This commit is contained in:
rabbitism
2024-01-11 22:00:17 +08:00
parent 5eeebb020f
commit ae4323d3fe
8 changed files with 168 additions and 54 deletions

View File

@@ -1,3 +1,4 @@
using Avalonia;
using Avalonia.Controls;
using Avalonia.Controls.Metadata;
using Avalonia.Controls.Primitives;
@@ -30,9 +31,13 @@ public class MessageBoxWindow: Window
protected override Type StyleKeyOverride => typeof(MessageBoxWindow);
static MessageBoxWindow()
public static readonly StyledProperty<MessageBoxIcon> MessageIconProperty = AvaloniaProperty.Register<MessageBoxWindow, MessageBoxIcon>(
nameof(MessageIcon));
public MessageBoxIcon MessageIcon
{
get => GetValue(MessageIconProperty);
set => SetValue(MessageIconProperty, value);
}
public MessageBoxWindow()