Rank: Advanced Member Groups: Member
Joined: 9/4/2007 Posts: 114
|
How would I set the ShadowDepth property = 0 for all submenu groups ( submenus from main menu group item) when the submenus are created from a dataset of related tables. This code was used to set the first level menu groups, but only the first drop-down menu group has the dropshadow turned off. None of the child menu groups have ShadowDepth set/turned off:
Code: C#
internal void MenuBindings(EO.Web.Menu MenuControl, DataSet dsMenu)
{
for (int items = 0; items < MenuControl.Items.Count; items++)
{
MenuControl.Items[items].SubMenu.Bindings.Add(linkBinding);
MenuControl.Items[items].SubMenu.Bindings.Add(clickBinding);
MenuControl.Items[items].SubMenu.Bindings.Add(hoverBinding);
MenuControl.Items[items].SubMenu.Bindings.Add(normalBinding);
MenuControl.Items[items].SubMenu.ShadowDepth = 0;
MenuControl.Items[items].SubMenu.DataBind();
}
}
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
The easiest way is to set it in the look items. Usually you need to set it on the _Default and _TopLevelItem look items. _TopLevelItem would affect the first level sub menus, while _Default affects the rest. Unless you have other look items, setting these two places should turn off shadow for all sub menus.
Thanks!
|