Notification
Namespace: Wisej.Web.Ext.Notification
Assembly: Wisej.Web.Ext.Notification
Adds support for the Notification API: notification.
- C#
- VB.NET
public class Notification : Component
Public Class Notification
Inherits Component
Constructors
Notification()
Initializes a new instance of the Notification class.
Notification(container)
Initializes a new instance of the Notification class together with the specified container.
| Name | Type | Description |
|---|---|---|
| container | IContainer | A IContainer that represents the container for the component. |
Properties
IsSupported
Boolean: Returns whether the client browser supports desktop notifications.
Methods
Show(title, body, icon, showOnClick, image, id, requireInteraction)
Displays a new desktop notification.
| Parameter | Type | Description |
|---|---|---|
| title | String | The title of the notification. |
| body | String | The optional body string of the notification. |
| icon | String | The URL of the image used as an icon of the notification. |
| showOnClick | Boolean | Indicates whether to activate the browser when the user clicks the notification. |
| image | String | URL of an image to show at the top of the notification window. |
| id | String | Optional unique id, returned in NotificationClickEventArgs. |
| requireInteraction | Boolean | Indicates that a notification should remain active until the user clicks or dismisses it, rather than closing automatically. |
Events
Click
NotificationClickEventHandler Fired when the user clicks on a desktop notification.