Class NotificationCard
- Namespace
- Avalonia.Controls.Notifications
- Assembly
- Avalonia.Controls.dll
Control that represents and displays a notification.
[PseudoClasses(new string[] { ":error", ":information", ":success", ":warning" })]
public class NotificationCard : ContentControl, INotifyPropertyChanged, IDataContextProvider, ILogical, IThemeVariantHost, IResourceHost, IResourceNode, IStyleHost, ISetLogicalParent, ISetInheritanceParent, ISupportInitialize, IStyleable, INamed, IInputElement, IDataTemplateHost, ISetterValue
- Inheritance
-
NotificationCard
- Implements
- Inherited Members
- Extension Methods
Constructors
NotificationCard()
Initializes a new instance of the NotificationCard class.
public NotificationCard()
Fields
CloseOnClickProperty
Defines the CloseOnClick property.
public static readonly AttachedProperty<bool> CloseOnClickProperty
Field Value
IsClosedProperty
Defines the IsClosed property.
public static readonly StyledProperty<bool> IsClosedProperty
Field Value
IsClosingProperty
Defines the IsClosing property.
public static readonly DirectProperty<NotificationCard, bool> IsClosingProperty
Field Value
NotificationClosedEvent
Defines the NotificationClosed event.
public static readonly RoutedEvent<RoutedEventArgs> NotificationClosedEvent
Field Value
NotificationTypeProperty
Defines the NotificationType property
public static readonly StyledProperty<NotificationType> NotificationTypeProperty
Field Value
Properties
IsClosed
Determines if the notification is closed.
public bool IsClosed { get; set; }
Property Value
IsClosing
Determines if the notification is already closing.
public bool IsClosing { get; }
Property Value
NotificationType
Gets or sets the type of the notification
public NotificationType NotificationType { get; set; }
Property Value
Methods
Close()
Closes the NotificationCard.
public void Close()
GetCloseOnClick(Button)
public static bool GetCloseOnClick(Button obj)
Parameters
obj
Button
Returns
OnPropertyChanged(AvaloniaPropertyChangedEventArgs)
Called when a avalonia property changes on the object.
protected override void OnPropertyChanged(AvaloniaPropertyChangedEventArgs e)
Parameters
SetCloseOnClick(Button, bool)
public static void SetCloseOnClick(Button obj, bool value)
Parameters
Events
NotificationClosed
Raised when the NotificationCard has closed.
public event EventHandler<RoutedEventArgs>? NotificationClosed