SubMenuStyleCollection Class
Represents a collection of SubMenuStyle objects in a Menu control.
Assembly: System.Web (in System.Web.dll)
The SubMenuStyleCollection class is used to store and manage a collection of SubMenuStyle objects in a Menu control. The Menu control uses the SubMenuStyleCollection class as the underlying data type of the LevelSubMenuStyles property.
The LevelSubMenuStyles property provides additional style choices in addition to the StaticMenuStyle and DynamicMenuStyle properties. The first style in the SubMenuStyleCollection collection corresponds to the submenu style for the first level of the menu. The second style in the collection corresponds to the submenu style for the second level of the menu, and so on. The LevelSubMenuStyles property is most often used to generate a navigation menu, like a Web site map, where menu items at a certain level should have the same appearance, regardless of whether they have submenus.
The SubMenuStyleCollection class inherits most of its members from the StateManagedCollection class. For more information on the inherited members, see the StateManagedCollection collection.
The following example demonstrates how to use the SubMenuStyleCollection class to specify the style settings for the submenus in a Menu control based on the submenu's level. In this example, the LevelSubMenuStyles property returns a SubMenuStyleCollection object.
System.Web.UI::StateManagedCollection
System.Web.UI.WebControls::SubMenuStyleCollection
Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.