PromptBoxBuilder
Defines the fluent API for configuring the Kendo UI PromptBox
Definition
Namespace:Kendo.Mvc.UI.Fluent
Assembly:Kendo.Mvc.dll
Syntax:
public class PromptBoxBuilder : WidgetBuilderBase<PromptBox, PromptBoxBuilder>, IHtmlContent
Inheritance: objectHelperResultWidgetBuilderBase<PromptBox, PromptBoxBuilder>PromptBoxBuilder
Implements:
Inherited Members
Constructors
Initializes a new instance of the PromptBoxBuilder class.
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.
public PromptBoxBuilder ActionButton(Action<PromptBoxActionButtonSettingsBuilder> configurator)
The PromptBoxActionButtonSettingsBuilder for the actionbutton setting.
Returns:Returns the current instance of 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.
public PromptBoxBuilder Enable(bool value)
The value for Enable
Returns:Returns the current PromptBoxBuilder instance.
Defines a custom template for the end affix area. The end affix is positioned after the input field and typically contains action buttons.When the built-in PromptBox buttons are enabled, the authored end-affix content stays in place and the framework backfills any missing built-in controls after it inside the same end-affix container. To adopt a custom element instead of the default control, include ref-promptbox-send-button, ref-promptbox-file-select-button, or ref-promptbox-speech-to-text-button on the authored element.
public PromptBoxBuilder EndAffixTemplate<TModel>(TemplateBuilder<TModel> template)
A Template component that configures the endaffixtemplate.
Returns:Returns the current PromptBoxBuilder instance.
Defines a custom template for the end affix area. The end affix is positioned after the input field and typically contains action buttons.When the built-in PromptBox buttons are enabled, the authored end-affix content stays in place and the framework backfills any missing built-in controls after it inside the same end-affix container. To adopt a custom element instead of the default control, include ref-promptbox-send-button, ref-promptbox-file-select-button, or ref-promptbox-speech-to-text-button on the authored element.
public PromptBoxBuilder EndAffixTemplateHandler(string templateHandler)
The handler that returs the template for EndAffixTemplate
Returns:Returns the current PromptBoxBuilder instance.
Configures the client-side events.
public PromptBoxBuilder Events(Action<PromptBoxEventBuilder> configurator)
The client events action.
Returns:Returns the current PromptBoxBuilder instance.
Controls the visibility and configuration of the File Select button in the end affix. When enabled, users can attach files to their prompts.
public PromptBoxBuilder FileSelectButton()
Returns the current instance of PromptBoxFileSelectButtonSettingsBuilder .
Controls the visibility and configuration of the File Select button in the end affix. When enabled, users can attach files to their prompts.
public PromptBoxBuilder FileSelectButton(Action<PromptBoxFileSelectButtonSettingsBuilder> configurator)
The PromptBoxFileSelectButtonSettingsBuilder for the fileselectbutton setting.
Returns:Returns the current instance of PromptBoxBuilder .
Controls the visibility and configuration of the File Select button in the end affix. When enabled, users can attach files to their prompts.
public PromptBoxBuilder FileSelectButton(bool enabled)
Enables or disables the fileselectbutton option.
Returns:Returns the current instance of PromptBoxFileSelectButtonSettingsBuilder .
Defines the fill mode for the PromptBox container.
public PromptBoxBuilder FillMode(FillMode value)
The value for FillMode
Returns:Returns the current PromptBoxBuilder instance.
Sets the loading state of the Action button. When true, the button displays a stop icon and allows users to cancel ongoing generation.
Sets the loading state of the Action button. When true, the button displays a stop icon and allows users to cancel ongoing generation.
public PromptBoxBuilder Loading(bool value)
The value for Loading
Returns:Returns the current PromptBoxBuilder instance.
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.
public PromptBoxBuilder MaxTextAreaHeight(double value)
The value for MaxTextAreaHeight
Returns:Returns the current PromptBoxBuilder instance.
Defines the localization messages for the PromptBox.
public PromptBoxBuilder Messages(Action<PromptBoxMessagesSettingsBuilder> configurator)
The PromptBoxMessagesSettingsBuilder for the messages setting.
Returns:Returns the current instance of 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.
public PromptBoxBuilder Mode(PromptBoxMode value)
The value for Mode
Returns:Returns the current PromptBoxBuilder instance.
Sets the placeholder text displayed in the PromptBox when it is empty.
public PromptBoxBuilder Placeholder(string value)
The value for Placeholder
Returns:Returns the current PromptBoxBuilder instance.
Sets the read-only state of the PromptBox. When set to true, the PromptBox content cannot be modified but remains accessible.
Sets the read-only state of the PromptBox. When set to true, the PromptBox content cannot be modified but remains accessible.
public PromptBoxBuilder Readonly(bool value)
The value for Readonly
Returns:Returns the current PromptBoxBuilder instance.
Sets the number of visible text lines in the textarea. Applies only when the mode is set to "multi".
public PromptBoxBuilder Rows(double value)
The value for Rows
Returns:Returns the current PromptBoxBuilder instance.
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.
public PromptBoxBuilder SpeechToTextButton(Action<PromptBoxSpeechToTextButtonSettingsBuilder> configurator)
The PromptBoxSpeechToTextButtonSettingsBuilder for the speechtotextbutton setting.
Returns:Returns the current instance of 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.
public PromptBoxBuilder SpeechToTextButton(bool enabled)
Enables or disables the speechtotextbutton option.
Returns:Returns the current instance of PromptBoxSpeechToTextButtonSettingsBuilder .
Defines a custom template for the start affix area. The start affix is positioned before the input field.
public PromptBoxBuilder StartAffixTemplate<TModel>(TemplateBuilder<TModel> template)
A Template component that configures the startaffixtemplate.
Returns:Returns the current PromptBoxBuilder instance.
Defines a custom template for the start affix area. The start affix is positioned before the input field.
public PromptBoxBuilder StartAffixTemplateHandler(string templateHandler)
The handler that returs the template for StartAffixTemplate
Returns:Returns the current PromptBoxBuilder instance.
Sets the title attribute of the input or textarea element.
public PromptBoxBuilder Title(string value)
The value for Title
Returns:Returns the current PromptBoxBuilder instance.
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.
public PromptBoxBuilder TopAffixTemplate<TModel>(TemplateBuilder<TModel> template)
A Template component that configures the topaffixtemplate.
Returns:Returns the current PromptBoxBuilder instance.
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.
public PromptBoxBuilder TopAffixTemplateHandler(string templateHandler)
The handler that returs the template for TopAffixTemplate
Returns:Returns the current PromptBoxBuilder instance.
Sets the value of the PromptBox.
public PromptBoxBuilder Value(string value)
The value for Value
Returns:Returns the current PromptBoxBuilder instance.