TabItem

in namespace DotVVM.Framework.Controls.Bootstrap4

Represents item in bootstrap TabControl.

Usage & Scenarios

Represents the tab item inside the Bootstrap TabControl.

https://getbootstrap.com/docs/4.3/components/navs/#javascript-behavior

Sample 1: TabItem Control

Use the <bs:TabItem> controls inside the TabControl control.

The header and content of each TabItem is defined using the HeaderTemplate and ContentTemplate properties.

The IsActive property specifies whether the tab is currently selected or not.

The Enabled property specifies whether the tab can be selected.

<bs:TabControl>
  <bs:TabItem>
    <HeaderTemplate>Tab 1</HeaderTemplate>
    <ContentTemplate>
      <p>First tab</p>
    </ContentTemplate>
  </bs:TabItem>

  <bs:TabItem IsActive="true">
    <HeaderTemplate>Tab 2</HeaderTemplate>
    <ContentTemplate>
      <p>Second tab</p>
    </ContentTemplate>
  </bs:TabItem>

  <bs:TabItem Enabled="false">
    <HeaderTemplate>Tab 3</HeaderTemplate>
    <ContentTemplate>
      <p>Third tab</p>
    </ContentTemplate>
  </bs:TabItem>
</bs:TabControl>

Properties

Name Type Description Notes Default Value
property icon ContentTemplate ITemplate Gets or sets the template for content of the tab item.
attribute
inner element
static value
bindable
default
null
property icon Enabled Boolean Gets or sets whether the tab is enabled or not.
attribute
inner element
static value
bindable
default
True
property icon HeaderTemplate ITemplate Gets or sets the template for header of the tab item.
attribute
inner element
static value
bindable
default
null

HTML produced by the control