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

Kendo UI SplitButton TagHelper SplitButtonTagHelper class.

Definition

Namespace:Kendo.Mvc.TagHelpers

Assembly:Kendo.Mvc.dll

Syntax:

C#
[HtmlTargetElement("kendo-splitbutton")]
[RestrictChildren("splitbutton-items", new string[] { "popup", "messages", "item-template", "arrow-icon", "icon" })]
public class SplitButtonTagHelper : TagHelperBase, ITagHelper, ITagHelperComponent, ITemplateComponent

Inheritance: objectTagHelperTagHelperBaseSplitButtonTagHelper

Implements: ITagHelperITagHelperComponentITemplateComponent

Inherited Members TagHelperBase.MinimumValidatorTagHelperBase.MaximumValidatorTagHelperBase.Init(TagHelperContext)TagHelperBase.Process(TagHelperContext, TagHelperOutput)TagHelperBase.GetInitializator()TagHelperBase.VerifySettings()TagHelperBase.SerializeTemplates()TagHelperBase.GenerateId(TagHelperOutput)TagHelperBase.CreateHandler(string)TagHelperBase.GetRangeValidationParameter<TValue>(ModelExplorer, string)TagHelperBase.ExtractEditFormat(string)TagHelperBase.ToDictionaryHandler(IDictionary<string, string>)TagHelperBase.AddSelfToTemplate(TagHelperContext)TagHelperBase.ViewContextTagHelperBase.GeneratorTagHelperBase.InitializerTagHelperBase.WriterTagHelperBase.ScriptAttributesTagHelperBase.NameTagHelperBase.IdTagHelperBase.SelectorTagHelperBase.IdPrefixTagHelperBase.IsInClientTemplateTagHelperBase.DeferredTagHelperBase.AsModuleTagHelper.Orderobject.GetType()object.MemberwiseClone()object.ToString()object.Equals(object)object.Equals(object, object)object.ReferenceEquals(object, object)object.GetHashCode()...

Example:

csharp
@addTagHelper *, Kendo.Mvc

<kendo-splitbutton name="splitButton" text="Paste" icon="clipboard">
       <splitbutton-items>
           <item id="keep-text" text="Keep Text Only" icon="clipboard-text"></item>
           <item id="paste-html" text="Paste as HTML" icon="clipboard-code"></item>
           <item id="paste-markdown" text="Paste Markdown" icon="clipboard-markdown"></item>
           <item id="paste-default" text="Set Default Paste"></item>
       </splitbutton-items>
   </kendo-splitbutton>

Constructors

Initializes a new instance of the SplitButtonTagHelper class.

C#
public SplitButtonTagHelper(IKendoHtmlGenerator generator)
Parameters:generatorIKendoHtmlGenerator

Properties

The icon rendered for the arrow button of the SplitButton.Set this option to an icon descriptor such as { name: "gear", variant: "outline" }. The variant can be outline, solid, or duotone; it applies to SVG rendering and is ignored for font icons.

C#
[HtmlAttributeName("arrow-icon")]
public string ArrowIcon { get; set; }

Indicates whether the SplitButton should be enabled or disabled. By default, it is enabled, unless a disabled="disabled" attribute is detected.

C#
public bool? Enabled { get; set; }

Defines a Kendo UI font or SVG icon that is rendered after the text of the main SplitButton button. The arrow button is not affected.

C#
public string EndIcon { get; set; }

Sets a value controlling how the color is applied.

C#
public FillMode? FillMode { get; set; }

Defines a name of an existing icon in the Kendo UI theme sprite. The icon will be applied as background image of a span element inside the SplitButton. The span element can be added automatically by the widget, or an existing element can be used, if it has a k-icon CSS class applied. For a list of available icon names, please refer to the Icons demo.Set this option to an icon descriptor such as { name: "gear", variant: "outline" }. The variant can be outline, solid, or duotone; it applies to SVG rendering and is ignored for font icons.

C#
[HtmlAttributeName("icon")]
public string Icon { get; set; }

Defines a CSS class - or multiple classes separated by spaced - which are applied to a span element inside the SplitButton. Allows the usage of custom icons.

C#
public string IconClass { get; set; }

Defines a URL, which will be used for an img element inside the SplitButton. The URL can be relative or absolute. In case it is relative, it will be evaluated with relation to the web page URL.The img element can be added automatically by the widget, or an existing element can be used, if it has a k-image CSS class applied.

C#
public string ImageUrl { get; set; }

Specifies a custom template for the menu items.

C#
public string ItemTemplate { get; set; }

Specifies a custom template for the menu items. This option expects the name of a JavaScript function that will be called to return the template.

C#
public string ItemTemplateHandler { get; set; }

Specifies a custom template for the menu items. This option expects the ID of the script element that contains the template.

C#
public string ItemTemplateId { get; set; }

Specifies a custom template for the menu items. This option expects the IHtmlContent instance containing the created HTML.

C#
public IHtmlContent ItemTemplateView { get; set; }

The name of the JavaScript function that will handle the click event. Fires when the SplitButton or any if its items is clicked with the mouse, touched on a touch device, or ENTER (or SPACE) is pressed while the SplitButton or an item is focused.

C#
public string OnClick { get; set; }

The name of the JavaScript function that will handle the close event. Fires when the menu button is closed.

C#
public string OnClose { get; set; }

The name of the JavaScript function that will handle the open event. Fires when the menu button is opened.

C#
public string OnOpen { get; set; }

Sets a value controlling the border radius.

C#
public Rounded? Rounded { get; set; }

Sets the size of the component.

C#
public ComponentSize? Size { get; set; }

Defines a CSS class (or multiple classes separated by spaces), which will be used for applying a background image to a span element inside the SplitButton. In case you want to use an icon from the Kendo UI theme sprite background image, it is easier to use the icon property.The span element can be added automatically by the widget, or an existing element can be used, if it has a k-sprite CSS class applied.

C#
public string SpriteCssClass { get; set; }

Represents a collection of templates defined for the component.

C#
[HtmlAttributeNotBound]
public IDictionary<string, string> Templates { get; }

Implements: ITemplateComponent.Templates

Text member.

C#
public string Text { get; set; }

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

C#
public ThemeColor? ThemeColor { get; set; }

Methods

Gets the initialization script.

C#
protected override string GetInitializationScript()
Returns:

string

The initialization script.

Overrides: TagHelperBase.GetInitializationScript()

C#
public override Task ProcessAsync(TagHelperContext context, TagHelperOutput output)
Parameters:contextTagHelperContextoutputTagHelperOutputReturns:

Task

Overrides: TagHelper.ProcessAsync(TagHelperContext, TagHelperOutput)

Serializes the defined settings.

C#
public override IDictionary<string, object> Serialize()
Returns:

IDictionary<string, object>

Overrides: TagHelperBase.Serialize()

SerializeEvents method.

C#
protected override Dictionary<string, object> SerializeEvents()
Returns:

Dictionary<string, object>

Overrides: TagHelperBase.SerializeEvents()

SerializeSettings method.

C#
protected override Dictionary<string, object> SerializeSettings()
Returns:

Dictionary<string, object>

Overrides: TagHelperBase.SerializeSettings()

Writes the HTML output.

C#
protected override void WriteHtml(TagHelperOutput output)
Parameters:outputTagHelperOutput

The TagHelper output.

Overrides: TagHelperBase.WriteHtml(TagHelperOutput)