Skip to main content

INotification Interface

Definition

Assembly:Avalonia.Controls
Package:Avalonia

Represents a notification that can be shown in a window or by the host operating system.

public interface INotification

Properties

NameDescription
ExpirationGets the expiration time of the notification after which it will automatically close. If the value is TimeSpan.Zero then the notification will remain open until the user closes it.
MessageGets the notification message.
OnClickGets an Action to be run when the notification is clicked.
OnCloseGets an Action to be run when the notification is closed.
TitleGets the Title of the notification.
TypeGets the Avalonia.Controls.Notifications.NotificationType of the notification.

Expiration Property

Gets the expiration time of the notification after which it will automatically close. If the value is TimeSpan.Zero then the notification will remain open until the user closes it.

public TimeSpan Expiration { get; set; }

Message Property

Gets the notification message.

public string Message { get; set; }

OnClick Property

Gets an Action to be run when the notification is clicked.

public Action OnClick { get; set; }

OnClose Property

Gets an Action to be run when the notification is closed.

public Action OnClose { get; set; }

Title Property

Gets the Title of the notification.

public string Title { get; set; }

Type Property

Gets the Avalonia.Controls.Notifications.NotificationType of the notification.

public Avalonia.Controls.Notifications.NotificationType Type { get; set; }