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

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

Definition

Constructors

Initializes a new instance of the PromptBox class.

C#
public PromptBoxBuilder(PromptBox component)
Parameters:componentPromptBox

The component.

Methods

Configures the Action button (send/stop) in the end affix. The button is always visible. When null or not configured, the button is enabled by default. Use { enable: false } to disable it.

C#
public PromptBoxBuilder ActionButton(Action<PromptBoxActionButtonSettingsBuilder> configurator)
Parameters:configuratorAction<PromptBoxActionButtonSettingsBuilder>

The action that configures the actionbutton.

Returns:

PromptBoxBuilder

If set to false, the widget will be disabled and will not allow user input. The widget is enabled by default and allows user input.

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

The value that configures the enable.

Returns:

PromptBoxBuilder

Defines a custom template for the end affix area. The end affix is positioned after the input field and typically contains action buttons.

C#
public PromptBoxBuilder EndAffixTemplate<TModel>(TemplateBuilder<TModel> template)
Parameters:templateTemplateBuilder<TModel>

A Template component that configures the endaffixtemplate.

Returns:

PromptBoxBuilder

Defines a custom template for the end affix area. The end affix is positioned after the input field and typically contains action buttons.

C#
public PromptBoxBuilder EndAffixTemplateHandler(string value)
Parameters:valuestring

The value that configures the endaffixtemplate.

Returns:

PromptBoxBuilder

Configures the client-side events.

C#
public PromptBoxBuilder Events(Action<PromptBoxEventBuilder> configurator)
Parameters:configuratorAction<PromptBoxEventBuilder>

The client events action.

Returns:

PromptBoxBuilder

Example:
C#
@(Html.Kendo().PromptBox()
.Name("PromptBox")
.Events(events =&gt; events
.Blur("onBlur")
)
)

Controls the visibility and configuration of the File Select button in the end affix. When enabled, users can attach files to their prompts.

C#
public PromptBoxBuilder FileSelectButton()
Returns:

PromptBoxBuilder

Controls the visibility and configuration of the File Select button in the end affix. When enabled, users can attach files to their prompts.

C#
public PromptBoxBuilder FileSelectButton(Action<PromptBoxFileSelectButtonSettingsBuilder> configurator)
Parameters:configuratorAction<PromptBoxFileSelectButtonSettingsBuilder>

The action that configures the fileselectbutton.

Returns:

PromptBoxBuilder

Controls the visibility and configuration of the File Select button in the end affix. When enabled, users can attach files to their prompts.

C#
public PromptBoxBuilder FileSelectButton(bool enabled)
Parameters:enabledbool

Enables or disables the fileselectbutton option.

Returns:

PromptBoxBuilder

Defines the fill mode for the PromptBox container.

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

The value that configures the fillmode.

Returns:

PromptBoxBuilder

Sets the loading state of the Action button. When true, the button displays a stop icon and allows users to cancel ongoing generation.

C#
public PromptBoxBuilder Loading(bool value)
Parameters:valuebool

The value that configures the loading.

Returns:

PromptBoxBuilder

Sets the maximum height of the textarea in pixels. The textarea resizes automatically until it reaches this height. When the content exceeds this height, a scrollbar appears.

C#
public PromptBoxBuilder MaxTextAreaHeight(double value)
Parameters:valuedouble

The value that configures the maxtextareaheight.

Returns:

PromptBoxBuilder

Defines the localization messages for the PromptBox.

C#
public PromptBoxBuilder Messages(Action<PromptBoxMessagesSettingsBuilder> configurator)
Parameters:configuratorAction<PromptBoxMessagesSettingsBuilder>

The action that configures the messages.

Returns:

PromptBoxBuilder

Sets the mode of the PromptBox. Available options are "single", "multi", and "auto". single - Displays a single-line input field; multi - Displays a multi-line textarea with configurable rows or auto - Starts as a single line and expands automatically as the user types.

C#
public PromptBoxBuilder Mode(PromptBoxMode value)
Parameters:valuePromptBoxMode

The value that configures the mode.

Returns:

PromptBoxBuilder

Sets the placeholder text displayed in the PromptBox when it is empty.

C#
public PromptBoxBuilder Placeholder(string value)
Parameters:valuestring

The value that configures the placeholder.

Returns:

PromptBoxBuilder

Sets the read-only state of the PromptBox. When set to true, the PromptBox content cannot be modified but remains accessible.

C#
public PromptBoxBuilder Readonly(bool value)
Parameters:valuebool

The value that configures the readonly.

Returns:

PromptBoxBuilder

Sets the number of visible text lines in the textarea. Applies only when the mode is set to "multi".

C#
public PromptBoxBuilder Rows(double value)
Parameters:valuedouble

The value that configures the rows.

Returns:

PromptBoxBuilder

Configures the Speech to Text button in the end affix. The button is always visible. When null or not configured, the button is enabled by default. Use { enable: false } to disable it.

C#
public PromptBoxBuilder SpeechToTextButton(Action<PromptBoxSpeechToTextButtonSettingsBuilder> configurator)
Parameters:configuratorAction<PromptBoxSpeechToTextButtonSettingsBuilder>

The action that configures the speechtotextbutton.

Returns:

PromptBoxBuilder

Configures the Speech to Text button in the end affix. The button is always visible. When null or not configured, the button is enabled by default. Use { enable: false } to disable it.

C#
public PromptBoxBuilder SpeechToTextButton(bool enabled)
Parameters:enabledbool

Enables or disables the speechtotextbutton option.

Returns:

PromptBoxBuilder

Defines a custom template for the start affix area. The start affix is positioned before the input field.

C#
public PromptBoxBuilder StartAffixTemplate<TModel>(TemplateBuilder<TModel> template)
Parameters:templateTemplateBuilder<TModel>

A Template component that configures the startaffixtemplate.

Returns:

PromptBoxBuilder

Defines a custom template for the start affix area. The start affix is positioned before the input field.

C#
public PromptBoxBuilder StartAffixTemplateHandler(string value)
Parameters:valuestring

The value that configures the startaffixtemplate.

Returns:

PromptBoxBuilder

Sets the title attribute of the input or textarea element.

C#
public PromptBoxBuilder Title(string value)
Parameters:valuestring

The value that configures the title.

Returns:

PromptBoxBuilder

Defines a custom template for the top affix area. The top affix is positioned at the top of the content area in multi-line mode only.

C#
public PromptBoxBuilder TopAffixTemplate<TModel>(TemplateBuilder<TModel> template)
Parameters:templateTemplateBuilder<TModel>

A Template component that configures the topaffixtemplate.

Returns:

PromptBoxBuilder

Defines a custom template for the top affix area. The top affix is positioned at the top of the content area in multi-line mode only.

C#
public PromptBoxBuilder TopAffixTemplateHandler(string value)
Parameters:valuestring

The value that configures the topaffixtemplate.

Returns:

PromptBoxBuilder

Sets the value of the PromptBox.

C#
public PromptBoxBuilder Value(string value)
Parameters:valuestring

The value that configures the value.

Returns:

PromptBoxBuilder