Notification(String, String, NotificationType, NullableTimeSpan, Action, Action) Constructor

Initializes a new instance of the Notification class.

Definition

Namespace: Avalonia.Controls.Notifications
Assembly: Avalonia.Controls (in Avalonia.Controls.dll) Version: 11.3.999
public Notification(
	string? title,
	string? message,
	NotificationType type = NotificationType.Information,
	TimeSpan? expiration = null,
	Action? onClick = null,
	Action? onClose = null
)

Parameters

title  String
The title of the notification.
message  String
The message to be displayed in the notification.
type  NotificationType  (Optional)
The NotificationType of the notification.
expiration  NullableTimeSpan  (Optional)
The expiry time at which the notification will close. Use Zero for notifications that will remain open.
onClick  Action  (Optional)
An Action to call when the notification is clicked.
onClose  Action  (Optional)
An Action to call when the notification is closed.

See Also