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

Defines the fluent API for adding items to the toolbar of Kendo Chat for ASP.NET MVC

Definition

Namespace:Kendo.Mvc.UI.Fluent

Assembly:Kendo.Mvc.dll

Syntax:

C#
public class ChatToolbarButtonFactory

Inheritance: objectChatToolbarButtonFactory

Inherited Members object.GetType()object.MemberwiseClone()object.ToString()object.Equals(object)object.Equals(object, object)object.ReferenceEquals(object, object)object.GetHashCode()...

Constructors

C#
public ChatToolbarButtonFactory(ChatToolbarButtonSettings button)
Parameters:buttonChatToolbarButtonSettings

Methods

Defines the DOM attribute for the button element.

C#
public ChatToolbarButtonFactory Attr(object attr)
Parameters:attrobject

The attributes of the button.

Returns:

ChatToolbarButtonFactory

Example:
C#
@( Html.Kendo().Chat()
.Name("Chat")
.Toolbar(toolbar => {
toolbar.Buttons(buttons => buttons
.Add(buttons => button.Name("button2").Attr(new { data_value = "value" }))
);
})
)

Defines the iconClass of the button's inner span element.

C#
public ChatToolbarButtonFactory IconClass(string iconClass)
Parameters:iconClassstring

The iconClass of the button.

Returns:

ChatToolbarButtonFactory

Example:
C#
@( Html.Kendo().Chat()
.Name("Chat")
.Toolbar(toolbar => {
toolbar.Buttons(buttons => buttons
.Add(buttons => button.Name("button2").IconClass("k-icon k-i-gear"))
);
})
)

Defines the name of the button.

C#
public ChatToolbarButtonFactory Name(string name)
Parameters:namestring

The name of the button.

Returns:

ChatToolbarButtonFactory

Example:
C#
@( Html.Kendo().Chat()
.Name("Chat")
.Toolbar(toolbar => {
toolbar.Buttons(buttons => buttons
.Add(buttons => button.Name("button2").IconClass("k-icon k-i-gear"))
);
})
)

Defines the text of the button.

C#
public ChatToolbarButtonFactory Text(string text)
Parameters:textstring

The text of the button.

Returns:

ChatToolbarButtonFactory

Example:
C#
@( Html.Kendo().Chat()
.Name("Chat")
.Toolbar(toolbar => {
toolbar.Buttons(buttons => buttons
.Add(buttons => button.Name("button2").Text("Button"))
);
})
)