New to Telerik UI for ASP.NET MVC? Start a free 30-day trial

Defines the fluent interface for configuring the Notificationcomponent.

Definition

Namespace:Kendo.Mvc.UI.Fluent

Assembly:Kendo.Mvc.dll

Syntax:

C#
public class NotificationBuilder : WidgetBuilderBase<Notification, NotificationBuilder>, IHtmlString

Inheritance: objectWidgetBuilderBase<Notification, NotificationBuilder>NotificationBuilder

Implements: IHtmlString

Inherited Members WidgetBuilderBase<Notification, NotificationBuilder>.ToComponent()WidgetBuilderBase<Notification, NotificationBuilder>.Name(string)WidgetBuilderBase<Notification, NotificationBuilder>.Deferred(bool)WidgetBuilderBase<Notification, NotificationBuilder>.ModelMetadata(ModelMetadata)WidgetBuilderBase<Notification, NotificationBuilder>.HtmlAttributes(object)WidgetBuilderBase<Notification, NotificationBuilder>.HtmlAttributes(IDictionary<string, object>)WidgetBuilderBase<Notification, NotificationBuilder>.AsModule(bool)WidgetBuilderBase<Notification, NotificationBuilder>.Render()WidgetBuilderBase<Notification, NotificationBuilder>.ScriptAttributes(object, bool)WidgetBuilderBase<Notification, NotificationBuilder>.ScriptAttributes(IDictionary<string, object>, bool)WidgetBuilderBase<Notification, NotificationBuilder>.ToHtmlString()WidgetBuilderBase<Notification, NotificationBuilder>.ToClientTemplate()WidgetBuilderBase<Notification, NotificationBuilder>.ToString()WidgetBuilderBase<Notification, NotificationBuilder>.Componentobject.GetType()object.MemberwiseClone()object.ToString()object.Equals(object)object.Equals(object, object)object.ReferenceEquals(object, object)object.GetHashCode()...

Constructors

Initializes a new instance of the NotificationBuilderclass.

C#
public NotificationBuilder(Notification component)
Parameters:componentNotification

The component.

Methods

Sets the time in milliseconds, after which a notifications can be hidden by the user via clicking.

C#
public NotificationBuilder AllowHideAfter(int value)
Parameters:valueint

The value of the setting.

Returns:

NotificationBuilder

Example:
C#
@( Html.Kendo().Notification()
.Name("Notification")
.AllowHideAfter(500)
)

Configures the animation effects of the displayed notifications.

C#
public NotificationBuilder Animation(Action<PopupAnimationBuilder> animationAction)
Parameters:animationActionAction<PopupAnimationBuilder>

The action that configures the animation.

Returns:

NotificationBuilder

Example:
C#
@( Html.Kendo().Notification()
.Name("Notification")
.Animation(a=&gt;a.Open(o=&gt;o.Duration(300).SlideIn(SlideDirection.Up)))
)

Defines a CSS selector, which points to the element that will hold the notifications to be displayed.

C#
public NotificationBuilder AppendTo(string value)
Parameters:valuestring

The value of the setting.

Returns:

NotificationBuilder

Example:
C#
@( Html.Kendo().Notification()
.Name("Notification")
.AppendTo("value")
)

Sets the time in milliseconds, after which a notifications is hidden automatically.

C#
public NotificationBuilder AutoHideAfter(int value)
Parameters:valueint

The value of the setting.

Returns:

NotificationBuilder

Example:
C#
@( Html.Kendo().Notification()
.Name("Notification")
.AutoHideAfter(500)
)

Sets whether notifications should display a hide button (when using default templates only).

C#
public NotificationBuilder Button(bool value)
Parameters:valuebool

The value of the setting.

Returns:

NotificationBuilder

Example:
C#
@( Html.Kendo().Notification()
.Name("Notification")
.Button(true)
)

Configures the client-side events.

C#
public NotificationBuilder Events(Action<NotificationEventBuilder> events)
Parameters:eventsAction<NotificationEventBuilder>

The client events action.

Returns:

NotificationBuilder

Example:
C#
@( Html.Kendo().Notification()
.Name("Notification")
.Events(events =&gt;
events.Hide("onHide"))
)

Defines the height of the notifications to be displayed.

C#
public NotificationBuilder Height(int value)
Parameters:valueint

The value of the setting.

Returns:

NotificationBuilder

Example:
C#
@( Html.Kendo().Notification()
.Name("Notification")
.Height(100)
)

Defines the height of the notifications to be displayed.

C#
public NotificationBuilder Height(string value)
Parameters:valuestring

The value of the setting.

Returns:

NotificationBuilder

Example:
C#
@( Html.Kendo().Notification()
.Name("Notification")
.Height("100px")
)

Sets whether notifications should be hidden by clicking anywhere on their content.

C#
public NotificationBuilder HideOnClick(bool value)
Parameters:valuebool

The value of the setting.

Returns:

NotificationBuilder

Example:
C#
@( Html.Kendo().Notification()
.Name("Notification")
.HideOnClick(true)
)

Configures the position settings of the popup notifications.

C#
public NotificationBuilder Position(Action<NotificationPositionSettingsBuilder> configurator)
Parameters:configuratorAction<NotificationPositionSettingsBuilder>

The Position configurator.

Returns:

NotificationBuilder

Example:
C#
@( Html.Kendo().Notification()
.Name("Notification")
.Position(p=&gt;p.Pinned(true))
)

Sets the stacking direction when multiple notifications are displayed by a single component instance.

C#
public NotificationBuilder Stacking(NotificationStackingSettings value)
Parameters:valueNotificationStackingSettings

A value of type NotificationStackingSettings enum.

Returns:

NotificationBuilder

Example:
C#
@( Html.Kendo().Notification()
.Name("Notification")
.Stacking(NotificationStackingSettings.Down)
)

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

C#
public NotificationBuilder Tag(string tag)
Parameters:tagstringReturns:

NotificationBuilder

Example:
C#
@( Html.Kendo().Notification()
.Name("Notification")
.Tag("div")
)

Configures the Notification templates.

C#
public NotificationBuilder Templates(Action<NotificationTemplateFactory> configurator)
Parameters:configuratorAction<NotificationTemplateFactory>

The configurator representing the Templates settings.

Returns:

NotificationBuilder

Example:
C#
@( Html.Kendo().Notification()
.Name("Notification")
.Templates(t=&gt;t.Add().Type("info"))
)

Defines the title attribute value for the Notification wrapper.

C#
public NotificationBuilder Title(string value)
Parameters:valuestring

The value for Title

Returns:

NotificationBuilder

Example:
C#
@( Html.Kendo().Notification()
.Name("Notification")
.Title("value")
)

Defines the width of the notifications to be displayed.

C#
public NotificationBuilder Width(int value)
Parameters:valueint

The value of the setting.

Returns:

NotificationBuilder

Example:
C#
@( Html.Kendo().Notification()
.Name("Notification")
.Width(200)
)

Defines the width of the notifications to be displayed.

C#
public NotificationBuilder Width(string value)
Parameters:valuestring

The value of the setting.

Returns:

NotificationBuilder

Example:
C#
@( Html.Kendo().Notification()
.Name("Notification")
.Width("100px")
)