Welcome Guest Search | Active Topics | Sign In | Register

Toolbar Dropdown and XMLDatasource Options
Shawn
Posted: Wednesday, August 27, 2008 12:05:08 PM
Rank: Member
Groups: Member

Joined: 4/30/2008
Posts: 21
I have a toolbar with a drop down menu. I am trying to populate the drop down based on an xml file. It does not seem to matter what I do with the bindings or the with the xml, the drop down never populates. How do I populate a drop down in a toolbar based on xml?
eo_support
Posted: Wednesday, August 27, 2008 12:19:27 PM
Rank: Administration
Groups: Administration

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

Try to populate a regular menu without a toolbar first as populating a menu from XMLDataSource should not have anything to do with the toolbar. You can also start with the sample code shown in this post:

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

If that works, you can then switch your XML file in and it should not be difficult to get the rest going.

Thanks!

Shawn
Posted: Thursday, August 28, 2008 6:55:51 AM
Rank: Member
Groups: Member

Joined: 4/30/2008
Posts: 21
I figured out he problem, however I don't see how to fix it. The drop down menu is being populated with the XML data. The reason I couldn't tell is the drop down menu does not show a drop down button (I just happened to click on the far right side of the drop down menu and the xml menu items appeared). I see a property for DropDownButtonWidth, but no matter how wide I make it, no button apears. What do I need to do to have the DropDownButton appear?

To be clear, the button I am talking about is the "down arrow button" that would normally be on the far right side of the Drop Down menu.
eo_support
Posted: Thursday, August 28, 2008 7:04:54 AM
Rank: Administration
Groups: Administration

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

The ToolBar does not automatically display a drop down button unless you provide one through ToolBarItem.NormalStyle and ToolBarItem.HoverStyle. Usually you would provide two images (one for normal state, one when mouse is hovering the button) as background images in those two styles. This sample demonstrated this:

http://www.essentialobjects.com/Demo/Default.aspx?path=ToolBar\_i1\_i1

You can take a look of the source code of this sample and you will see such background images are set in an item in the ToolBar's ItemTemplates. You can copy the same settings into your application.

Please feel free to let us know if you still have any questions.

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.