Welcome Guest Search | Active Topics | Sign In | Register

XML driven Menu Options
Torkel
Posted: Tuesday, January 22, 2008 3:39:27 AM
Rank: Newbie
Groups: Member

Joined: 10/26/2007
Posts: 2
Hi,

is it possible to change the apperance of a menu through the XML file.

How can I define a separator in an XML file when bulding a menu dynamically

Can I dynamically set the Left icon when the menu is datadriven?

Any examples of the above somwhere?

Regards

Torkel
eo_support
Posted: Tuesday, January 22, 2008 5:33:36 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,095
Hi,

All of your questions come down to one question: mapping an XML attribute to a menu item property. For example, to dynamically set left icon, you can map a "LeftIcon" XML attribute to MenuItem.LeftIcon.Url. That way whatever LeftIcon you specified in your XML attribute will automatically goes into MenuItem.LeftIcon.Url, which gives you the left icon you specified.

This topic explained how to map them. Check 'Using Data Binding object" section:

http://www.essentialobjects.com/ViewDoc.aspx?t=MenuCommon%2fDataBinding%2fpopulate_datasource.html

The document is based on XmlDataSource. But it should also work with XmlFile property, with which you directly set a file name.

You may also want to go over the whole Data Binding chapter in the help file to know more about data binding. A whole lot of samples are available in our sample project for data binding.

Thanks


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.