Notification Class
Definition
A notification that can be shown in a window or by the host operating system.
public class Notification
Remarks
This class represents a notification that can be displayed either in a window using Avalonia.Controls.Notifications.WindowNotificationManager or by the host operating system (to be implemented).
Constructors
| Name | Description |
|---|---|
| Notification (2 overloads) | Initializes a new instance of the Avalonia.Controls.Notifications.Notification class. |
Notification overloads
Notification Constructor
Initializes a new instance of the Avalonia.Controls.Notifications.Notification class.
public Notification()
Notification Constructor
public Notification(string title, string message, Avalonia.Controls.Notifications.NotificationType type, Nullable<TimeSpan> expiration, Action onClick, Action onClose)
Parameters
title string
message string
type Avalonia.Controls.Notifications.NotificationType
expiration Nullable<TimeSpan>
onClick Action
onClose Action
Properties
| Name | Description |
|---|---|
| Expiration | 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. |
| Message | Gets the notification message. |
| OnClick | Gets an Action to be run when the notification is clicked. |
| OnClose | Gets an Action to be run when the notification is closed. |
| Title | Gets the Title of the notification. |
| Type | Gets 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; }
Events
| Name | Description |
|---|---|
| PropertyChanged | No summary available. |
PropertyChanged Event
public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged