The hover menu appears to not working on mobile devices. To
remedy this problem, I include a TreeView control and set its visible property
to false. This control expands its entire node by default. That will take care
of the mentioned problem. In the code behind, hide the Menu control and show
the TreeView control if requesting browser is a mobile device. See listing 9.
Listing 9
protected void Page_Load(object sender, EventArgs e)
{
if (Request.Browser.IsMobileDevice)
{
NavigationMenu.Visible = false;
NavigationTreeView.Visible = true;
}
}
When I tested the menu on IE 8, the hover menu did not
render correctly. To overcome this problem, I set the DynamicMenuStyle z-index
to 200, see style.css. The submenu is also not working with Google Chrome. After
some research, I found the solution for it. See listing 10.
Listing 10
protected void Page_Load(object sender, EventArgs e)
{
if (Request.UserAgent.IndexOf("AppleWebKit") > 0)
{
Request.Browser.Adapters.Clear();
NavigationMenu.DynamicMenuStyle.Width = Unit.Pixel(120);
}
}