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

Defines the fluent API for configuring the Kendo UI SmartPasteButton

Definition

Namespace:Kendo.Mvc.UI.Fluent

Assembly:Kendo.Mvc.dll

Syntax:

C#
public class SmartPasteButtonBuilder : WidgetBuilderBase<SmartPasteButton, SmartPasteButtonBuilder>, IHtmlContent

Inheritance: objectHelperResultWidgetBuilderBase<SmartPasteButton, SmartPasteButtonBuilder>SmartPasteButtonBuilder

Implements: IHtmlContent

Inherited Members WidgetBuilderBase<SmartPasteButton, SmartPasteButtonBuilder>.ToComponent()WidgetBuilderBase<SmartPasteButton, SmartPasteButtonBuilder>.Expression(string)WidgetBuilderBase<SmartPasteButton, SmartPasteButtonBuilder>.Explorer(ModelExplorer)WidgetBuilderBase<SmartPasteButton, SmartPasteButtonBuilder>.Name(string)WidgetBuilderBase<SmartPasteButton, SmartPasteButtonBuilder>.Deferred(bool)WidgetBuilderBase<SmartPasteButton, SmartPasteButtonBuilder>.HtmlAttributes(object)WidgetBuilderBase<SmartPasteButton, SmartPasteButtonBuilder>.HtmlAttributes(IDictionary<string, object>)WidgetBuilderBase<SmartPasteButton, SmartPasteButtonBuilder>.ScriptAttributes(object, bool)WidgetBuilderBase<SmartPasteButton, SmartPasteButtonBuilder>.ScriptAttributes(IDictionary<string, object>, bool)WidgetBuilderBase<SmartPasteButton, SmartPasteButtonBuilder>.Render()WidgetBuilderBase<SmartPasteButton, SmartPasteButtonBuilder>.ToHtmlString()WidgetBuilderBase<SmartPasteButton, SmartPasteButtonBuilder>.WriteTo(TextWriter, HtmlEncoder)WidgetBuilderBase<SmartPasteButton, SmartPasteButtonBuilder>.ToClientTemplate()WidgetBuilderBase<SmartPasteButton, SmartPasteButtonBuilder>.AsModule(bool)WidgetBuilderBase<SmartPasteButton, SmartPasteButtonBuilder>.ComponentWidgetBuilderBase<SmartPasteButton, SmartPasteButtonBuilder>.ContainerHelperResult.WriteTo(TextWriter, HtmlEncoder)HelperResult.WriteActionobject.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 SmartPasteButtonBuilder class.

C#
public SmartPasteButtonBuilder(SmartPasteButton component)
Parameters:componentSmartPasteButton

Methods

Specifies the icon displayed when the button is in listening/processing state.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#
public SmartPasteButtonBuilder CancelIcon(Action<SmartPasteButtonCancelIconSettingsBuilder> configurator)
Parameters:configuratorAction<SmartPasteButtonCancelIconSettingsBuilder>

The SmartPasteButtonCancelIconSettingsBuilder for the cancelicon setting.

Returns:

SmartPasteButtonBuilder

Returns the current instance of SmartPasteButtonBuilder .

Specifies the icon displayed when the button is in listening/processing state.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#
public SmartPasteButtonBuilder CancelIcon(string cancelIcon)
Parameters:cancelIconstring

The cancelicon.

Returns:

SmartPasteButtonBuilder

Returns the current instance of SmartPasteButtonBuilder .

Specifies whether the SmartPasteButton widget will be enabled or disabled.

C#
public SmartPasteButtonBuilder Enable(bool value)
Parameters:valuebool

The value for Enable

Returns:

SmartPasteButtonBuilder

Returns the current SmartPasteButtonBuilder instance.

Defines a Kendo UI font or SVG icon that is rendered after the SmartPasteButton text.

C#
public SmartPasteButtonBuilder EndIcon(string value)
Parameters:valuestring

The value for EndIcon

Returns:

SmartPasteButtonBuilder

Returns the current SmartPasteButtonBuilder instance.

Configures the client-side events.

C#
public SmartPasteButtonBuilder Events(Action<SmartPasteButtonEventBuilder> configurator)
Parameters:configuratorAction<SmartPasteButtonEventBuilder>

The client events action.

Returns:

SmartPasteButtonBuilder

Returns the current SmartPasteButtonBuilder instance.

Example:
C#
@(Html.Kendo().SmartPasteButton()
.Name("SmartPasteButton")
.Events(events =&gt; events
.RequestStart("onRequestStart")
)
)

Sets a value controlling how the color is applied.

C#
public SmartPasteButtonBuilder FillMode(FillMode value)
Parameters:valueFillMode

The value for FillMode

Returns:

SmartPasteButtonBuilder

Returns the current SmartPasteButtonBuilder instance.

Specifies custom form field configurations for AI processing.

C#
public SmartPasteButtonBuilder FormFields(Action<SmartPasteButtonFormFieldFactory> configurator)
Parameters:configuratorAction<SmartPasteButtonFormFieldFactory>

The SmartPasteButtonFormFieldFactory for the formfields setting.

Returns:

SmartPasteButtonBuilder

Returns the current instance of SmartPasteButtonBuilder .

Specifies the icon displayed on the button in its default state.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#
public SmartPasteButtonBuilder Icon(Action<SmartPasteButtonIconSettingsBuilder> configurator)
Parameters:configuratorAction<SmartPasteButtonIconSettingsBuilder>

The SmartPasteButtonIconSettingsBuilder for the icon setting.

Returns:

SmartPasteButtonBuilder

Returns the current instance of SmartPasteButtonBuilder .

Specifies the icon displayed on the button in its default state.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#
public SmartPasteButtonBuilder Icon(string icon)
Parameters:iconstring

The icon.

Returns:

SmartPasteButtonBuilder

Returns the current instance of SmartPasteButtonBuilder .

Sets a value controlling the border radius.

C#
public SmartPasteButtonBuilder Rounded(Rounded value)
Parameters:valueRounded

The value for Rounded

Returns:

SmartPasteButtonBuilder

Returns the current SmartPasteButtonBuilder instance.

The AI service configuration for processing pasted content.

C#
public SmartPasteButtonBuilder Service(Action<SmartPasteButtonServiceSettingsBuilder> configurator)
Parameters:configuratorAction<SmartPasteButtonServiceSettingsBuilder>

The action that configures the service.

Returns:

SmartPasteButtonBuilder

Returns the current SmartPasteButtonBuilder instance.

Example:
C#
@(Html.Kendo().SmartPasteButton()
.Name("smartPaste")
.Service(service =&gt; service
.Url("api/llm")
)
)

The URL of the AI service to use for generating outputs.

C#
public SmartPasteButtonBuilder Service(string actionName, string controllerName, object routeValues)
Parameters:actionNamestring

The action name of the service setting.

controllerNamestring

The controller name of the service setting.

routeValuesobject

The route values of the service setting.

Returns:

SmartPasteButtonBuilder

Returns the current instance of SmartPasteButtonBuilder .

Example:
C#
@(Html.Kendo().SmartPasteButton()
.Name("smartPaste")
.Service("Paste", "SmartPaste", new object { Id = "1" })
)

The URL of the AI service to use for generating outputs.

C#
public SmartPasteButtonBuilder Service(string actionName, string controllerName, RouteValueDictionary routeValues)
Parameters:actionNamestring

The action name of the service setting.

controllerNamestring

The controller name of the service setting.

routeValuesRouteValueDictionary

The route values of the service setting.

Returns:

SmartPasteButtonBuilder

Returns the current instance of SmartPasteButtonBuilder .

Example:
C#
@(Html.Kendo().SmartPasteButton()
.Name("smartPaste")
.Service("Paste", "SmartPaste", new RouteValueDictionary{ {"id", 1} })
)

The URL of the AI service to use for generating outputs.

C#
public SmartPasteButtonBuilder Service(string actionName, string controllerName)
Parameters:actionNamestring

The action name of the service setting.

controllerNamestring

The controller name of the service setting.

Returns:

SmartPasteButtonBuilder

Returns the current instance of SmartPasteButtonBuilder .

Example:
C#
@(Html.Kendo().SmartPasteButton()
.Name("smartPaste")
.Service("Paste", "SmartPaste")
)

The URL of the AI service to use for generating outputs.

C#
public SmartPasteButtonBuilder Service(string value)
Parameters:valuestring

The url of the service setting.

Returns:

SmartPasteButtonBuilder

Returns the current instance of SmartPasteButtonBuilder .

Example:
C#
@(Html.Kendo().SmartPasteButton()
.Name("smartPaste")
.Service("llm/api")
)

Sets the size of the component.

C#
public SmartPasteButtonBuilder Size(ButtonSize value)
Parameters:valueButtonSize

The value for Size

Returns:

SmartPasteButtonBuilder

Returns the current SmartPasteButtonBuilder instance.

Specifies the text displayed on the button. If not set, the button will display only an icon.

C#
public SmartPasteButtonBuilder Text(string value)
Parameters:valuestring

The value for Text

Returns:

SmartPasteButtonBuilder

Returns the current SmartPasteButtonBuilder instance.

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

C#
public SmartPasteButtonBuilder ThemeColor(ThemeColor value)
Parameters:valueThemeColor

The value for ThemeColor

Returns:

SmartPasteButtonBuilder

Returns the current SmartPasteButtonBuilder instance.