ListItem

in namespace DotVVM.Framework.Controls.Bootstrap4

Represents a single item in Bootstrap lists and menus.

Usage & Scenarios

A base class representing an item in Bootstrap lists and menus. This list item is used in the following controls:

All these controls use the following properties on its list items:

  • Text represents the text on the list item. Alternatively, you can use ContentTemplate property to specify any HTML content.
  • If you set the NavigateUrl property, or you use the RouteName, Param-*, Query-* and UrlSuffix properties, the item will behave like a hyperlink. For more information about RouteName properties, see RouteLink control.
  • Alternatively, you can set the Click command which specifies the method in the viewmodel to be triggered.
  • Enabled property can be used to enable or disable the list item.
  • IsSelected property specifies whether the list item is active or not.

Properties

Name Type Description Notes Default Value
property icon ContentTemplate ITemplate Gets or sets the template for content of the item.
attribute
inner element
static value
bindable
default
null
property icon Enabled Boolean Gets or sets whether this item is enabled.
attribute
inner element
static value
bindable
default
True
property icon IsSelected Boolean Gets or sets whether this item is selected.
attribute
inner element
static value
bindable
default
False
property icon NavigateUrl String Gets or sets the URL of the item hyperlink.
attribute
inner element
static value
bindable
default
property icon RouteName String Gets or sets the name of the route for the item hyperlink.
attribute
inner element
static value
bindable
default
null
property icon Text String Gets or sets the text of the item.
attribute
inner element
static value
bindable
default
property icon UrlSuffix String Gets or sets the suffix that will be appended to the generated URL.
attribute
inner element
static value
bindable
default
null

Events

Name Type Description
event icon Click Command Gets or sets the command that will be triggered when the button is clicked.

HTML produced by the control