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

Defines the fluent API for configuring the DiagramConnectionEditableSettingsToolButton settings.

Definition

Namespace:Kendo.Mvc.UI.Fluent

Assembly:Kendo.Mvc.dll

Type Parameters:

TShapeModel

TConnectionModel

Syntax:

C#
public class DiagramConnectionEditableSettingsToolButtonBuilder<TShapeModel, TConnectionModel> where TShapeModel : class where TConnectionModel : class

Inheritance: objectDiagramConnectionEditableSettingsToolButtonBuilder<TShapeModel, TConnectionModel>

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

Constructors

C#
public DiagramConnectionEditableSettingsToolButtonBuilder(DiagramConnectionEditableSettingsToolButton settings)
Parameters:settingsDiagramConnectionEditableSettingsToolButton

Methods

Specifies the "click" event handler of the button within a ButtonGroup.

C#
public DiagramConnectionEditableSettingsToolButtonBuilder<TShapeModel, TConnectionModel> Click(Func<object, object> handler)
Parameters:handlerFunc<object, object>

The value that configures the click action.

Returns:

DiagramConnectionEditableSettingsToolButtonBuilder<TShapeModel, TConnectionModel>

Specifies the "click" event handler of the button within a ButtonGroup.

C#
public DiagramConnectionEditableSettingsToolButtonBuilder<TShapeModel, TConnectionModel> Click(string handler)
Parameters:handlerstring

The value that configures the click action.

Returns:

DiagramConnectionEditableSettingsToolButtonBuilder<TShapeModel, TConnectionModel>

Example:
C#
@(Html.Kendo().Diagram()
.Name("diagram")
.Connections(c =&gt; c
.Add().Editable(e =&gt; e.Tools(tt =&gt; tt.Custom().Type("buttonGroup")
.Buttons(btn =&gt;
{
btn.Add().Text("Item 1").Click("onItem1Click");
})
))
)
)

Specifies whether the ButtonGroup button must be initially enabled or disabled.

C#
public DiagramConnectionEditableSettingsToolButtonBuilder<TShapeModel, TConnectionModel> Enable(bool value)
Parameters:valuebool

The value that configures the Enable option.

Returns:

DiagramConnectionEditableSettingsToolButtonBuilder<TShapeModel, TConnectionModel>

Example:
C#
@(Html.Kendo().Diagram()
.Name("diagram")
.Connections(c =&gt; c
.Add().Editable(e =&gt; e.Tools(tt =&gt; tt.Custom().Type("buttonGroup")
.Buttons(btn =&gt;
{
btn.Add().Text("Item 1").Enable(false);
})
))
)
)

Assigns the button to a group. The options is applicable only for the children of a ButtonGroup that has Togglable(true).

C#
public DiagramConnectionEditableSettingsToolButtonBuilder<TShapeModel, TConnectionModel> Group(string value)
Parameters:valuestring

The value that configures the group of the button.

Returns:

DiagramConnectionEditableSettingsToolButtonBuilder<TShapeModel, TConnectionModel>

Example:
C#
@(Html.Kendo().Diagram()
.Name("diagram")
.Connections(c =&gt; c
.Add().Editable(e =&gt; e.Tools(tt =&gt; tt.Custom().Type("buttonGroup")
.Buttons(btn =&gt;
{
btn.Add().Text("Item 1").Togglable(true).Group("group1");
btn.Add().Text("Item 2").Togglable(true).Group("group1");
})
))
)
)

Specifies the HTML attributes of a ButtonGroup's button.

C#
public DiagramConnectionEditableSettingsToolButtonBuilder<TShapeModel, TConnectionModel> HtmlAttributes(IDictionary<string, object> value)
Parameters:valueIDictionary<string, object>

The value that configures the HTML attributes.

Returns:

DiagramConnectionEditableSettingsToolButtonBuilder<TShapeModel, TConnectionModel>

Example:
C#
@(Html.Kendo().Diagram()
.Name("diagram")
.Connections(c =&gt; c
.Add().Editable(e =&gt; e.Tools(tt =&gt; tt.Custom().Type("buttonGroup")
.Buttons(btn =&gt;
{
btn.Add().Text("Item 1").HtmlAttributes(new Dictionary&lt;string, object&gt;() { ["class"] = "defaultBtn" });
})
))
)
)

Specifies the HTML attributes of a ButtonGroup's button.

C#
public DiagramConnectionEditableSettingsToolButtonBuilder<TShapeModel, TConnectionModel> HtmlAttributes(object value)
Parameters:valueobject

The value that configures the HTML attributes.

Returns:

DiagramConnectionEditableSettingsToolButtonBuilder<TShapeModel, TConnectionModel>

Example:
C#
@(Html.Kendo().Diagram()
.Name("diagram")
.Connections(c =&gt; c
.Add().Editable(e =&gt; e.Tools(tt =&gt; tt.Custom().Type("buttonGroup")
.Buttons(btn =&gt;
{
btn.Add().Text("Item 1").HtmlAttributes(new { @class = "defaultBtn"});
})
))
)
)

Sets an icon for the ButtonGroup button. The icon must be one of the existing in the Kendo UI theme sprite.

C#
public DiagramConnectionEditableSettingsToolButtonBuilder<TShapeModel, TConnectionModel> Icon(string value)
Parameters:valuestring

The value that configures the icon.

Returns:

DiagramConnectionEditableSettingsToolButtonBuilder<TShapeModel, TConnectionModel>

Example:
C#
@(Html.Kendo().Diagram()
.Name("diagram")
.Connections(c =&gt; c
.Add().Editable(e =&gt; e.Tools(tt =&gt; tt.Custom().Type("buttonGroup")
.Buttons(btn =&gt;
{
btn.Add().Text("Item 1").Icon("clock");
})
))
)
)

Specifies the ID of the button within the ButtonGroup.

C#
public DiagramConnectionEditableSettingsToolButtonBuilder<TShapeModel, TConnectionModel> Id(string value)
Parameters:valuestring

The value that configures the id of the button.

Returns:

DiagramConnectionEditableSettingsToolButtonBuilder<TShapeModel, TConnectionModel>

Example:
C#
@(Html.Kendo().Diagram()
.Name("diagram")
.Connections(c =&gt; c
.Add().Editable(e =&gt; e.Tools(tt =&gt; tt.Custom().Type("buttonGroup")
.Buttons(btn =&gt;
{
btn.Add().Text("Item 1").Id("1");
})
))
)
)

Sets an image with a specified URL to be rendered in the button.

C#
public DiagramConnectionEditableSettingsToolButtonBuilder<TShapeModel, TConnectionModel> ImageUrl(string value)
Parameters:valuestring

The value that configures the image URL.

Returns:

DiagramConnectionEditableSettingsToolButtonBuilder<TShapeModel, TConnectionModel>

Example:
C#
@(Html.Kendo().Diagram()
.Name("diagram")
.Connections(c =&gt; c
.Add().Editable(e =&gt; e.Tools(tt =&gt; tt.Custom().Type("buttonGroup")
.Buttons(btn =&gt;
{
btn.Add().Text("Item 1").ImageUrl("/diagram/settings.png");
})
))
)
)

Specifies if the toggle button must be initially selected. The option applies only to the children of the ButtonGroup that have Togglable(true).

C#
public DiagramConnectionEditableSettingsToolButtonBuilder<TShapeModel, TConnectionModel> Selected(bool value)
Parameters:valuebool

The value that configures the selected button state.

Returns:

DiagramConnectionEditableSettingsToolButtonBuilder<TShapeModel, TConnectionModel>

Example:
C#
@(Html.Kendo().Diagram()
.Name("diagram")
.Connections(c =&gt; c
.Add().Editable(e =&gt; e.Tools(tt =&gt; tt.Custom().Type("buttonGroup")
.Buttons(btn =&gt;
{
btn.Add().Text("Item 1").Togglable(true).Selected(true);
})
))
)
)

Specifies where the icon of the button will be displayed. The supported values are: "toolbar", "overflow", and "both" (default).

C#
public DiagramConnectionEditableSettingsToolButtonBuilder<TShapeModel, TConnectionModel> ShowIcon(string value)
Parameters:valuestring

The value that configures the visibility of the button icon.

Returns:

DiagramConnectionEditableSettingsToolButtonBuilder<TShapeModel, TConnectionModel>

Example:
C#
@(Html.Kendo().Diagram()
.Name("diagram")
.Connections(c =&gt; c
.Add().Editable(e =&gt; e.Tools(tt =&gt; tt.Custom().Type("buttonGroup")
.Buttons(btn =&gt;
{
btn.Add().Text("Item 1").ShowIcon("both");
})
))
)
)

Specifies where the text of the button will be displayed. The supported values are: "toolbar", "overflow", and "both" (default).

C#
public DiagramConnectionEditableSettingsToolButtonBuilder<TShapeModel, TConnectionModel> ShowText(string value)
Parameters:valuestring

The value that configures the visibility of the button text..

Returns:

DiagramConnectionEditableSettingsToolButtonBuilder<TShapeModel, TConnectionModel>

Example:
C#
@(Html.Kendo().Diagram()
.Name("diagram")
.Connections(c =&gt; c
.Add().Editable(e =&gt; e.Tools(tt =&gt; tt.Custom().Type("buttonGroup")
.Buttons(btn =&gt;
{
btn.Add().Text("Item 1").ShowText("both");
})
))
)
)

Defines a CSS class (or multiple classes separated by spaces) that will be used for the button's icon.

C#
public DiagramConnectionEditableSettingsToolButtonBuilder<TShapeModel, TConnectionModel> SpriteCssClass(string value)
Parameters:valuestring

The value that configures the CSS class.

Returns:

DiagramConnectionEditableSettingsToolButtonBuilder<TShapeModel, TConnectionModel>

Example:
C#
@(Html.Kendo().Diagram()
.Name("diagram")
.Connections(c =&gt; c
.Add().Editable(e =&gt; e.Tools(tt =&gt; tt.Custom().Type("buttonGroup")
.Buttons(btn =&gt;
{
btn.Add().Text("Item 1").Icon("check").SpriteCssClass("tick-icon");
})
))
)
)

Specifies the text of the button.

C#
public DiagramConnectionEditableSettingsToolButtonBuilder<TShapeModel, TConnectionModel> Text(string value)
Parameters:valuestring

The value that configures the text.

Returns:

DiagramConnectionEditableSettingsToolButtonBuilder<TShapeModel, TConnectionModel>

Example:
C#
@(Html.Kendo().Diagram()
.Name("diagram")
.Connections(c =&gt; c
.Add().Editable(e =&gt; e.Tools(tt =&gt; tt.Custom().Type("buttonGroup")
.Buttons(btn =&gt;
{
btn.Add().Text("Item 1");
})
))
)
)

Specifies whether the button must be togglable. For example, the button has a selected and unselected state.

C#
public DiagramConnectionEditableSettingsToolButtonBuilder<TShapeModel, TConnectionModel> Togglable(bool value)
Parameters:valuebool

The value that enables or disables the togglable option.

Returns:

DiagramConnectionEditableSettingsToolButtonBuilder<TShapeModel, TConnectionModel>

Example:
C#
@(Html.Kendo().Diagram()
.Name("diagram")
.Connections(c =&gt; c
.Add().Editable(e =&gt; e.Tools(tt =&gt; tt.Custom().Type("buttonGroup")
.Buttons(btn =&gt;
{
btn.Add().Text("Item 1").Togglable(true);
})
))
)
)

Specifies the "toggle" event handler of the button. The option is applicable only for buttons with option Togglable(true).

C#
public DiagramConnectionEditableSettingsToolButtonBuilder<TShapeModel, TConnectionModel> Toggle(Func<object, object> handler)
Parameters:handlerFunc<object, object>

The value that configures the toggle action.

Returns:

DiagramConnectionEditableSettingsToolButtonBuilder<TShapeModel, TConnectionModel>

Specifies the "toggle" event handler of the button. The option is applicable only for buttons with option Togglable(true).

C#
public DiagramConnectionEditableSettingsToolButtonBuilder<TShapeModel, TConnectionModel> Toggle(string handler)
Parameters:handlerstring

The value that configures the toggle action.

Returns:

DiagramConnectionEditableSettingsToolButtonBuilder<TShapeModel, TConnectionModel>

Example:
C#
@(Html.Kendo().Diagram()
.Name("diagram")
.Connections(c =&gt; c
.Add().Editable(e =&gt; e.Tools(tt =&gt; tt.Custom().Type("buttonGroup")
.Buttons(btn =&gt;
{
btn.Add().Text("Item 1").Togglable(true).Toggle("onToggleItem");
})
))
)
)

Specifies the URL of the button to navigate to.

C#
public DiagramConnectionEditableSettingsToolButtonBuilder<TShapeModel, TConnectionModel> Url(string value)
Parameters:valuestring

The value that configures the URL.

Returns:

DiagramConnectionEditableSettingsToolButtonBuilder<TShapeModel, TConnectionModel>

Example:
C#
@(Html.Kendo().Diagram()
.Name("diagram")
.Connections(c =&gt; c
.Add().Editable(e =&gt; e.Tools(tt =&gt; tt.Custom().Type("buttonGroup")
.Buttons(btn =&gt;
{
btn.Add().Text("Item 1").Url("URL value");
})
))
)
)