ChipBuilder

Properties

WriteAction - Func

Methods

HtmlAttributes(System.Collections.Generic.IDictionary)

Defines custom attributes of the Chip's element.

Parameters

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

The value for HtmlAttributes

RETURNS

Returns the current instance of ChipBuilder for method chaining.

Example

Razor
 
                @(Html.Kendo().Chip()
                    .Name("chip")
                    .HtmlAttributes(new Dictionary<string, object>() { {"class", "foo"} })
                )
             

HtmlAttributes(System.Object)

Defines custom attributes of the Chip's element.

Parameters

attributes - System.Object

The value for HtmlAttributes

RETURNS

Returns the current instance of ChipBuilder for method chaining.

Example

Razor
 
                @(Html.Kendo().Chip()
                    .Name("chip")
                    .HtmlAttributes(new { @class = "foo" })
                )
             

Icon(System.String)

Defines the name for an existing icon in a Kendo UI theme or SVG content. The icon is rendered inside the chip by a span.k-icon or span.k-svg-icon element.See web font icons help article for more details on Kendo UI icons.

Parameters

value - System.String

The value for Icon

RETURNS

Returns the current ChipBuilder instance.

IconClass(System.String)

If set, value will be appended to the icon's element class attribute.

Parameters

value - System.String

The value for IconClass

RETURNS

Returns the current ChipBuilder instance.

AvatarClass(System.String)

If set, value will be appended to the icon's element class attribute. It also appends "k-chip avatar" and "k-avatar" classes to the icon's element.

Parameters

value - System.String

The value for AvatarClass

RETURNS

Returns the current ChipBuilder instance.

RemoveIcon(System.String)

Defines the name for an existing icon in a Kendo UI theme or SVG content for the remove button when removable=true. The icon is rendered inside the chip by a span.k-icon or span.k-svg-icon element.See web font icons help article for more details on Kendo UI icons.

Parameters

value - System.String

The value for RemoveIcon

RETURNS

Returns the current ChipBuilder instance.

RemoveIconClass(System.String)

If set, value will be appended to the remove icon's element class attribute.

Parameters

value - System.String

The value for RemoveIconClass

RETURNS

Returns the current ChipBuilder instance.

Label(System.String)

The label text of the chip. Default is empty string.

Parameters

value - System.String

The value for Label

RETURNS

Returns the current ChipBuilder instance.

Removable(System.Boolean)

Specifies if the Chip will be removable or not. If the property is set to true, the Chip renders a remove icon.

Parameters

value - System.Boolean

The value for Removable

RETURNS

Returns the current ChipBuilder instance.

Removable()

Specifies if the Chip will be removable or not. If the property is set to true, the Chip renders a remove icon.

RETURNS

Returns the current ChipBuilder instance.

Selectable(System.Boolean)

Sets whether the Chip can be selected.

Parameters

value - System.Boolean

The value for Selectable

RETURNS

Returns the current ChipBuilder instance.

Selectable()

Sets whether the Chip can be selected.

RETURNS

Returns the current ChipBuilder instance.

Selected(System.Boolean)

Toggles the selected state of the Chip.

Parameters

value - System.Boolean

The value for Selected

RETURNS

Returns the current ChipBuilder instance.

Selected()

Toggles the selected state of the Chip.

RETURNS

Returns the current ChipBuilder instance.

Enabled(System.Boolean)

Toggles the enabled state of the Chip.

Parameters

value - System.Boolean

The value for Enabled

RETURNS

Returns the current ChipBuilder instance.

Size(Kendo.Mvc.UI.ComponentSize)

Sets the size of the component.

Parameters

value - ComponentSize

The value for Size

RETURNS

Returns the current ChipBuilder instance.

Rounded(Kendo.Mvc.UI.Rounded)

Sets a value controlling the border radius.

Parameters

value - Rounded

The value for Rounded

RETURNS

Returns the current ChipBuilder instance.

FillMode(Kendo.Mvc.UI.ChipFillMode)

Sets a value controlling how the color is applied.

Parameters

value - ChipFillMode

The value for FillMode

RETURNS

Returns the current ChipBuilder instance.

ThemeColor(Kendo.Mvc.UI.ChipThemeColor)

Sets the color of the component according to the applied theme.

Parameters

value - ChipThemeColor

The value for ThemeColor

RETURNS

Returns the current ChipBuilder instance.

Events(System.Action)

Configures the client-side events.

Parameters

configurator - System.Action<ChipEventBuilder>

The client events action.

RETURNS

Returns the current ChipBuilder instance.

Example

Razor
 
            @(Html.Kendo().Chip()
                  .Name("Chip")
                  .Events(events => events
                      .Click("onClick")
                  )
            )
             

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.

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.