Skip to main content

Show(Object, NotificationType, Nullable<TimeSpan>, Action, Action, String[]) Method

Shows a Notification

Definition

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

public void Show(
Object content,
NotificationType type,
TimeSpan? expiration = null,
Action? onClick = null,
Action? onClose = null,
string[]? classes = null
)
View Source

Parameters

  Object
the content of the notification
  NotificationType
the type of the notification
  Nullable(TimeSpan)  (Optional)
the expiration time of the notification after which it will automatically close. If the value is Zero then the notification will remain open until the user closes it
  Action  (Optional)
an Action to be run when the notification is clicked
  Action  (Optional)
an Action to be run when the notification is closed
  String[]  (Optional)
style classes to apply

See Also

Reference

WindowNotificationManager Class
Show Overload
Avalonia.Controls.Notifications Namespace