WindowNotificationManagerShow(Object, NotificationType, NullableTimeSpan, Action, Action, String) Method

Shows a Notification

Definition

Namespace: Avalonia.Controls.Notifications
Assembly: Avalonia.Controls (in Avalonia.Controls.dll) Version: 11.3.999
public void Show(
	Object content,
	NotificationType type,
	TimeSpan? expiration = null,
	Action? onClick = null,
	Action? onClose = null,
	string[]? classes = null
)

Parameters

content  Object
the content of the notification
type  NotificationType
the type of the notification
expiration  NullableTimeSpan  (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
onClick  Action  (Optional)
an Action to be run when the notification is clicked
onClose  Action  (Optional)
an Action to be run when the notification is closed
classes  String  (Optional)
style classes to apply

See Also