Class NotificationService. Contains various methods with options to open notifications. Should be added as scoped service in the application services and RadzenNotification should be added in application main layout.
Object
Namespace: Radzen
Assembly: Radzen.Blazor.dll
public class NotificationService@inject NotificationService NotificationService
<RadzenButton Text="Show info notification" Click=@(args => NotificationService.Notify(new NotificationMessage { Severity = NotificationSeverity.Info, Summary = "Info Summary", Detail = "Info Detail", Duration = 4000 })) / >Class NotificationService. Contains various methods with options to open notifications. Should be added as scoped service in the application services and RadzenNotification should be added in application main layout.
public NotificationService()Gets the messages.
public ObservableCollection<NotificationMessage> Messages { get; }
| Type | Description |
|---|---|
| ObservableCollection<NotificationMessage> | Gets the messages. |
Notifies the specified message.
public void Notify(NotificationMessage message)
| Type | Name | Description |
|---|---|---|
| NotificationMessage | message | The message. |
Notifies the specified message.
public void Notify(NotificationSeverity severity, string summary, string detail, TimeSpan duration, Action<NotificationMessage> click)
| Type | Name | Description |
|---|---|---|
| NotificationSeverity | severity | |
| string | summary | |
| string | detail | |
| TimeSpan | duration | |
| Action<NotificationMessage> | click |
Notifies the specified message.
public void Notify(NotificationSeverity severity, string summary, string detail, double duration, Action<NotificationMessage> click, bool closeOnClick, object payload, Action<NotificationMessage> close)
| Type | Name | Description |
|---|---|---|
| NotificationSeverity | severity | |
| string | summary | |
| string | detail | |
| double | duration | |
| Action<NotificationMessage> | click | |
| bool | closeOnClick | |
| object | payload | |
| Action<NotificationMessage> | close |