Version: 2.0 |

TextBox

in namespace DotVVM.Framework.Controls.Bootstrap4

Extends the builtin TextBox control to allow applying Bootstrap CSS classes.

Properties

Name Type Description Notes Default Value
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
FormatString String Gets or sets a format of presentation of value to client.
attribute
inner element
static value
bindable
default
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
Size Size Gets or sets the size of the TextBox.
attribute
inner element
static value
bindable
default
Default
Text Object Gets or sets the text in the control.
attribute
inner element
static value
bindable
default
Type TextBoxType Gets or sets the mode of the text field.
attribute
inner element
static value
bindable
default
Normal
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
Changed Command Gets or sets the command that will be triggered when the control text is changed.

Usage & Scenarios

Extends the builtin TextBox control to allow sizing.

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

HTML Rendered by the Control

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; }
    }
}

Suggestions


Help & Contribute

The documentation is maintained on GitHub.
We'll be happy if you edit the page and create a pull request.

Send message