Show theme settings Shopping cart Download trialFree Trial
Change Theme Settings
Change Theme Settings
Themes
 
Show All Themes
v
...v

Item Link Mode

AllowSelectItem="True"
ItemLinkMode="ContentBounds"

Specific service scripts are used to apply the hovered and selected styles to menu items and generate the ItemClick events.

ItemLinkMode="TextOnly"
ShowExpandButtons="False"
AllowExpanding="False"

The hovered and selected styles are applied without using scripts. The style settings available via the LinkStyle property are used to define the appearance of links.

The demo shows which factors affect the appearance and functionality of clickable navbar items and the style of links represented by items.

The ItemLinkMode property can be used to specify how navbar items are represented as links within the navbar control. By default, this property is set to the ContentBounds value which makes the navbar entirely interactive. If you need to display a simple navbar (such as a set of links within groups), you can set the ItemLinkMode property to TextOnly. In this instance, the resulting HTML code generated to represent the navbar control on the page will be minimal. In order to control the appearance of links the LinkStyle property can be used.

In this demo, two ASPxNavBar controls are used with different settings for their ItemLinkMode property.

The first navbar's ItemLinkMode property is set to ContentBounds thus allowing the entire area of each navbar item to be clickable.

The ItemLinkMode property of the second navbar is set to the TextOnly value which makes the clickable content of each navbar item to be bounded by the size of the item's text. As you can imagine, the second navbar has a simpler appearance and simpler HTML.

If you want to specify a hover style for a navbar control's items but don't want to use scripts, define the required styles via the LinkStyle property.

In order to completely remove service scripts, you can set the navbar's AllowExpanding property to false. This will force the navbar's groups to always be expanded.

Collapse/Expand
Local Copy of this Demo
To inspect the source code for this demo on your machine, you must first install our components via the DevExpress Component Installer.
You can open a local copy of this online demo directly from this webpage (if using v20.2.8, 21.1.4 or higher).
Open CS Solution
Open VB Solution
The source code files for this demo are installed (by default) in the following directories:
\Users\Public\Documents\DevExpress Demos XX.X\Components\ASP.NET\CS\ASPxNavigationAndLayoutDemos
\Users\Public\Documents\DevExpress Demos XX.X\Components\ASP.NET\VB\ASPxNavigationAndLayoutDemos