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

Defines the fluent API for configuring the Kendo SmartPasteButton for ASP.NET MVC.

Definition

Namespace:Kendo.Mvc.UI.Fluent

Assembly:Kendo.Mvc.dll

Syntax:

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

Inheritance: objectWidgetBuilderBase<SmartPasteButton, SmartPasteButtonBuilder>SmartPasteButtonBuilder

Implements: IHtmlString

Inherited Members WidgetBuilderBase<SmartPasteButton, SmartPasteButtonBuilder>.ToComponent()WidgetBuilderBase<SmartPasteButton, SmartPasteButtonBuilder>.Name(string)WidgetBuilderBase<SmartPasteButton, SmartPasteButtonBuilder>.Deferred(bool)WidgetBuilderBase<SmartPasteButton, SmartPasteButtonBuilder>.ModelMetadata(ModelMetadata)WidgetBuilderBase<SmartPasteButton, SmartPasteButtonBuilder>.HtmlAttributes(object)WidgetBuilderBase<SmartPasteButton, SmartPasteButtonBuilder>.HtmlAttributes(IDictionary<string, object>)WidgetBuilderBase<SmartPasteButton, SmartPasteButtonBuilder>.AsModule(bool)WidgetBuilderBase<SmartPasteButton, SmartPasteButtonBuilder>.Render()WidgetBuilderBase<SmartPasteButton, SmartPasteButtonBuilder>.ScriptAttributes(object, bool)WidgetBuilderBase<SmartPasteButton, SmartPasteButtonBuilder>.ScriptAttributes(IDictionary<string, object>, bool)WidgetBuilderBase<SmartPasteButton, SmartPasteButtonBuilder>.ToHtmlString()WidgetBuilderBase<SmartPasteButton, SmartPasteButtonBuilder>.ToClientTemplate()WidgetBuilderBase<SmartPasteButton, SmartPasteButtonBuilder>.ToString()WidgetBuilderBase<SmartPasteButton, SmartPasteButtonBuilder>.Componentobject.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 SmartPasteButton class.

C#
public SmartPasteButtonBuilder(SmartPasteButton component)
Parameters:componentSmartPasteButton

The component.

Methods

Specifies the icon displayed when the button is in listening/processing state.

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

The value that configures the cancelicon.

Returns:

SmartPasteButtonBuilder

Specifies whether the SmartPasteButton widget will be enabled or disabled.

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

The value that configures the enable.

Returns:

SmartPasteButtonBuilder

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 the border radius.

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

The value for Rounded

Returns:

SmartPasteButtonBuilder

Returns the current SmartPasteButtonBuilder instance.

Example:
C#
@(Html.Kendo().SmartPasteButton()
.Name("smartPaste")
.FillMode(FillMode.Outline)

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 SmartPasteButtonBuilder instance.

Example:
C#
@(Html.Kendo().SmartPasteButton()
.Name("SmartPasteButton")
.FormFields(f =&gt;
f.Add().Field("Name")
.Description("Generate a name different from Michael Scott")
.Type(typeof(string).Name)
)
)

Specifies the icon displayed on the button in its default state.

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

The value that configures the icon.

Returns:

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.

Example:
C#
@(Html.Kendo().SmartPasteButton()
.Name("smartPaste")
.Rounded(Rounded.Full)

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")
)
)

Specifies the URL of the AI service for processing pasted content.

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

The name of tha action.

controllerNamestring

The name of the controller.

routeValuesobject

The route values.

Returns:

SmartPasteButtonBuilder

Returns the current instance of SmartPasteButtonBuilder .

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

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

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

The name of tha action.

controllerNamestring

The name of the controller.

routeValuesRouteValueDictionary

The route values.

Returns:

SmartPasteButtonBuilder

Returns the current instance of SmartPasteButtonBuilder .

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

Specifies the URL of the AI service for processing pasted content.

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

The name of the action.

controllerNamestring

The name of the controller.

Returns:

SmartPasteButtonBuilder

Returns the current instance of SmartPasteButtonBuilder .

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

Specifies the URL of the AI service for processing pasted content.

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

The URL.

Returns:

SmartPasteButtonBuilder

Returns the current instance of SmartPasteButtonBuilder .

Example:
C#
@(Html.Kendo().SmartPasteButton()
.Name("smartPaste")
.Service("api/llm")
)
C#
public SmartPasteButtonBuilder Size(ButtonSize value)
Parameters:valueButtonSizeReturns:

SmartPasteButtonBuilder

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 that configures the text.

Returns:

SmartPasteButtonBuilder

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.

Example:
C#
@(Html.Kendo().SmartPasteButton()
.Name("smartPaste")
.ThemeColor(ThemeColor.Primary)