Skip to main content

BootstrapMenu Class

#Declaration

TypeScript
class BootstrapMenu extends Control

#Remarks

IMPORTANT

Bootstrap Controls for ASP.NET Core are in maintenance mode. We don’t add new controls or develop new functionality for this product line. Our recommendation is to use the ASP.NET Core Controls suite.

#Methods

#getItem(index) Method

#Declaration

TypeScript
getItem(
    index: number
): BootstrapMenuItem | null

#Parameters

Name Type
index number

#Returns

Type
BootstrapMenuItem
null

#getItemByName(name) Method

#Declaration

TypeScript
getItemByName(
    name: string
): BootstrapMenuItem | null

#Parameters

Name Type
name string

#Returns

Type
BootstrapMenuItem
null

#getItemCount Method

#Declaration

TypeScript
getItemCount(): number

#Returns

Type
number

#getOrientation Method

#Declaration

TypeScript
getOrientation(): string

#Returns

Type
string

#getRootItem Method

#Declaration

TypeScript
getRootItem(): BootstrapMenuItem | null

#Returns

Type
BootstrapMenuItem
null

#getSelectedItem Method

#Declaration

TypeScript
getSelectedItem(): BootstrapMenuItem | null

#Returns

Type
BootstrapMenuItem
null

#off<K> Method

#Declaration

TypeScript
off<K extends keyof BootstrapMenuEventMap>(
    eventName?: K,
    callback?: (this: BootstrapMenu,
    args?: BootstrapMenuEventMap[K]) => void
): this

#Parameters

Name Type
eventName K
callback (this: BootstrapMenu, args?: BootstrapMenuEventMap[K]) => void

#Type Parameters

Name Type
K keyof

#Returns

Type
this

#on<K>(eventName, callback) Method

#Declaration

TypeScript
on<K extends keyof BootstrapMenuEventMap>(
    eventName: K,
    callback: (this: BootstrapMenu,
    args?: BootstrapMenuEventMap[K]) => void
): this

#Parameters

Name Type
eventName K
callback (this: BootstrapMenu, args?: BootstrapMenuEventMap[K]) => void

#Type Parameters

Name Type
K keyof

#Returns

Type
this

#once<K>(eventName, callback) Method

#Declaration

TypeScript
once<K extends keyof BootstrapMenuEventMap>(
    eventName: K,
    callback: (this: BootstrapMenu,
    args?: BootstrapMenuEventMap[K]) => void
): this

#Parameters

Name Type
eventName K
callback (this: BootstrapMenu, args?: BootstrapMenuEventMap[K]) => void

#Type Parameters

Name Type
K keyof

#Returns

Type
this

#setOrientation(orientation) Method

#Declaration

TypeScript
setOrientation(
    orientation: string
): void

#Parameters

Name Type
orientation string

#setSelectedItem(item) Method

#Declaration

TypeScript
setSelectedItem(
    item: BootstrapMenuItem
): void

#Parameters

Name Type
item BootstrapMenuItem