WindowNotificationManagerShow(Object, NotificationType, NullableTimeSpan, Action, Action, String) Method
Shows a Notification
Namespace: Avalonia.Controls.NotificationsAssembly: 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
)
Public Sub Show (
content As Object,
type As NotificationType,
Optional expiration As TimeSpan? = Nothing,
Optional onClick As Action = Nothing,
Optional onClose As Action = Nothing,
Optional classes As String() = Nothing
)
member Show :
content : Object *
type : NotificationType *
?expiration : Nullable<TimeSpan> *
?onClick : Action *
?onClose : Action *
?classes : string[]
(* Defaults:
let _expiration = defaultArg expiration null
let _onClick = defaultArg onClick null
let _onClose = defaultArg onClose null
let _classes = defaultArg classes null
*)
-> unit
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