New to Telerik UI for ASP.NET Core? Download free 30-day trial

NotificationBuilder

Properties

WriteAction - Func

Methods

Tag(System.String)

Sets the Notification HTML tag. A SPAN tag is used by default.

Parameters

tag - System.String

The tag type value.

Example


            @( Html.Kendo().Notification()
                       .Name("Notification")
                       .Tag("div")
            )

Width(System.Int32)

Defines the width of the notifications to be displayed.

Parameters

value - System.Int32

The value of the setting.

Example


             @( Html.Kendo().Notification()
                        .Name("Notification")
                        .Width(200)
            )

Height(System.Int32)

Defines the height of the notifications to be displayed.

Parameters

value - System.Int32

The value of the setting.

Example


             @( Html.Kendo().Notification()
                        .Name("Notification")
                        .Height(100)
            )

Templates(System.Action)

Configures the Notification templates.

Parameters

configurator - System.Action<NotificationTemplateFactory>

The configurator representing the Templates settings.

Example


             @( Html.Kendo().Notification()
                        .Name("Notification")
                        .Templates(t=>t.Add().Type("info"))
            )

Animation(System.Action)

Configures the animation effects of the displayed notifications.

Parameters

animationAction - System.Action<PopupAnimationBuilder>

The action that configures the animation.

Example


             @( Html.Kendo().Notification()
                        .Name("Notification")
                        .Animation(a=>a.Open(o=>o.Duration(300).SlideIn(SlideDirection.Up)))
            )

AllowHideAfter(System.Double)

Indicates the period in milliseconds after which a notification can be dismissed (hidden) by the user.

Parameters

value - System.Double

The value for AllowHideAfter

AppendTo(System.String)

Defines the element to which the notifications will be appended or prepended (depending on the stacking direction).

Parameters

value - System.String

The value for AppendTo

AutoHideAfter(System.Double)

Indicates the period in milliseconds after which a notification disappears automatically. Setting a zero value disables this behavior.

Parameters

value - System.Double

The value for AutoHideAfter

Button(System.Boolean)

Determines whether the notifications will include a hide button. This setting works with the built-in templates only.

Parameters

value - System.Boolean

The value for Button

Button()

Determines whether the notifications will include a hide button. This setting works with the built-in templates only.

Height(System.String)

Defines the notifications' height. Numbers are treated as pixels.

Parameters

value - System.String

The value for Height

HideOnClick(System.Boolean)

Determines whether notifications can be hidden by clicking anywhere on their content.

Parameters

value - System.Boolean

The value for HideOnClick

Position(System.Action)

This setting applies to popup notifications only, i.e. in cases when appendTo is not set. It determines the position of the first notification on the screen, as well as whether the notifications will move together with the page content during scrolling.top takes precedence over bottom and left takes precedence over right.

Parameters

configurator - System.Action<NotificationPositionSettingsBuilder>

The configurator for the position setting.

Title(System.String)

Defines the title attribute value for the Notification wrapper.

Parameters

value - System.String

The value for Title

Width(System.String)

Defines the notifications' width. Numbers are treated as pixels.

Parameters

value - System.String

The value for Width

Stacking(Kendo.Mvc.UI.NotificationStackingSettings)

Parameters

value - NotificationStackingSettings

The value for Stacking

Events(System.Action)

Configures the client-side events.

Parameters

configurator - System.Action<NotificationEventBuilder>

The client events action.

Example


            @(Html.Kendo().Notification()
                  .Name("Notification")
                  .Events(events => events
                      .Hide("onHide")
                  )
            )

ToComponent()

Returns the internal view component.

Expression(System.String)

Sets the name of the component.

Parameters

modelExpression - System.String

Explorer(Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer)

Sets the name of the component.

Parameters

modelExplorer - Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer

Name(System.String)

Sets the name of the component.

Parameters

componentName - System.String

The name.

Deferred(System.Boolean)

Suppress initialization script rendering. Note that this options should be used in conjunction with

Parameters

deferred - System.Boolean

HtmlAttributes(System.Object)

Sets the HTML attributes.

Parameters

attributes - System.Object

The HTML attributes.

HtmlAttributes(System.Collections.Generic.IDictionary)

Sets the HTML attributes.

Parameters

attributes - System.Collections.Generic.IDictionary<String,Object>

The HTML attributes.

ScriptAttributes(System.Object,System.Boolean)

Sets the JavaScript attributes to the initialization script.

Parameters

attributes - System.Object

The JavaScript attributes.

overrideAttributes - System.Boolean

Argument which determines whether attributes should be overriden.

ScriptAttributes(System.Collections.Generic.IDictionary,System.Boolean)

Sets the JavaScript attributes to the initialization script.

Parameters

attributes - System.Collections.Generic.IDictionary<String,Object>

The JavaScript attributes.

overrideAttributes - System.Boolean

Argument which determines whether attributes should be overriden.

Render()

Renders the component in place.

ToHtmlString()

WriteTo(System.IO.TextWriter,System.Text.Encodings.Web.HtmlEncoder)

Parameters

writer - System.IO.TextWriter
encoder - System.Text.Encodings.Web.HtmlEncoder

ToClientTemplate()

AsModule(System.Boolean)

Specifies whether the initialization script of the component will be rendered as a JavaScript module.

Parameters

value - System.Boolean
In this article
Not finding the help you need?