CheckBoxFormGroup
in namespace DotVVM.Framework.Controls.Bootstrap4
Renders a FormGroup control with a CheckBox
Usage & Scenarios
Sample 1: Form Group properties
CheckBoxFormGroup is just wrapper around CheckBox inside FormGroup, so you can use any of the properties of the FormGroup and CheckBox to configure desired behavior.
For example you can use the Label
property to set the Label of the FormGroup.
<bs:Form>
<bs:CheckBoxFormGroup Checked="{value: Value}" Text="Check me out" LabelText="Label" />
</bs:Form>
using DotVVM.Framework.ViewModel;
namespace DotvvmWeb.Views.Docs.Controls.bootstrap.CheckBoxFormGroup.sample1
{
public class ViewModel : DotvvmViewModelBase
{
public bool Value { get; set; }
}
}
Properties
Name | Type | Description | Notes | Default Value | |
---|---|---|---|---|---|
Attributes | Dictionary<String,Object> |
attribute
static value
|
null | ||
Checked | Boolean? | Gets or sets whether the control is checked. |
attribute
bindable
|
False | |
CheckedItems | IEnumerable | Gets or sets a collection of values of all checked checkboxes. Use this property in combination with the CheckedValue property. |
attribute
static value
bindable
|
null | |
CheckedValue | Object | Gets or sets the value that will be used as a result when the control is checked. Use this property in combination with the CheckedItem or CheckedItems property. |
attribute
static value
bindable
|
null | |
ClientIDMode | ClientIDMode | Gets or sets the client ID generation algorithm. |
attribute
static value
|
Static | |
ContentTemplate | List<DotvvmControl> | Gets or sets the content of the form group. |
inner element
static value
bindable
default
|
null | |
DataContext | Object | Gets or sets a data context for the control and its children. All value and command bindings are evaluated in context of this value. |
attribute
bindable
|
null | |
Enabled | Boolean | Gets or sets a value indicating whether the control is enabled and can be clicked on. |
attribute
static value
bindable
|
False | |
FormControlStyle | CheckboxStyle | Gets or sets whether the control should use default or custom style. |
attribute
static value
|
Default | |
ID | String | Gets or sets the unique control ID. |
attribute
static value
bindable
|
null | |
IncludeInPage | Boolean | Gets or sets whether the control is included in the DOM of the page. |
attribute
bindable
|
True | |
InnerText | String | Gets or sets the inner text of the HTML element. |
attribute
static value
bindable
|
null | |
LabelSize | Int32? | Gets or sets the size of size the label area for all screen sizes. This applies only to the Horizontal forms. |
attribute
static value
|
null | |
LabelSizeLG | Int32? | Gets or sets the size of the label area large screen. This applies only to the Horizontal forms. |
attribute
static value
|
null | |
LabelSizeMD | Int32? | Gets or sets the size of the label area for medium screen. This applies only to the Horizontal forms. |
attribute
static value
|
null | |
LabelSizeSM | Int32? | Gets or sets the size of the label area small screen. This applies only to the Horizontal forms. |
attribute
static value
|
null | |
LabelSizeXL | Int32? | Gets or sets the size of the label area for extra large screen. This applies only to the Horizontal forms. |
attribute
static value
|
null | |
LabelTemplate | ITemplate | Gets or sets the template of the label area. This property cannot be combined with the LabelText property. |
inner element
static value
|
null | |
LabelText | String | Gets or sets the label text. This property cannot be combined with the LabelTemplate property. |
attribute
static value
bindable
|
null | |
Size | Size | Gets or sets the size of controls in the form group. |
attribute
static value
bindable
|
Default | |
Text | String | Gets or sets the label text that is rendered next to the checkbox. |
attribute
static value
bindable
|
||
Type | FormGroupType | Gets or sets the type of the form. |
attribute
static value
|
Default | |
Visible | Boolean | Gets or sets whether the control is visible. |
attribute
bindable
|
True |
Events
Name | Type | Description | |
---|---|---|---|
Changed | Command | Gets or sets the command that will be triggered when the control check state is changed. |