Show(Object, NotificationType, Nullable<TimeSpan>, Action, Action, String[]) Method
Shows a Notification
Definition
Namespace: Avalonia.Controls.Notifications
Assembly: Avalonia.Controls (in Avalonia.Controls.dll)
- C#
- VB
- F#
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
- 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