This sample demonstrates how the ASPxMenu control can be used to implement a toolbar look and feel.
Use the option list in the rightmost panel to select and apply the desired toolbar appearance.
Different toolbar appearances can be emulated using the template technology widely supported by the ASPxMenu.
In this demo, toolbars of all types are represented by specifically customized ASPxMenu controls.
In the 'Office 2003' sample, an additional ASPxRoundPanel control is used to emulate a toolbar with rounded corners.
Items of an ASPxMenu control are declared explicitly within the control, are represented by images only, and have a fixed size.
Item images are assigned through the ImageUrl of items, and the Text property of each item is initialized with an empty string.
One of menu items is represented by a label and textbox - this is implemented easily by using template technology.
The 'Office 2007' sample imitates a Ribbon-like toolbar appearance. For this purpose, a specific approach is used. There is a main ASPxMenu
control placed inside an ASPxRoundPanel. This menu obtains its items (which are the Font, Paragraph and Window) from a
specific xml file with the help of an XmlDataSource control. Each menu item is represented by a template which contains a web user control.
This web user control consists of another ASPxMenu control placed within its own ASPxRoundPanel.
The child ASPxMenu is bound to the same xml file as the main menu. The main menu's ItemDataBound event is handled so as to
load the web user control into the processed item's template and bind the user control's contents (the round panel and child menu) to
the corresponding data.
Note that in Office styled samples, checked state behavior of menu items is specified by using either their Checked property,
or both the Checked and GroupName properties. Specific background images are defined for the hovered and checked states
of menu items in these samples.
The 'Windows XP' sample uses the ASPxMenu control whose items are retrieved from an xml file through a XmlDataSource component.
The item size is fixed for all menu items. The menu's ItemImagePosition property is set to Top to display item images above item captions.
A specific background image is specified for the hovered style of menu items.