PromptBoxBuilder
Properties
WriteAction - Func
Methods
ActionButton(System.Action)
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.
Parameters
configurator - System.Action<PromptBoxActionButtonSettingsBuilder>
The configurator for the actionbutton setting.
RETURNS
Returns the current instance of PromptBoxBuilder .
Enable(System.Boolean)
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.
Parameters
value - System.Boolean
The value for Enable
RETURNS
Returns the current PromptBoxBuilder instance.
EndAffixTemplateHandler(System.String)
Defines a custom template for the end affix area. The end affix is positioned after the input field and typically contains action buttons.
Parameters
templateHandler - System.String
The handler that returs the template for EndAffixTemplate
RETURNS
Returns the current PromptBoxBuilder instance.
EndAffixTemplate(Kendo.Mvc.UI.Fluent.TemplateBuilder)
Defines a custom template for the end affix area. The end affix is positioned after the input field and typically contains action buttons.
Parameters
template - TemplateBuilder<TModel>
A Template component that configures the endaffixtemplate.
RETURNS
Returns the current PromptBoxBuilder instance.
FileSelectButton(System.Action)
Controls the visibility and configuration of the File Select button in the end affix. When enabled, users can attach files to their prompts.
Parameters
configurator - System.Action<PromptBoxFileSelectButtonSettingsBuilder>
The configurator for the fileselectbutton setting.
RETURNS
Returns the current instance of PromptBoxBuilder .
FileSelectButton()
Controls the visibility and configuration of the File Select button in the end affix. When enabled, users can attach files to their prompts.
RETURNS
Returns the current instance of PromptBoxBuilder .
FileSelectButton(System.Boolean)
Controls the visibility and configuration of the File Select button in the end affix. When enabled, users can attach files to their prompts.
Parameters
enabled - System.Boolean
Enables or disables the fileselectbutton option.
RETURNS
Returns the current instance of PromptBoxFileSelectButtonSettingsBuilder .
FillMode(Kendo.Mvc.UI.FillMode)
Defines the fill mode for the PromptBox container.
Parameters
value - FillMode
The value for FillMode
RETURNS
Returns the current PromptBoxBuilder instance.
Loading(System.Boolean)
Sets the loading state of the Action button. When true, the button displays a stop icon and allows users to cancel ongoing generation.
Parameters
value - System.Boolean
The value for Loading
RETURNS
Returns the current PromptBoxBuilder instance.
Loading()
Sets the loading state of the Action button. When true, the button displays a stop icon and allows users to cancel ongoing generation.
RETURNS
Returns the current PromptBoxBuilder instance.
MaxTextAreaHeight(System.Double)
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.
Parameters
value - System.Double
The value for MaxTextAreaHeight
RETURNS
Returns the current PromptBoxBuilder instance.
Messages(System.Action)
Defines the localization messages for the PromptBox.
Parameters
configurator - System.Action<PromptBoxMessagesSettingsBuilder>
The configurator for the messages setting.
RETURNS
Returns the current instance of PromptBoxBuilder .
Mode(Kendo.Mvc.UI.PromptBoxMode)
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.
Parameters
value - PromptBoxMode
The value for Mode
RETURNS
Returns the current PromptBoxBuilder instance.
Placeholder(System.String)
Sets the placeholder text displayed in the PromptBox when it is empty.
Parameters
value - System.String
The value for Placeholder
RETURNS
Returns the current PromptBoxBuilder instance.
Readonly(System.Boolean)
Sets the read-only state of the PromptBox. When set to true, the PromptBox content cannot be modified but remains accessible.
Parameters
value - System.Boolean
The value for Readonly
RETURNS
Returns the current PromptBoxBuilder instance.
Readonly()
Sets the read-only state of the PromptBox. When set to true, the PromptBox content cannot be modified but remains accessible.
RETURNS
Returns the current PromptBoxBuilder instance.
Rows(System.Double)
Sets the number of visible text lines in the textarea. Applies only when the mode is set to "multi".
Parameters
value - System.Double
The value for Rows
RETURNS
Returns the current PromptBoxBuilder instance.
SpeechToTextButton(System.Action)
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.
Parameters
configurator - System.Action<PromptBoxSpeechToTextButtonSettingsBuilder>
The configurator for the speechtotextbutton setting.
RETURNS
Returns the current instance of PromptBoxBuilder .
SpeechToTextButton(System.Boolean)
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.
Parameters
enabled - System.Boolean
Enables or disables the speechtotextbutton option.
RETURNS
Returns the current instance of PromptBoxSpeechToTextButtonSettingsBuilder .
StartAffixTemplateHandler(System.String)
Defines a custom template for the start affix area. The start affix is positioned before the input field.
Parameters
templateHandler - System.String
The handler that returs the template for StartAffixTemplate
RETURNS
Returns the current PromptBoxBuilder instance.
StartAffixTemplate(Kendo.Mvc.UI.Fluent.TemplateBuilder)
Defines a custom template for the start affix area. The start affix is positioned before the input field.
Parameters
template - TemplateBuilder<TModel>
A Template component that configures the startaffixtemplate.
RETURNS
Returns the current PromptBoxBuilder instance.
Title(System.String)
Sets the title attribute of the input or textarea element.
Parameters
value - System.String
The value for Title
RETURNS
Returns the current PromptBoxBuilder instance.
TopAffixTemplateHandler(System.String)
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.
Parameters
templateHandler - System.String
The handler that returs the template for TopAffixTemplate
RETURNS
Returns the current PromptBoxBuilder instance.
TopAffixTemplate(Kendo.Mvc.UI.Fluent.TemplateBuilder)
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.
Parameters
template - TemplateBuilder<TModel>
A Template component that configures the topaffixtemplate.
RETURNS
Returns the current PromptBoxBuilder instance.
Value(System.String)
Sets the value of the PromptBox.
Parameters
value - System.String
The value for Value
RETURNS
Returns the current PromptBoxBuilder instance.
Events(System.Action)
Configures the client-side events.
Parameters
configurator - System.Action<PromptBoxEventBuilder>
The client events action.
RETURNS
Returns the current PromptBoxBuilder instance.
Example
@(Html.Kendo().PromptBox()
.Name("PromptBox")
.Events(events => events
.Blur("onBlur")
)
)
ToComponent()
Returns the internal view component.
RETURNS
The instance that represents the component.
Expression(System.String)
Sets the name of the component.
Parameters
modelExpression - System.String
RETURNS
Returns the current instance.
Explorer(Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer)
Sets the name of the component.
Parameters
modelExplorer - Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer
RETURNS
Returns the current instance.
Name(System.String)
Sets the name of the component.
Parameters
componentName - System.String
The name.
RETURNS
Returns the current instance.
Deferred(System.Boolean)
Suppress initialization script rendering. Note that this options should be used in conjunction with
Parameters
deferred - System.Boolean
RETURNS
Returns a DeferredWidgetBuilder instance.
HtmlAttributes(System.Object)
Sets the HTML attributes.
Parameters
attributes - System.Object
The HTML attributes.
RETURNS
Returns the current instance.
HtmlAttributes(System.Collections.Generic.IDictionary)
Sets the HTML attributes.
Parameters
attributes - System.Collections.Generic.IDictionary<String,Object>
The HTML attributes.
RETURNS
Returns the current instance.
ScriptAttributes(System.Object,System.Boolean)
Sets the JavaScript attributes to the initialization script.
Parameters
attributes - System.Object
The JavaScript attributes.
overrideAttributes - System.Boolean
Argument which determines whether attributes should be overriden.
RETURNS
Returns the current instance.
ScriptAttributes(System.Collections.Generic.IDictionary,System.Boolean)
Sets the JavaScript attributes to the initialization script.
Parameters
attributes - System.Collections.Generic.IDictionary<String,Object>
The JavaScript attributes.
overrideAttributes - System.Boolean
Argument which determines whether attributes should be overriden.
RETURNS
Returns the current instance.
Render()
Renders the component in place.
ToHtmlString()
Returns the HTML representation of the component.
WriteTo(System.IO.TextWriter,System.Text.Encodings.Web.HtmlEncoder)
Parameters
writer - System.IO.TextWriter
encoder - System.Text.Encodings.Web.HtmlEncoder
ToClientTemplate()
Returns the client template for the component.
AsModule(System.Boolean)
Specifies whether the initialization script of the component will be rendered as a JavaScript module.
Parameters
value - System.Boolean
RETURNS
Returns the current instance.