feat: add close button.

This commit is contained in:
Zhang Dian
2024-09-05 03:30:02 +08:00
parent f0b23e1bdf
commit f52d62f9f5
7 changed files with 76 additions and 34 deletions

View File

@@ -77,6 +77,14 @@ public class ToastCard : ContentControl
/// </summary>
public static readonly StyledProperty<NotificationType> NotificationTypeProperty =
AvaloniaProperty.Register<ToastCard, NotificationType>(nameof(NotificationType));
public bool ShowClose
{
get => GetValue(ShowCloseProperty);
set => SetValue(ShowCloseProperty, value);
}
public static readonly StyledProperty<bool> ShowCloseProperty =
AvaloniaProperty.Register<ToastCard, bool>(nameof(ShowClose), true);
/// <summary>
/// Defines the <see cref="ToastClosed"/> event.