Notification TagHelper Overview
The Telerik UI Notification TagHelper for ASP.NET Core is a server-side wrapper for the Kendo UI Notification widget.
The Notification provides a styled UI widget with arbitrary content which can provide information to the user on various occasions.
The Notification is part of Telerik UI for ASP.NET Core, a
professional grade UI library with 100+ components for building modern and feature-rich applications. To try it out sign up for a free 30-day trial.
Initializing the Notification
The following example demonstrates how to define the Notification by using the Notification TagHelper.
<kendo-notification name="notification" auto-hide-after="0"></kendo-notification>
Basic Configuration
The Notification TagHelper configuration options are passed as attributes of the tag and through nested tags.
@(Html.Kendo().Notification()
.Name("notification")
.Position(p => p.Pinned(true).Top(30).Right(30))
.Stacking(NotificationStackingSettings.Down)
.AutoHideAfter(0)
.Templates(t =>
{
t.Add().Type("info").ClientTemplateID("emailTemplate");
t.Add().Type("error").ClientTemplateID("errorTemplate");
t.Add().Type("upload-success").ClientTemplateID("successTemplate");
})
.Animation(a => a.Open(e => e.Duration(500)).Close(e => e.Duration(0)))
)
<kendo-notification name="notification"
stacking="NotificationStackingSettings.Down"
auto-hide-after="0">
<position pinned="true" top="30" right="30" />
<templates>
<notification-template type="info" template-id="emailTemplate" />
<notification-template type="error" template-id="errorTemplate" />
<notification-template type="upload-success" template-id="successTemplate" />
</templates>
<popup-animation>
<open duration="500" />
<close duration="0" />
</popup-animation>
</kendo-notification>