TextBox

in namespace DotVVM.Framework.Controls.Bootstrap4

Extends the built-in TextBox control to allow applying Bootstrap CSS classes.

Usage & Scenarios

Extends the builtin TextBox control to allow sizing.

https://getbootstrap.com/docs/4.3/components/forms/#sizing

Sample 1: TextBox Sizing

Use the Size property to set the size of the TextBox.

<bs:TextBox Size="Small" Text="{value: Text}" />

<bs:TextBox Size="Default" Text="{value: Text}" />

<bs:TextBox Size="Large" Text="{value: Text}" />
using DotVVM.Framework.ViewModel;

namespace DotvvmWeb.Views.Docs.Controls.bootstrap4.TextxBox.sample1
{
    public class ViewModel : DotvvmViewModelBase
    {
        public string Text { get; set; }
    }
}

Properties

Name Type Description Notes Default Value
property icon Enabled Boolean Gets or sets a value indicating whether the control is enabled and can be modified.
attribute
inner element
static value
bindable
default
False
property icon FormatString String Gets or sets a format of presentation of value to client.
attribute
inner element
static value
bindable
default
null
property icon SelectAllOnFocus Boolean Gets or sets whether all text inside the TextBox becomes selected when the element gets focused.
attribute
inner element
static value
bindable
default
False
property icon Size Size Gets or sets the size of the TextBox.
attribute
inner element
static value
bindable
default
Default
property icon Text Object Gets or sets the text in the control.
attribute
inner element
static value
bindable
default
property icon Type TextBoxType Gets or sets the mode of the text field.
attribute
inner element
static value
bindable
default
Normal
property icon UpdateTextAfterKeydown Boolean Gets or sets whether the viewmodel property will be updated after the key is pressed. By default, the viewmodel is updated after the control loses its focus.
attribute
inner element
static value
bindable
default
False

Events

Name Type Description
event icon Changed Command Gets or sets the command that will be triggered when the control text is changed.

HTML produced by the control