Skip to main content

Notification(String, String, NotificationType, Nullable<TimeSpan>, Action, Action) Constructor

Initializes a new instance of the Notification class.

Definition

Namespace: Avalonia.Controls.Notifications
Assembly: Avalonia.Controls (in Avalonia.Controls.dll)

public Notification(
string? title,
string? message,
NotificationType type = NotificationType.Information,
TimeSpan? expiration = null,
Action? onClick = null,
Action? onClose = null
)

Parameters

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

See Also

Reference

Notification Class
Notification Overload
Avalonia.Controls.Notifications Namespace