Notification(String, String, NotificationType, NullableTimeSpan, Action, Action) Constructor
Namespace: Avalonia.Controls.NotificationsAssembly: Avalonia.Controls (in Avalonia.Controls.dll) Version: 11.3.999
public Notification(
string? title,
string? message,
NotificationType type = NotificationType.Information,
TimeSpan? expiration = null,
Action? onClick = null,
Action? onClose = null
)
Public Sub New (
title As String,
message As String,
Optional type As NotificationType = NotificationType.Information,
Optional expiration As TimeSpan? = Nothing,
Optional onClick As Action = Nothing,
Optional onClose As Action = Nothing
)
new :
title : string *
message : string *
?type : NotificationType *
?expiration : Nullable<TimeSpan> *
?onClick : Action *
?onClose : Action
(* Defaults:
let _type = defaultArg type NotificationType.Information
let _expiration = defaultArg expiration null
let _onClick = defaultArg onClick null
let _onClose = defaultArg onClose null
*)
-> Notification
Parameters
- title String
- The title of the notification.
- message String
- The message to be displayed in the notification.
- type NotificationType (Optional)
- The NotificationType of the notification.
- expiration NullableTimeSpan (Optional)
- The expiry time at which the notification will close.
Use Zero for notifications that will remain open.
- onClick Action (Optional)
- An Action to call when the notification is clicked.
- onClose Action (Optional)
- An Action to call when the notification is closed.