Free Trial Buy Now

NavBar - Item Link Mode

Jack London (1876-1916)
Jack London (1876-1916)
Mark Twain (1835-1910)
Mark Twain (1835-1910)
AllowSelectItem="True"
ItemLinkMode="ContentBounds"

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

John Tolkien (1892-1973)
Tree and Leaf (1964)
Bilbo's Last Song (1974)
Mr Bliss (1982)
Finn and Hengest (1983)
Alex. Dumas (1802-1870)
Napoleon Bonaparte (1831)
La Reine Margot (1845)
Joseph Balsamo (1846)
Le Collier De La Reine (1849)
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.

Description

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.

Version: v2012 vol 2.8
Experience the DevExpress Difference Today
Demos with source code are included with an installation of DevExpress controls for ASP.NET. Refer to the Demos and Sample Applications topic to learn more.
To download your free evaluation copy of our award-winning ASP.NET libraries, visit the Downloads page
All DevExpress ASP.NET Controls ship as part of DXperience ASP.NET, Enterprise, and Universal.
To obtain pricing information, visit the Pricing Options page or contact us via Email at info@devexpress.com
or by telephone at +1 (818) 844-3383 between 8:30am and 5pm Pacific Time.