This topic has not yet been rated - Rate this topic

AspMenu.UseSimpleRendering Property

SharePoint 2010

Controls whether to use simple unordered list-based rendering or the default Microsoft ASP.NET table-based rendering.

Namespace:  Microsoft.SharePoint.WebControls
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No
public bool UseSimpleRendering { get; set; }

Property Value

Type: System.Boolean
true if the menu uses simple rendering; otherwise, false. The default is false.

Set this property to true to cause the menu to render as an unordered list of anchor elements that is more easily styled using cascading style sheets (CSS) and more accessible.

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ
Breaks "DisappearAfter" attribute
Using simple rendering will break the ability to use various properties still available to SharePoint:AspMenu.  Specifically:
  • "DisappearAfter" attribute is not recognized -- menu will always disapear after the default time.
  • "StaticDisplayLevels" and  "MaximumDynamicDisplayLevels"are not recognized -- all menu items are output all the time. 
Also, this isn't mentioned -- but setting UseSimpleRendering will ignore any styling and templating elements/attributes present.  This is to be expected, I think -- as the styling should be done using CSS, styling the various classes.
  • Styling attributes (i.e. StaticHoverStyle-BackColor, BackColor, etc.)
  • Templating elements (i.e.  StaticItemTemplate, DynamicItemTemplate, etc. )