Free Trial Buy Now

Menu - Templates

vSubMenu Template
vItem Template

Description

This sample demonstrates the use of template technology within the ASPxMenu control. The look of each basic element of the menu control can be completely modified by creating a specific template which defines how the element will be rendered by a client browser.

The templates of the SubMenuTemplate and ItemTemplate types are defined in this demo. Creating templates of different types allows you to completely customize the appearance or layout of a menu control or each element inside it.

This demo represents a two-level ASPxMenu type. A specific SubMenuTemplate is created for the first root menu item's submenu; the appearance of the second root menu item's sub-item is defined via the Template property of each sub-item.

The content of a SubMenuTemplate type is represented by the ASPxSiteMapControl which displays a hierarchical structure of links (site map nodes) that reference different web pages within the site. For more information on implementation of such a template, please take a look at the demo's aspx code.

Sub-items of the second root menu item use Templates. Each of these templates consists of a group of HTML controls. Each HTML control used in the template can be bound to the property values of the rendered menu item. See ASPX code to learn how this can be done by binding a Label control's Text property to the value of the currently rendered menu item's Text property.

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.