Version: 2.0 |

Column

in namespace DotVVM.Framework.Controls.Bootstrap4

Renders a Boostrap column. Use this control inside the Row control.

Properties

Name Type Description Notes Default Value
Offset String Gets or sets the offset of the column for all screen sizes.
attribute
inner element
static value
bindable
default
OffsetLG String Gets or sets the offset of the column for large screen.
attribute
inner element
static value
bindable
default
OffsetMD String Gets or sets the offset of the column for medium screen.
attribute
inner element
static value
bindable
default
OffsetSM String Gets or sets the offset of the column for small screen.
attribute
inner element
static value
bindable
default
OffsetXL String Gets or sets the offset of the column for extra large screen.
attribute
inner element
static value
bindable
default
Size String Gets or sets the horizontal size of the column for all screen sizes.
attribute
inner element
static value
bindable
default
SizeLG String Gets or sets the horizontal size of the column for large screen.
attribute
inner element
static value
bindable
default
SizeMD String Gets or sets the horizontal size of the column for medium screen.
attribute
inner element
static value
bindable
default
SizeSM String Gets or sets the horizontal size of the column for small screen.
attribute
inner element
static value
bindable
default
SizeXL String Gets or sets the horizontal size of the column for extra large screen.
attribute
inner element
static value
bindable
default
VerticalAlignment VerticalAlignment Gets or sets of the vertical alignment of this column within the row.
attribute
inner element
static value
bindable
default
None

Events

Name Type Description

Usage & Scenarios

Renders a Boostrap column. This control should be a direct child of Row control.

https://getbootstrap.com/docs/4.1/layout/grid/

HTML Rendered by the Control

Sample 1: Column Sizes

You can specify the size of the column in the Bootstrap grid units (12 units per row by default) using the Size property.

To override the value for particular screen sizes, use the SizeSM, SizeMD, SizeLG and SizeXL properties.

If you don't specify the size of the column, Bootstrap will distribute the space equally.

See Bootstrap Grid documentation for more details.

<bs:Row>
    <bs:Column Size="4" SizeLG="10" style="background-color: red">
        Default = 4/12 | LG = 10/12
    </bs:Column>
    <bs:Column Size="8" SizeLG="2" style="background-color: blue">
        Default = 8/12 | LG = 2/12
    </bs:Column>
</bs:Row>

Sample 2: Column Offsets

To shift the column to the right, use the Offset property - it specifies the number of columns to be skipped.

To override the value for a particular screen size, use OffsetSM, OffsetMD, OffsetLG and OffsetXL properties.

<bs:Column SizeXS="7" SizeLG="2" style="background-color: blue">no offset</bs:Column>
<bs:Column SizeXS="5" OffsetLG="4" SizeLG="6" style="background-color: red">offset = 4 for the large screen</bs:Column>

Sample 3: Column Ordering

To specify explicit column order, use the Order property.

To override the value for a particular screen size, use OrderSM, OrderMD, OrderLG and OrderXL properties.

<bs:Column SizeXS="7" SizeLG="2" style="background-color: blue">no offset</bs:Column>
<bs:Column SizeXS="5" OffsetLG="4" SizeLG="6" style="background-color: red">offset = 4 for the large screen</bs:Column>

Sample 4: Vertical Alignment

You can use the AlignSelf property to align the column vertically within the row.

  • Start aligns the columns to the top.
  • Center aligns the columns to the middle.
  • End aligns the columns to the bottom.
<bs:Row>
  <bs:Column AlignSelf="Start">
    Column 1
  </bs:Column>
  <bs:Column AlignSelf="Center">
    Column 2
  </bs:Column>
</bs:Row>

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