HtmlForgeX

API Reference

Class

DropdownItem

Namespace HtmlForgeX
Assembly HtmlForgeX
Implements

Dropdown menu item

Inheritance

  • Object
  • DropdownItem

Constructors

DropdownItem 2 overloads
public DropdownItem() #

Initializes a new instance of the DropdownItem class

public DropdownItem(String text, String href = null) #

Initializes a new instance of the DropdownItem class with text and optional href

Parameters

text System.String requiredposition: 0
The item text
href System.String = null optionalposition: 1
Optional link URL

Methods

public DropdownItem Active(Boolean active = true) #
Returns: DropdownItem

Mark as active

Parameters

active System.Boolean = true optionalposition: 0
public DropdownItem Disabled(Boolean disabled = true) #
Returns: DropdownItem

Mark as disabled

Parameters

disabled System.Boolean = true optionalposition: 0
public DropdownItem Href(String href) #
Returns: DropdownItem

Set item link

Parameters

href System.String requiredposition: 0
public virtual String Render() #
Returns: String

Renders the dropdown item to HTML

Returns

HTML string representation of the item

public DropdownItem Text(String text) #
Returns: DropdownItem

Set item text

Parameters

text System.String requiredposition: 0
public DropdownItem WithIcon(TablerIconType icon) #
Returns: DropdownItem

Add icon

Parameters

icon HtmlForgeX.TablerIconType requiredposition: 0

Properties

public Nullable<TablerIconType> Icon { get; set; } #

Gets or sets the icon for the dropdown item