TabDropDown

in namespace DotVVM.Bootstrap5.Controls

Renders a dropdown button that can be used inside the TabControl.

Usage & Scenarios

A special version of the DropDown control that can be used in TabControl.

See DropDown for more info on how to use this control.

https://getbootstrap.com/docs/5.2/components/navs-tabs

Sample 1: TabDropDown Control

The <bs:TabDropDown> control has limited features for drop down toggle button in comparison with a standard DropDown control. Nevertheless, both DropDown and <bs:TabDropDown> share the same child control DropDownItem.

<bs:TabControl HorizontalAlingment="Center" 
               Justify="fill">
  <bs:TabDropDown HeaderText="Header">
    <bs:DropDownItem>item</bs:DropDownItem>
    <bs:DropDownSeparator />
    <bs:DropDownItem>item</bs:DropDownItem>
    <bs:DropDownItem>item</bs:DropDownItem>
  </bs:TabDropDown>
  <bs:TabItem>
    <HeaderTemplate> Tab 1 </HeaderTemplate>
    My tab 1
  </bs:TabItem>
  <bs:TabItem>
  <HeaderTemplate> Tab 2 </HeaderTemplate>
    tab 2
  </bs:TabItem>
</bs:TabControl>

Properties

Name Type Description Notes Default Value
property icon CloseBehavior DropDownCloseBehavior Gets or sets the dropdown closing behavior. Possible values are `Default`, `Inside`, `Outside` and `Manual`.
attribute
inner element
static value
bindable
default
Default
property icon DataSource IValueBinding<IEnumerable<Object>> Gets or sets the data source for the items in the dropdown menu.
attribute
inner element
static value
bindable
default
null
property icon DropDirection DropDirection Gets or sets the direction in which the dropdown menu should open.
attribute
inner element
static value
bindable
default
DropDown
property icon Enabled Boolean Gets or sets whether the toggle button is enabled or disabled.
attribute
inner element
static value
bindable
default
True
property icon HeaderTemplate ITemplate Gets or sets a custom template for the dropdown button.
attribute
inner element
static value
bindable
default
null
property icon HeaderText String Gets or sets a plain text for the dropdown button.
attribute
inner element
static value
bindable
default
null
property icon IsCollapsed IValueBinding<Boolean> Gets or sets whether the dropdown menu is collapsed or expanded.
attribute
inner element
static value
bindable
default
null
property icon ItemEnabled Boolean Gets or sets whether the individual items in the dropdown menu should be enabled or disabled when DataSource is set.
attribute
inner element
static value
bindable
default
True
property icon ItemNavigateUrl String Gets or sets the URL to navigate to when an item in the dropdown menu is clicked when DataSource is set.
attribute
inner element
static value
bindable
default
null
property icon ItemRouteName String Gets or sets the route name to navigate to when an item in the dropdown menu is clicked when DataSource is set.
attribute
inner element
static value
bindable
default
null
property icon Items List<IDropDownItem> Gets or sets the items inside the control.
attribute
inner element
static value
bindable
default
null
property icon ItemSelected Boolean Gets or sets whether an individual item in the dropdown menu is selected when DataSource is set.
attribute
inner element
static value
bindable
default
null
property icon ItemTemplate ITemplate Gets or sets the template to use for rendering each item in the dropdown menu when DataSource is set.
attribute
inner element
static value
bindable
default
null
property icon ItemText String Gets or sets the text to display for each item in the dropdown menu when DataSource is set.
attribute
inner element
static value
bindable
default
null
property icon ItemUrlSuffix String Gets or sets a suffix to append to the URL of each item in the dropdown menu when DataSource is set.
attribute
inner element
static value
bindable
default
null
property icon Visible Boolean Gets or sets whether the control is visible. When set to false, `style="display: none"` will be added to this control.
attribute
inner element
static value
bindable
default
True

Events

Name Type Description
event icon ItemClick ICommandBinding Gets or sets the command that will be triggered when individual items in the dropdown menu are clicked and DataSource is set.

HTML produced by the control