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.
RETURNS
Returns the current instance of NotificationBuilder.
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.
RETURNS
Returns the current instance of NotificationBuilder.
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.
RETURNS
Returns the current instance of NotificationBuilder.
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.
RETURNS
Returns the current instance of NotificationBuilder.
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.
RETURNS
Returns the current instance of NotificationBuilder.
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
RETURNS
Returns the current NotificationBuilder instance.
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
RETURNS
Returns the current NotificationBuilder instance.
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
RETURNS
Returns the current NotificationBuilder instance.
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
RETURNS
Returns the current NotificationBuilder instance.
Button()
Determines whether the notifications will include a hide button. This setting works with the built-in templates only.
RETURNS
Returns the current NotificationBuilder instance.
Height(System.String)
Defines the notifications' height. Numbers are treated as pixels.
Parameters
value - System.String
The value for Height
RETURNS
Returns the current NotificationBuilder instance.
HideOnClick(System.Boolean)
Determines whether notifications can be hidden by clicking anywhere on their content.
Parameters
value - System.Boolean
The value for HideOnClick
RETURNS
Returns the current NotificationBuilder instance.
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.
RETURNS
Returns the current instance of NotificationBuilder .
Title(System.String)
Defines the title attribute value for the Notification wrapper.
Parameters
value - System.String
The value for Title
RETURNS
Returns the current NotificationBuilder instance.
Width(System.String)
Defines the notifications' width. Numbers are treated as pixels.
Parameters
value - System.String
The value for Width
RETURNS
Returns the current NotificationBuilder instance.
Stacking(Kendo.Mvc.UI.NotificationStackingSettings)
Parameters
value - NotificationStackingSettings
The value for Stacking
RETURNS
Returns the current NotificationBuilder instance.
Events(System.Action)
Configures the client-side events.
Parameters
configurator - System.Action<NotificationEventBuilder>
The client events action.
RETURNS
Returns the current NotificationBuilder instance.
Example
@(Html.Kendo().Notification()
.Name("Notification")
.Events(events => events
.Hide("onHide")
)
)
ToComponent()
Returns the internal view component.
RETURNS
The instance that represents the component.
Expression(System.String)
Sets the name of the component.
Parameters
modelExpression - System.String
RETURNS
Returns the current instance.
Explorer(Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer)
Sets the name of the component.
Parameters
modelExplorer - Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer
RETURNS
Returns the current instance.
Name(System.String)
Sets the name of the component.
Parameters
componentName - System.String
The name.
RETURNS
Returns the current instance.
Deferred(System.Boolean)
Suppress initialization script rendering. Note that this options should be used in conjunction with
Parameters
deferred - System.Boolean
RETURNS
Returns a DeferredWidgetBuilder instance.
HtmlAttributes(System.Object)
Sets the HTML attributes.
Parameters
attributes - System.Object
The HTML attributes.
RETURNS
Returns the current instance.
HtmlAttributes(System.Collections.Generic.IDictionary)
Sets the HTML attributes.
Parameters
attributes - System.Collections.Generic.IDictionary<String,Object>
The HTML attributes.
RETURNS
Returns the current instance.
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.
RETURNS
Returns the current instance.
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.
RETURNS
Returns the current instance.
Render()
Renders the component in place.
ToHtmlString()
Returns the HTML representation of the component.
WriteTo(System.IO.TextWriter,System.Text.Encodings.Web.HtmlEncoder)
Parameters
writer - System.IO.TextWriter
encoder - System.Text.Encodings.Web.HtmlEncoder
ToClientTemplate()
Returns the client template for the component.
AsModule(System.Boolean)
Specifies whether the initialization script of the component will be rendered as a JavaScript module.
Parameters
value - System.Boolean
RETURNS
Returns the current instance.