ComponentOne Menu for ASP.NET AJAX: Menu Appearance > Templates > Top-Level Menu Template

Top-Level Menu Template

C1Menu includes a special designer for customizing the menu items in the top-level menu.

To add a template for the top-level menu items, complete the following:

1.   Add menu items to C1Menu using the C1Menu Designer Form editor. Remove the default text for the first menu item so your menu appears similar to the following:

 

 

2.   Click OK to save and close the C1Menu Designer Form dialog box.

3.   Switch to source view and add the following HTML markup right above the <Items> tag:

<TopItemsTemplate>

<%#Eval("Text") == "" ? ("<font color=\"green\">empty text</font>") : ("<i><b>" + Eval("Text") + "</b></i>")%>

</TopItemsTemplate>

4.   Select the Design tab to switch to design view and notice the Databound items appear on the C1Menu control.

5.   Run you project and notice the new text and font style for the menu items.

 


Send comments about this topic to ComponentOne.
Copyright © 1987-2010 ComponentOne LLC. All rights reserved.