Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
4491 lines (3936 sloc) 303 KB
<Type Name="Menu" FullName="System.Web.UI.WebControls.Menu">
<TypeSignature Language="C#" Value="public class Menu : System.Web.UI.WebControls.HierarchicalDataBoundControl, System.Web.UI.INamingContainer, System.Web.UI.IPostBackEventHandler" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit Menu extends System.Web.UI.WebControls.HierarchicalDataBoundControl implements class System.Web.UI.INamingContainer, class System.Web.UI.IPostBackEventHandler" />
<TypeSignature Language="DocId" Value="T:System.Web.UI.WebControls.Menu" />
<TypeSignature Language="VB.NET" Value="Public Class Menu&#xA;Inherits HierarchicalDataBoundControl&#xA;Implements INamingContainer, IPostBackEventHandler" />
<TypeSignature Language="C++ CLI" Value="public ref class Menu : System::Web::UI::WebControls::HierarchicalDataBoundControl, System::Web::UI::INamingContainer, System::Web::UI::IPostBackEventHandler" />
<TypeSignature Language="F#" Value="type Menu = class&#xA; inherit HierarchicalDataBoundControl&#xA; interface IPostBackEventHandler&#xA; interface INamingContainer" />
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Web.UI.WebControls.HierarchicalDataBoundControl</BaseTypeName>
</Base>
<Interfaces>
<Interface>
<InterfaceName>System.Web.UI.INamingContainer</InterfaceName>
</Interface>
<Interface>
<InterfaceName>System.Web.UI.IPostBackEventHandler</InterfaceName>
</Interface>
</Interfaces>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.DefaultEvent("MenuItemClick")</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8">
<AttributeName>System.ComponentModel.Designer("System.Web.UI.Design.WebControls.MenuDesigner, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.Web.UI.ControlValueProperty("SelectedValue")</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.Web.UI.SupportsEventValidation</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5">
<AttributeName>System.ComponentModel.Designer("System.Web.UI.Design.WebControls.MenuDesigner, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")</AttributeName>
</Attribute>
</Attributes>
<Docs>
<summary>Displays a menu in an ASP.NET Web page.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
In this topic:
- [Introduction](#introduction)
- [Menu Items](#menu_items)
- [Static Data](#static_data)
- [Binding to Data](#binding_to_data)
- [Customizing the User Interface](#customizing_the_user_interface)
- [Events](#events)
- [Accessibility](#accessibility)
- [Declarative Syntax](#declarative_syntax)
<a name="introduction"></a>
## Introduction
The <xref:System.Web.UI.WebControls.Menu> control is used to display a menu in an ASP.NET Web page and is often used in combination with a <xref:System.Web.UI.WebControls.SiteMapDataSource> control for navigating a Web site. The <xref:System.Web.UI.WebControls.Menu> control supports the following features:
- Data binding that allows the control's menu items to be bound to hierarchal data sources.
- Site navigation through integration with the <xref:System.Web.UI.WebControls.SiteMapDataSource> control.
- Programmatic access to the <xref:System.Web.UI.WebControls.Menu> object model to dynamically create menus, populate menu items, set properties, and so on.
- Customizable appearance through themes, user-defined images, styles, and user-defined templates.
When the user clicks a menu item, the <xref:System.Web.UI.WebControls.Menu> control can either navigate to a linked Web page or simply post back to the server. If the <xref:System.Web.UI.WebControls.MenuItem.NavigateUrl%2A> property of a menu item is set, the <xref:System.Web.UI.WebControls.Menu> control navigates to the linked page; otherwise, it posts the page back to the server for processing. By default, a linked page is displayed in the same window or frame as the <xref:System.Web.UI.WebControls.Menu> control. To display the linked content in a different window or frame, use the <xref:System.Web.UI.WebControls.Menu.Target%2A> property of the <xref:System.Web.UI.WebControls.Menu> control.
> [!NOTE]
> The <xref:System.Web.UI.WebControls.Menu.Target%2A> property affects every menu item in the control. To specify a window or frame for an individual menu item, set the <xref:System.Web.UI.WebControls.MenuItem.Target%2A> property of the <xref:System.Web.UI.WebControls.MenuItem> object directly.
The <xref:System.Web.UI.WebControls.Menu> control displays two types of menus: a static menu and a dynamic menu. The static menu is always displayed in a <xref:System.Web.UI.WebControls.Menu> control. By default, the menu items at the root level (level 0) are displayed in the static menu. You can display additional menu levels (static submenus) within the static menu by setting the <xref:System.Web.UI.WebControls.Menu.StaticDisplayLevels%2A> property. Menu items (if any) with a higher level than the value specified by the <xref:System.Web.UI.WebControls.Menu.StaticDisplayLevels%2A> property are displayed in a dynamic menu. A dynamic menu appears only when the user positions the mouse pointer over the parent menu item that contains a dynamic submenu. Dynamic menus automatically disappear after a certain duration. Use the <xref:System.Web.UI.WebControls.Menu.DisappearAfter%2A> property to specify the duration.
> [!NOTE]
> A dynamic menu also disappears when the user clicks outside of the menu.
You can also limit the number of levels displayed in a dynamic menu by setting the <xref:System.Web.UI.WebControls.Menu.MaximumDynamicDisplayLevels%2A> property. Menu levels higher than the specified value are discarded.
> [!NOTE]
> The <xref:System.Web.UI.WebControls.Menu> control is not designed to be used inside an <xref:System.Web.UI.UpdatePanel> control. You can add the <xref:System.Web.UI.WebControls.Menu> control only to a page outside an <xref:System.Web.UI.UpdatePanel> control. <xref:System.Web.UI.UpdatePanel> controls are used to update selected regions of a page instead of updating the whole page with a postback. For more information, see [UpdatePanel Control Overview](https://msdn.microsoft.com/library/29a2265d-9674-4c19-b70e-e5560ee9689a) and [Partial-Page Rendering Overview](https://msdn.microsoft.com/library/5c12736d-d9e9-464a-9388-3fe0f9f49e49).
<a name="menu_items"></a>
## Menu Items
A <xref:System.Web.UI.WebControls.Menu> control is made up of a tree of menu items represented by <xref:System.Web.UI.WebControls.MenuItem> objects. Menu items at the top level (level 0) are called root menu items. A menu item that has a parent menu item is called a child menu item. All root menu items are stored in the <xref:System.Web.UI.WebControls.Menu.Items%2A> collection. Child menu items are stored in a parent menu item's <xref:System.Web.UI.WebControls.MenuItem.ChildItems%2A> collection.
Each menu item has a <xref:System.Web.UI.WebControls.MenuItem.Text%2A> and a <xref:System.Web.UI.WebControls.MenuItem.Value%2A> property. The value of the <xref:System.Web.UI.WebControls.MenuItem.Text%2A> property is displayed in the <xref:System.Web.UI.WebControls.Menu> control, while the <xref:System.Web.UI.WebControls.MenuItem.Value%2A> property is used to store any additional data about the menu item, such as data passed to the postback event associated with the menu item. When clicked, a menu item can navigate to another Web page indicated by the <xref:System.Web.UI.WebControls.MenuItem.NavigateUrl%2A> property.
> [!NOTE]
> If the <xref:System.Web.UI.WebControls.MenuItem.NavigateUrl%2A> property is not set for a menu item, the <xref:System.Web.UI.WebControls.Menu> control simply submits the page to the server for processing when the menu item is clicked.
You can also optionally display an image in a menu item by setting the <xref:System.Web.UI.WebControls.MenuItem.ImageUrl%2A> property.
For more information on menu items, see <xref:System.Web.UI.WebControls.MenuItem>.
<a name="static_data"></a>
## Static Data
The simplest data model of the <xref:System.Web.UI.WebControls.Menu> control is static menu items. To display static menu items using declarative syntax, first nest opening and closing `<Items>` tags between the opening and closing tags of the <xref:System.Web.UI.WebControls.Menu> control. Next, create the menu structure by nesting `<asp:MenuItem>` elements between the opening and closing `<Items>` tags. Each `<asp:MenuItem>` element represents a menu item in the control and maps to a <xref:System.Web.UI.WebControls.MenuItem> object. You can set the properties of each menu item by setting the attributes of its `<asp:MenuItem>` element. To create submenu items, nest additional `<asp:MenuItem>` elements between the opening and closing `<asp:MenuItem>` tags of the parent menu item.
<a name="binding_to_data"></a>
## Binding to Data
The <xref:System.Web.UI.WebControls.Menu> control can use any hierarchal data source control, such as an <xref:System.Web.UI.WebControls.XmlDataSource> control or a <xref:System.Web.UI.WebControls.SiteMapDataSource> control. To bind to a hierarchal data source control, set the <xref:System.Web.UI.WebControls.DataBoundControl.DataSourceID%2A> property of the <xref:System.Web.UI.WebControls.Menu> control to the <xref:System.Web.UI.Control.ID%2A> value of the data source control. The <xref:System.Web.UI.WebControls.Menu> control automatically binds to the specified data source control. This is the preferred method to bind to data.
When binding to a data source where each data item contains multiple properties (such as an XML element with several attributes), a menu item displays the value returned by the `ToString` method of the data item by default. In the case of an XML element, the menu item displays the element name, which shows the underlying structure of the menu tree but is not very useful otherwise. You can bind a menu item to a specific data item property by using the <xref:System.Web.UI.WebControls.Menu.DataBindings%2A> collection to specify menu item bindings. The <xref:System.Web.UI.WebControls.Menu.DataBindings%2A> collection contains <xref:System.Web.UI.WebControls.MenuItemBinding> objects that define the relationship between a data item and the menu item it is binding to. You can specify the criteria for binding and the data item property to display in the node. For more information on menu item bindings, see <xref:System.Web.UI.WebControls.MenuItemBinding>.
You cannot create empty nodes in a <xref:System.Web.UI.WebControls.Menu> control by setting the <xref:System.Web.UI.WebControls.MenuItemBinding.Text%2A> or <xref:System.Web.UI.WebControls.MenuItemBinding.TextField%2A> properties to the empty string (""). Setting these properties to the empty string has the same effect as not setting the properties. In that case, the <xref:System.Web.UI.WebControls.Menu> control creates a default binding using the <xref:System.Web.UI.WebControls.BaseDataBoundControl.DataSource%2A> property. For more information, see [Binding to Databases](https://msdn.microsoft.com/library/ab7b2846-975b-4057-a948-45527497c742).
<a name="customizing_the_user_interface"></a>
## Customizing the User Interface
There are many ways to customize the appearance of the <xref:System.Web.UI.WebControls.Menu> control. First, you can specify whether the <xref:System.Web.UI.WebControls.Menu> control is rendered horizontally or vertically by setting the <xref:System.Web.UI.WebControls.Menu.Orientation%2A> property. You can also specify a different style (such as font size and color) for each of the menu item types.
If you use cascading style sheets (CSS) to customize the appearance of the control, use either inline styles or a separate CSS file, but not both. Using both inline styles and a separate CSS file could cause unexpected results. For more information on using style sheets with controls, see [Web Server Controls and CSS Styles](https://msdn.microsoft.com/library/782c2db6-fc9b-4243-8df9-a8ffe2f4cc42).
The following table lists the available menu item styles.
|Menu item style property|Description|
|------------------------------|-----------------|
|<xref:System.Web.UI.WebControls.Menu.DynamicHoverStyle%2A>|The style settings for a dynamic menu item when the mouse pointer is positioned over it.|
|<xref:System.Web.UI.WebControls.Menu.DynamicMenuItemStyle%2A>|The style settings for an individual dynamic menu item.|
|<xref:System.Web.UI.WebControls.Menu.DynamicMenuStyle%2A>|The style settings for a dynamic menu.|
|<xref:System.Web.UI.WebControls.Menu.DynamicSelectedStyle%2A>|The style settings for the currently selected dynamic menu item.|
|<xref:System.Web.UI.WebControls.Menu.StaticHoverStyle%2A>|The style settings for a static menu item when the mouse pointer is positioned over it.|
|<xref:System.Web.UI.WebControls.Menu.StaticMenuItemStyle%2A>|The style settings for an individual static menu item.|
|<xref:System.Web.UI.WebControls.Menu.StaticMenuStyle%2A>|The style settings for a static menu.|
|<xref:System.Web.UI.WebControls.Menu.StaticSelectedStyle%2A>|The style settings for the currently selected static menu item.|
Instead of setting the individual style properties, you can specify styles that are applied to menu items based on their level by using the following style collections.
|Level style collections|Description|
|-----------------------------|-----------------|
|<xref:System.Web.UI.WebControls.Menu.LevelMenuItemStyles%2A>|A collection of <xref:System.Web.UI.WebControls.MenuItemStyle> objects that control the style of the menu items on a level basis.|
|<xref:System.Web.UI.WebControls.Menu.LevelSelectedStyles%2A>|A collection of <xref:System.Web.UI.WebControls.MenuItemStyle> objects that control the style of selected menu items on a level basis.|
|<xref:System.Web.UI.WebControls.Menu.LevelSubMenuStyles%2A>|A collection of <xref:System.Web.UI.WebControls.MenuItemStyle> objects that control the style of the submenu items on a level basis.|
The first style in the collection corresponds to the style of the menu items at the first depth level in the menu tree. The second style in the collection corresponds to the style of the menu items at the second depth level in the menu tree, and so on. This is most often used to generate table of contents-style navigation menus where menu items at a certain depth should have the same appearance, regardless of whether they have submenus.
> [!NOTE]
> If you use any of the level style collections listed in the previous table to define the style for the <xref:System.Web.UI.WebControls.Menu> control, these style settings override the individual menu item style properties.
Another way to alter the appearance of the control is to customize the images displayed in the <xref:System.Web.UI.WebControls.Menu> control. You can specify your own custom image for the different parts of the control by setting the properties shown in the following table.
|Image property|Description|
|--------------------|-----------------|
|<xref:System.Web.UI.WebControls.Menu.DynamicBottomSeparatorImageUrl%2A>|An optional image displayed at the bottom of a dynamic menu item to separate it from other menu items.|
|<xref:System.Web.UI.WebControls.Menu.DynamicPopOutImageUrl%2A>|An optional image displayed in a dynamic menu item to indicate that it has a submenu.|
|<xref:System.Web.UI.WebControls.Menu.DynamicTopSeparatorImageUrl%2A>|An optional image displayed at the top of a dynamic menu item to separate it from other menu items.|
|<xref:System.Web.UI.WebControls.Menu.ScrollDownImageUrl%2A>|The image displayed at the bottom of a menu item to indicate that the user can scroll down to view additional menu items.|
|<xref:System.Web.UI.WebControls.Menu.ScrollUpImageUrl%2A>|The image displayed at the top of a menu item to indicate that the user can scroll up to view additional menu items.|
|<xref:System.Web.UI.WebControls.Menu.StaticBottomSeparatorImageUrl%2A>|An optional image displayed at the bottom of a static menu item to separate it from other menu items.|
|<xref:System.Web.UI.WebControls.Menu.StaticPopOutImageUrl%2A>|An optional image displayed in a static menu item to indicate that it has a submenu.|
|<xref:System.Web.UI.WebControls.Menu.StaticTopSeparatorImageUrl%2A>|An optional image displayed at the top of a static menu item to separate it from other menu items.|
For complete control of the user interface (UI), you can define your own custom templates for the <xref:System.Web.UI.WebControls.Menu> control using the following template properties.
|Template property|Description|
|-----------------------|-----------------|
|<xref:System.Web.UI.WebControls.Menu.DynamicItemTemplate%2A>|The template that contains the custom content to render for a dynamic menu item.|
|<xref:System.Web.UI.WebControls.Menu.StaticItemTemplate%2A>|The template that contains the custom content to render for a static menu item.|
You can control the vertical and horizontal position of a dynamic menu relative to its parent menu item by setting the <xref:System.Web.UI.WebControls.Menu.DynamicVerticalOffset%2A> and <xref:System.Web.UI.WebControls.Menu.DynamicHorizontalOffset%2A> properties, respectively. To control the indentation of the static submenu items within a static menu, use the <xref:System.Web.UI.WebControls.Menu.StaticSubMenuIndent%2A> property.
<a name="events"></a>
## Events
The <xref:System.Web.UI.WebControls.Menu> control provides several events that you can program against. This allows you to run a custom routine whenever an event occurs. The following table lists the supported events.
|Event|Description|
|-----------|-----------------|
|<xref:System.Web.UI.WebControls.Menu.MenuItemClick>|Occurs when a menu item is clicked. This event is commonly used to synchronize a <xref:System.Web.UI.WebControls.Menu> control with another control on the page.|
|<xref:System.Web.UI.WebControls.Menu.MenuItemDataBound>|Occurs when a menu item is bound to data. This event is commonly used to modify a menu item before it is rendered in a <xref:System.Web.UI.WebControls.Menu> control.|
<a name="accessibility"></a>
## Accessibility
For information about how to configure this control so that it generates markup that conforms to accessibility standards, see [Accessibility in Visual Studio and ASP.NET](https://msdn.microsoft.com/library/7e3ce9c4-6b7d-4fb1-94b5-72cf2a44fe13) and [ASP.NET Controls and Accessibility](https://msdn.microsoft.com/library/847a37e3-ce20-41da-b0d3-7dfb0fdae9a0).
<a name="declarative_syntax"></a>
## Declarative Syntax
```
<asp:Menu
    AccessKey="string"
    BackColor="color name|#dddddd"
    BorderColor="color name|#dddddd"
    BorderStyle="NotSet|None|Dotted|Dashed|Solid|Double|Groove|Ridge|
Inset|Outset"
    BorderWidth="size"
    CssClass="string"
    DataSource="string"
    DataSourceID="string"
    DisappearAfter="integer"
    DynamicBottomSeparatorImageUrl="uri"
    DynamicEnableDefaultPopOutImage="True|False"
    DynamicHorizontalOffset="integer"
    DynamicItemFormatString="string"
    DynamicPopOutImageTextFormatString="string"
    DynamicPopOutImageUrl="uri"
    DynamicTopSeparatorImageUrl="uri"
    DynamicVerticalOffset="integer"
    Enabled="True|False"
    EnableTheming="True|False"
    EnableViewState="True|False"
    Font-Bold="True|False"
    Font-Italic="True|False"
    Font-Names="string"
    Font-Overline="True|False"
    Font-Size="string|Smaller|Larger|XX-Small|X-Small|Small|Medium|
Large|X-Large|XX-Large"
    Font-Strikeout="True|False"
    Font-Underline="True|False"
    ForeColor="color name|#dddddd"
    Height="size"
    ID="string"
    ItemWrap="True|False"
    MaximumDynamicDisplayLevels="integer"
    OnDataBinding="DataBinding event handler"
    OnDataBound="DataBound event handler"
    OnDisposed="Disposed event handler"
    OnInit="Init event handler"
    OnLoad="Load event handler"
    OnMenuItemClick="MenuItemClick event handler"
    OnMenuItemDataBound="MenuItemDataBound event handler"
    OnPreRender="PreRender event handler"
    OnUnload="Unload event handler"
    Orientation="Horizontal|Vertical"
    PathSeparator="string"
    runat="server"
    ScrollDownImageUrl="uri"
    ScrollDownText="string"
    ScrollUpImageUrl="uri"
    ScrollUpText="string"
    SkinID="string"
    SkipLinkText="string"
    StaticBottomSeparatorImageUrl="uri"
    StaticDisplayLevels="integer"
    StaticEnableDefaultPopOutImage="True|False"
    StaticItemFormatString="string"
    StaticPopOutImageTextFormatString="string"
    StaticPopOutImageUrl="uri"
    StaticSubMenuIndent="size"
    StaticTopSeparatorImageUrl="uri"
    Style="string"
    TabIndex="integer"
    Target="string"
    ToolTip="string"
    Visible="True|False"
    Width="size"
>
        <DataBindings>
                <asp:MenuItemBinding
                    DataMember="string"
                    Depth="integer"
                    Enabled="True|False"
                    EnabledField="string"
                    FormatString="string"
                    ImageUrl="uri"
                    ImageUrlField="string"
                    NavigateUrl="uri"
                    NavigateUrlField="string"
                    PopOutImageUrl="uri"
                    PopOutImageUrlField="string"
                    Selectable="True|False"
                    SelectableField="string"
                    SeparatorImageUrl="uri"
                    SeparatorImageUrlField="string"
                    Target="string"
                    TargetField="string"
                    Text="string"
                    TextField="string"
                    ToolTip="string"
                    ToolTipField="string"
                    Value="string"
                    ValueField="string"
                />
        </DataBindings>
        <DynamicHoverStyle />
        <DynamicItemTemplate>
<!-- child controls -->
        </DynamicItemTemplate>
        <DynamicMenuItemStyle
            BackColor="color name|#dddddd"
            BorderColor="color name|#dddddd"
            BorderStyle="NotSet|None|Dotted|Dashed|Solid|Double|
Groove|Ridge|Inset|Outset"
            BorderWidth="size"
            CssClass="string"
            Font-Bold="True|False"
            Font-Italic="True|False"
            Font-Names="string"
            Font-Overline="True|False"
            Font-Size="string|Smaller|Larger|XX-Small|X-Small|Small|
Medium|Large|X-Large|XX-Large"
            Font-Strikeout="True|False"
            Font-Underline="True|False"
            ForeColor="color name|#dddddd"
            Height="size"
            HorizontalPadding="size"
            ItemSpacing="size"
            OnDisposed="Disposed event handler"
            VerticalPadding="size"
            Width="size"
        />
        <DynamicMenuStyle
            BackColor="color name|#dddddd"
            BorderColor="color name|#dddddd"
            BorderStyle="NotSet|None|Dotted|Dashed|Solid|Double|
Groove|Ridge|Inset|Outset"
            BorderWidth="size"
            CssClass="string"
            Font-Bold="True|False"
            Font-Italic="True|False"
            Font-Names="string"
            Font-Overline="True|False"
            Font-Size="string|Smaller|Larger|XX-Small|X-Small|Small|
Medium|Large|X-Large|XX-Large"
            Font-Strikeout="True|False"
            Font-Underline="True|False"
            ForeColor="color name|#dddddd"
            Height="size"
            HorizontalPadding="size"
            OnDisposed="Disposed event handler"
            VerticalPadding="size"
            Width="size"
        />
        <DynamicSelectedStyle
            BackColor="color name|#dddddd"
            BorderColor="color name|#dddddd"
            BorderStyle="NotSet|None|Dotted|Dashed|Solid|Double|
Groove|Ridge|Inset|Outset"
            BorderWidth="size"
            CssClass="string"
            Font-Bold="True|False"
            Font-Italic="True|False"
            Font-Names="string"
            Font-Overline="True|False"
            Font-Size="string|Smaller|Larger|XX-Small|X-Small|Small|
Medium|Large|X-Large|XX-Large"
            Font-Strikeout="True|False"
            Font-Underline="True|False"
            ForeColor="color name|#dddddd"
            Height="size"
            HorizontalPadding="size"
            ItemSpacing="size"
            OnDisposed="Disposed event handler"
            VerticalPadding="size"
            Width="size"
        />
        <Items />
        <LevelMenuItemStyles>
                <asp:MenuItemStyle
                    BackColor="color name|#dddddd"
                    BorderColor="color name|#dddddd"
                    BorderStyle="NotSet|None|Dotted|Dashed|Solid|
Double|Groove|Ridge|Inset|Outset"
                    BorderWidth="size"
                    CssClass="string"
                    Font-Bold="True|False"
                    Font-Italic="True|False"
                    Font-Names="string"
                    Font-Overline="True|False"
                    Font-Size="string|Smaller|Larger|XX-Small|
X-Small|Small|Medium|Large|X-Large|XX-Large"
                    Font-Strikeout="True|False"
                    Font-Underline="True|False"
                    ForeColor="color name|#dddddd"
                    Height="size"
                    HorizontalPadding="size"
                    ItemSpacing="size"
                    OnDisposed="Disposed event handler"
                    VerticalPadding="size"
                    Width="size"
                />
        </LevelMenuItemStyles>
        <LevelSelectedStyles>
                <asp:MenuItemStyle
                    BackColor="color name|#dddddd"
                    BorderColor="color name|#dddddd"
                    BorderStyle="NotSet|None|Dotted|Dashed|Solid|
Double|Groove|Ridge|Inset|Outset"
                    BorderWidth="size"
                    CssClass="string"
                    Font-Bold="True|False"
                    Font-Italic="True|False"
                    Font-Names="string"
                    Font-Overline="True|False"
                    Font-Size="string|Smaller|Larger|XX-Small|
X-Small|Small|Medium|Large|X-Large|XX-Large"
                    Font-Strikeout="True|False"
                    Font-Underline="True|False"
                    ForeColor="color name|#dddddd"
                    Height="size"
                    HorizontalPadding="size"
                    ItemSpacing="size"
                    OnDisposed="Disposed event handler"
                    VerticalPadding="size"
                    Width="size"
                />
        </LevelSelectedStyles>
        <LevelSubMenuStyles>
                <asp:SubMenuStyle
                    BackColor="color name|#dddddd"
                    BorderColor="color name|#dddddd"
                    BorderStyle="NotSet|None|Dotted|Dashed|Solid|
Double|Groove|Ridge|Inset|Outset"
                    BorderWidth="size"
                    CssClass="string"
                    Font-Bold="True|False"
                    Font-Italic="True|False"
                    Font-Names="string"
                    Font-Overline="True|False"
                    Font-Size="string|Smaller|Larger|XX-Small|
X-Small|Small|Medium|Large|X-Large|XX-Large"
                    Font-Strikeout="True|False"
                    Font-Underline="True|False"
                    ForeColor="color name|#dddddd"
                    Height="size"
                    HorizontalPadding="size"
                    OnDisposed="Disposed event handler"
                    VerticalPadding="size"
                    Width="size"
                />
        </LevelSubMenuStyles>
        <StaticHoverStyle />
        <StaticItemTemplate>
<!-- child controls -->
        </StaticItemTemplate>
        <StaticMenuItemStyle
            BackColor="color name|#dddddd"
            BorderColor="color name|#dddddd"
            BorderStyle="NotSet|None|Dotted|Dashed|Solid|Double|
Groove|Ridge|Inset|Outset"
            BorderWidth="size"
            CssClass="string"
            Font-Bold="True|False"
            Font-Italic="True|False"
            Font-Names="string"
            Font-Overline="True|False"
            Font-Size="string|Smaller|Larger|XX-Small|
X-Small|Small|Medium|Large|X-Large|XX-Large"
            Font-Strikeout="True|False"
            Font-Underline="True|False"
            ForeColor="color name|#dddddd"
            Height="size"
            HorizontalPadding="size"
            ItemSpacing="size"
            OnDisposed="Disposed event handler"
            VerticalPadding="size"
            Width="size"
        />
        <StaticMenuStyle
            BackColor="color name|#dddddd"
            BorderColor="color name|#dddddd"
            BorderStyle="NotSet|None|Dotted|Dashed|Solid|Double|
Groove|Ridge|Inset|Outset"
            BorderWidth="size"
            CssClass="string"
            Font-Bold="True|False"
            Font-Italic="True|False"
            Font-Names="string"
            Font-Overline="True|False"
            Font-Size="string|Smaller|Larger|XX-Small|X-Small|Small|
Medium|Large|X-Large|XX-Large"
            Font-Strikeout="True|False"
            Font-Underline="True|False"
            ForeColor="color name|#dddddd"
            Height="size"
            HorizontalPadding="size"
            OnDisposed="Disposed event handler"
            VerticalPadding="size"
            Width="size"
        />
        <StaticSelectedStyle
            BackColor="color name|#dddddd"
            BorderColor="color name|#dddddd"
            BorderStyle="NotSet|None|Dotted|Dashed|Solid|Double|
Groove|Ridge|Inset|Outset"
            BorderWidth="size"
            CssClass="string"
            Font-Bold="True|False"
            Font-Italic="True|False"
            Font-Names="string"
            Font-Overline="True|False"
            Font-Size="string|Smaller|Larger|XX-Small|X-Small|Small|
Medium|Large|X-Large|XX-Large"
            Font-Strikeout="True|False"
            Font-Underline="True|False"
            ForeColor="color name|#dddddd"
            Height="size"
            HorizontalPadding="size"
            ItemSpacing="size"
            OnDisposed="Disposed event handler"
            VerticalPadding="size"
            Width="size"
        />
</asp:Menu>
```
## Examples
A Visual Studio Web site project with source code is available to accompany this topic: [Download](https://go.microsoft.com/fwlink/?LinkId=192868).
The following code example demonstrates how to create a <xref:System.Web.UI.WebControls.Menu> control with static menu items using declarative syntax.
[!code-aspx-csharp[MenuDeclarative#1](~/samples/snippets/csharp/VS_Snippets_WebNet/MenuDeclarative/CS/menudeclarativecs.aspx#1)]
[!code-aspx-vb[MenuDeclarative#1](~/samples/snippets/visualbasic/VS_Snippets_WebNet/MenuDeclarative/VB/menudeclarativevb.aspx#1)]
The following code example demonstrates how to bind the <xref:System.Web.UI.WebControls.Menu> control to a <xref:System.Web.UI.WebControls.SiteMapDataSource> control. For this example to work correctly, you must copy the sample site map data below to a file named Web.sitemap.
[!code-aspx-csharp[MenuDataBind#1](~/samples/snippets/csharp/VS_Snippets_WebNet/MenuDataBind/CS/menudatabindcs.aspx#1)]
[!code-aspx-vb[MenuDataBind#1](~/samples/snippets/visualbasic/VS_Snippets_WebNet/MenuDataBind/VB/menudatabindvb.aspx#1)]
The following is sample site map data for the previous example.
```
<siteMap>
<siteMapNode url="~\Home.aspx"
title="Home"
description="Home">
<siteMapNode url="~\Music.aspx"
title="Music"
description="Music">
<siteMapNode url="~\Classical.aspx"
title="Classical"
description="Classical"/>
<siteMapNode url="~\Rock.aspx"
title="Rock"
description="Rock"/>
<siteMapNode url="~\Jazz.aspx"
title="Jazz"
description="Jazz"/>
</siteMapNode>
<siteMapNode url="~\Movies.aspx"
title="Movies"
description="Movies">
<siteMapNode url="~\Action.aspx"
title="Action"
description="Action"/>
<siteMapNode url="~\Drama.aspx"
title="Drama"
description="Drama"/>
<siteMapNode url="~\Musical.aspx"
title="Musical"
description="Musical"/>
</siteMapNode>
</siteMapNode>
</siteMap>
```
]]></format>
</remarks>
<altmember cref="T:System.Web.UI.WebControls.TreeView" />
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public Menu ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.WebControls.Menu.#ctor" />
<MemberSignature Language="VB.NET" Value="Public Sub New ()" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; Menu();" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters />
<Docs>
<summary>Initializes a new instance of the <see cref="T:System.Web.UI.WebControls.Menu" /> class.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Use this constructor to create and initialize a new instance of the <xref:System.Web.UI.WebControls.Menu> class. To dynamically add a <xref:System.Web.UI.WebControls.Menu> control to a page, create a new <xref:System.Web.UI.WebControls.Menu> object, set its properties, and then add it to the <xref:System.Web.UI.Control.Controls%2A> collection of a container control, such as <xref:System.Web.UI.WebControls.PlaceHolder>.
## Examples
The following code example demonstrates how to use the constructor to dynamically add a <xref:System.Web.UI.WebControls.Menu> control to a page.
[!code-aspx-csharp[MenuCtor#1](~/samples/snippets/csharp/VS_Snippets_WebNet/MenuCtor/CS/menuctorcs.aspx#1)]
[!code-aspx-vb[MenuCtor#1](~/samples/snippets/visualbasic/VS_Snippets_WebNet/MenuCtor/VB/menuctorvb.aspx#1)]
]]></format>
</remarks>
<altmember cref="P:System.Web.UI.Control.Controls" />
<altmember cref="T:System.Web.UI.WebControls.PlaceHolder" />
</Docs>
</Member>
<Member MemberName="AddAttributesToRender">
<MemberSignature Language="C#" Value="protected override void AddAttributesToRender (System.Web.UI.HtmlTextWriter writer);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig virtual instance void AddAttributesToRender(class System.Web.UI.HtmlTextWriter writer) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.WebControls.Menu.AddAttributesToRender(System.Web.UI.HtmlTextWriter)" />
<MemberSignature Language="VB.NET" Value="Protected Overrides Sub AddAttributesToRender (writer As HtmlTextWriter)" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; override void AddAttributesToRender(System::Web::UI::HtmlTextWriter ^ writer);" />
<MemberSignature Language="F#" Value="override this.AddAttributesToRender : System.Web.UI.HtmlTextWriter -&gt; unit" Usage="menu.AddAttributesToRender writer" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="writer" Type="System.Web.UI.HtmlTextWriter" />
</Parameters>
<Docs>
<param name="writer">The output stream that renders HTML contents to the client.</param>
<summary>Adds HTML attributes and styles that need to be rendered to the specified <see cref="T:System.Web.UI.HtmlTextWriter" /> object.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.UI.WebControls.Menu> control overrides the <xref:System.Web.UI.WebControls.WebControl.AddAttributesToRender%2A> method to reset the <xref:System.Web.UI.WebControls.WebControl.AccessKey%2A> property to <xref:System.String.Empty>. This member is primarily used by control developers when deriving a custom control from the <xref:System.Web.UI.WebControls.Menu> class.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="Controls">
<MemberSignature Language="C#" Value="public override System.Web.UI.ControlCollection Controls { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Web.UI.ControlCollection Controls" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.WebControls.Menu.Controls" />
<MemberSignature Language="VB.NET" Value="Public Overrides ReadOnly Property Controls As ControlCollection" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual property System::Web::UI::ControlCollection ^ Controls { System::Web::UI::ControlCollection ^ get(); };" />
<MemberSignature Language="F#" Value="member this.Controls : System.Web.UI.ControlCollection" Usage="System.Web.UI.WebControls.Menu.Controls" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Web.UI.ControlCollection</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a <see cref="T:System.Web.UI.ControlCollection" /> that contains the child controls of the <see cref="T:System.Web.UI.WebControls.Menu" /> control.</summary>
<value>A <see cref="T:System.Web.UI.ControlCollection" /> that contains the child controls</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.UI.WebControls.Menu.Controls%2A> property allows you programmatic access to the instance of the <xref:System.Web.UI.ControlCollection> class for the <xref:System.Web.UI.WebControls.Menu> control. You can add controls to the collection, remove controls from the collection, or iterate through the server controls in the collection.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="CreateChildControls">
<MemberSignature Language="C#" Value="protected internal override void CreateChildControls ();" />
<MemberSignature Language="ILAsm" Value=".method familyorassemblyhidebysig virtual instance void CreateChildControls() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.WebControls.Menu.CreateChildControls" />
<MemberSignature Language="VB.NET" Value="Protected Friend Overrides Sub CreateChildControls ()" />
<MemberSignature Language="C++ CLI" Value="protected public:&#xA; override void CreateChildControls();" />
<MemberSignature Language="F#" Value="override this.CreateChildControls : unit -&gt; unit" Usage="menu.CreateChildControls " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Creates the child controls of a <see cref="T:System.Web.UI.WebControls.Menu" /> control.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This member is primarily used by control developers when deriving a custom control from the <xref:System.Web.UI.WebControls.Menu> class.
This method is called by the ASP.NET infrastructure to notify any controls that use composition-based implementation, including controls that derive from <xref:System.Web.UI.WebControls.CompositeDataBoundControl> and <xref:System.Web.UI.WebControls.CompositeControl>. to create any child controls they contain in preparation for postback or rendering.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="DataBind">
<MemberSignature Language="C#" Value="public override sealed void DataBind ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance void DataBind() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.WebControls.Menu.DataBind" />
<MemberSignature Language="VB.NET" Value="Public Overrides NotOverridable Sub DataBind ()" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; override void DataBind();" />
<MemberSignature Language="F#" Value="override this.DataBind : unit -&gt; unit" Usage="menu.DataBind " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Binds the data source to the <see cref="T:System.Web.UI.WebControls.Menu" /> control. This method cannot be inherited.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This member is used primarily by control developers when deriving a custom control from the <xref:System.Web.UI.WebControls.Menu> class.
Use the <xref:System.Web.UI.WebControls.Menu.DataBind%2A> method to bind data from a data source to the <xref:System.Web.UI.WebControls.Menu> control. This method resolves all data-binding expressions in the active template of the control.
]]></format>
</remarks>
<block subset="none" type="overrides">
<para>Data-bound controls should override <see cref="M:System.Web.UI.WebControls.Menu.PerformDataBinding" /> instead of <see cref="M:System.Web.UI.WebControls.Menu.DataBind" />. If <see cref="M:System.Web.UI.WebControls.Menu.DataBind" /> is overridden, the <see cref="M:System.Web.UI.WebControls.Menu.OnDataBinding(System.EventArgs)" /> and <see cref="M:System.Web.UI.WebControls.BaseDataBoundControl.OnDataBound(System.EventArgs)" /> events are raised in the wrong order.</para>
</block>
</Docs>
</Member>
<Member MemberName="DataBindings">
<MemberSignature Language="C#" Value="public System.Web.UI.WebControls.MenuItemBindingCollection DataBindings { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Web.UI.WebControls.MenuItemBindingCollection DataBindings" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.WebControls.Menu.DataBindings" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property DataBindings As MenuItemBindingCollection" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::Web::UI::WebControls::MenuItemBindingCollection ^ DataBindings { System::Web::UI::WebControls::MenuItemBindingCollection ^ get(); };" />
<MemberSignature Language="F#" Value="member this.DataBindings : System.Web.UI.WebControls.MenuItemBindingCollection" Usage="System.Web.UI.WebControls.Menu.DataBindings" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.DefaultValue(null)</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8">
<AttributeName>System.ComponentModel.Editor("System.Web.UI.Design.WebControls.MenuBindingsEditor, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof(System.Drawing.Design.UITypeEditor))</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.ComponentModel.MergableProperty(false)</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerProperty)</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5">
<AttributeName>System.ComponentModel.Editor("System.Web.UI.Design.WebControls.MenuBindingsEditor, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof(System.Drawing.Design.UITypeEditor))</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Web.UI.WebControls.MenuItemBindingCollection</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a collection of <see cref="T:System.Web.UI.WebControls.MenuItemBinding" /> objects that define the relationship between a data item and the menu item it is binding to.</summary>
<value>A <see cref="T:System.Web.UI.WebControls.MenuItemBindingCollection" /> that represents the relationship between a data item and the menu item it is binding to.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.UI.WebControls.Menu.DataBindings%2A> collection contains <xref:System.Web.UI.WebControls.MenuItemBinding> objects that define the relationship between a data item and the menu item it is binding to. When binding to a data source where each data item contains multiple properties (such as an XML element with several attributes), a menu item displays the value returned by the `ToString()` method of the data item by default. In the case of an XML element, the menu item displays the element name, which shows the underlying structure of the tree, but is not very useful otherwise. You can bind a menu item to a specific data item property by specifying menu item bindings.
When defining the relationship between a data item and a menu item, you must specify both the criteria for binding and the property of a data item to bind to. The criteria indicate when a data item should be bound to a menu item. The criteria can be specified with a depth, a data member, or both. The depth specifies the menu level that gets bound. For example, if you specify a depth of 0, all menu items in the tree structure at level 0 are bound using the menu item binding. A data member specifies the type of the data item in the underlying data source, but can represent different information depending on the data source. For example, the data member for an XML element specifies the name of the element.
If multiple <xref:System.Web.UI.WebControls.MenuItemBinding> objects are defined that conflict with each other, the <xref:System.Web.UI.WebControls.Menu> control applies the menu item bindings in the following order of precedence:
1. The <xref:System.Web.UI.WebControls.MenuItemBinding> object that defines both a depth and a data member.
2. The <xref:System.Web.UI.WebControls.MenuItemBinding> object that defines only the depth.
3. The <xref:System.Web.UI.WebControls.MenuItemBinding> object that defines only the data member.
4. The <xref:System.Web.UI.WebControls.MenuItemBinding> object that defines neither the depth nor the data member.
Once the binding criteria are established, you can then bind a property of a <xref:System.Web.UI.WebControls.MenuItem> object that is able to be bound to an attribute or field of a data item. For example, you can bind the <xref:System.Web.UI.WebControls.MenuItem.Text%2A> property of a menu item to the text attribute on an XML element by setting the <xref:System.Web.UI.WebControls.MenuItemBinding.TextField%2A> property of a <xref:System.Web.UI.WebControls.MenuItemBinding> object. You can also bind to a static value. If you set the <xref:System.Web.UI.WebControls.MenuItemBinding.Text%2A> property of a <xref:System.Web.UI.WebControls.MenuItemBinding> object, all menu items to which the <xref:System.Web.UI.WebControls.MenuItemBinding> object is applied share the same static text value. For more information on binding the properties of a <xref:System.Web.UI.WebControls.MenuItem> object to a value, see <xref:System.Web.UI.WebControls.MenuItemBinding>.
Although the <xref:System.Web.UI.WebControls.Menu.DataBindings%2A> collection can be programmatically populated, it is usually set declaratively. To specify the menu item bindings, first nest opening and closing `<DataBindings>` tags between the opening and closing tags of the <xref:System.Web.UI.WebControls.Menu> control. Next, place `<asp:MenuItemBinding>` elements between the opening and closing `<DataBindings>` tags for each menu item binding you want to specify.
## Examples
The following code example demonstrates how to use the <xref:System.Web.UI.WebControls.Menu.DataBindings%2A> collection to define the relationship between the fields of an <xref:System.Web.UI.WebControls.XmlDataSource> control and the menu items in a <xref:System.Web.UI.WebControls.Menu> control. For this example to work correctly, you must copy the sample XML data below to a file named Map.xml.
[!code-aspx-csharp[MenuBindings#1](~/samples/snippets/csharp/VS_Snippets_WebNet/MenuBindings/CS/menubindingscs.aspx#1)]
[!code-aspx-vb[MenuBindings#1](~/samples/snippets/visualbasic/VS_Snippets_WebNet/MenuBindings/VB/menubindingsvb.aspx#1)]
The following is sample site map data for the previous example.
```
<MapHomeNode url="~\Home.aspx"
title="Home"
description="Home">
<MapNode url="~\Music.aspx"
title="Music"
description="Music">
<MapNode url="~\Classical.aspx"
title="Classical"
description="Classical"/>
<MapNode url="~\Rock.aspx"
title="Rock"
description="Rock"/>
<MapNode url="~\Jazz.aspx"
title="Jazz"
description="Jazz"/>
</MapNode>
<MapNode url="~\Movies.aspx"
title="Movies"
description="Movies">
<MapNode url="~\Action.aspx"
title="Action"
description="Action"/>
<MapNode url="~\Drama.aspx"
title="Drama"
description="Drama"/>
<MapNode url="~\Musical.aspx"
title="Musical"
description="Musical"/>
</MapNode>
</MapHomeNode>
```
]]></format>
</remarks>
<altmember cref="T:System.Web.UI.WebControls.MenuItemBinding" />
<altmember cref="T:System.Web.UI.WebControls.MenuItemBindingCollection" />
</Docs>
</Member>
<Member MemberName="DisappearAfter">
<MemberSignature Language="C#" Value="public int DisappearAfter { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance int32 DisappearAfter" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.WebControls.Menu.DisappearAfter" />
<MemberSignature Language="VB.NET" Value="Public Property DisappearAfter As Integer" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property int DisappearAfter { int get(); void set(int value); };" />
<MemberSignature Language="F#" Value="member this.DisappearAfter : int with get, set" Usage="System.Web.UI.WebControls.Menu.DisappearAfter" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.DefaultValue(500)</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.Web.UI.Themeable(false)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the duration for which a dynamic menu is displayed after the mouse pointer is no longer positioned over the menu.</summary>
<value>The amount of time (in milliseconds) a dynamic menu is displayed after the mouse pointer is no longer positioned over the menu. The default is 500.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
By default, a dynamic menu automatically disappears after a certain duration when the mouse pointer is no longer positioned over the menu. Use the <xref:System.Web.UI.WebControls.Menu.DisappearAfter%2A> property to specify the duration.
> [!NOTE]
> A dynamic menu disappears immediately if the user clicks outside of the menu.
You can also specify that a dynamic menu should never automatically disappear by setting this property to -1. In this case, the dynamic menu item will disappear only when the user clicks outside the menu.
This property cannot be set by themes or style sheet themes. For more information, see <xref:System.Web.UI.ThemeableAttribute> and [ASP.NET Themes and Skins](https://msdn.microsoft.com/library/5df3ebbd-d46c-4502-9406-02f9df4ef2c3).
## Examples
The following code example demonstrates how to use the <xref:System.Web.UI.WebControls.Menu.DisappearAfter%2A> property to specify that a dynamic menu should disappear after the user moves the mouse pointer away from the menu for more than two seconds.
[!code-aspx-csharp[MenuDisappearAfter#1](~/samples/snippets/csharp/VS_Snippets_WebNet/MenuDisappearAfter/CS/menudisappearaftercs.aspx#1)]
[!code-aspx-vb[MenuDisappearAfter#1](~/samples/snippets/visualbasic/VS_Snippets_WebNet/MenuDisappearAfter/VB/menudisappearaftervb.aspx#1)]
]]></format>
</remarks>
<exception cref="T:System.ArgumentOutOfRangeException">The selected value is less than -1.</exception>
<altmember cref="P:System.Web.UI.WebControls.Menu.DynamicMenuStyle" />
</Docs>
</Member>
<Member MemberName="DynamicBottomSeparatorImageUrl">
<MemberSignature Language="C#" Value="public string DynamicBottomSeparatorImageUrl { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance string DynamicBottomSeparatorImageUrl" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.WebControls.Menu.DynamicBottomSeparatorImageUrl" />
<MemberSignature Language="VB.NET" Value="Public Property DynamicBottomSeparatorImageUrl As String" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::String ^ DynamicBottomSeparatorImageUrl { System::String ^ get(); void set(System::String ^ value); };" />
<MemberSignature Language="F#" Value="member this.DynamicBottomSeparatorImageUrl : string with get, set" Usage="System.Web.UI.WebControls.Menu.DynamicBottomSeparatorImageUrl" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.DefaultValue("")</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8">
<AttributeName>System.ComponentModel.Editor("System.Web.UI.Design.ImageUrlEditor, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof(System.Drawing.Design.UITypeEditor))</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.Web.UI.Themeable(true)</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.Web.UI.UrlProperty</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5">
<AttributeName>System.ComponentModel.Editor("System.Web.UI.Design.ImageUrlEditor, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof(System.Drawing.Design.UITypeEditor))</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the URL to an image to display at the bottom of each dynamic menu item to separate it from other menu items.</summary>
<value>The URL to a separator image displayed at the bottom of each dynamic menu item. The default value is an empty string (""), which indicates that this property is not set.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Use the <xref:System.Web.UI.WebControls.Menu.DynamicBottomSeparatorImageUrl%2A> property to specify an optional custom image to display at the bottom of each dynamic menu item. This image acts as a separator between menu items and is commonly an image of a line.
> [!NOTE]
> You can also display a separator image at the top of each dynamic menu item by setting the <xref:System.Web.UI.WebControls.Menu.DynamicTopSeparatorImageUrl%2A> property.
## Examples
The following code example demonstrates how to use the <xref:System.Web.UI.WebControls.Menu.DynamicBottomSeparatorImageUrl%2A> property to display a separator image at the bottom of each dynamic menu item.
[!code-aspx-csharp[MenuDynamicBottomSeparatorImageUrl#1](~/samples/snippets/csharp/VS_Snippets_WebNet/MenuDynamicBottomSeparatorImageUrl/CS/menudynamicbottomseparatorimageurlcs.aspx#1)]
[!code-aspx-vb[MenuDynamicBottomSeparatorImageUrl#1](~/samples/snippets/visualbasic/VS_Snippets_WebNet/MenuDynamicBottomSeparatorImageUrl/VB/menudynamicbottomseparatorimageurlvb.aspx#1)]
]]></format>
</remarks>
<altmember cref="P:System.Web.UI.WebControls.Menu.DynamicTopSeparatorImageUrl" />
<altmember cref="P:System.Web.UI.WebControls.Menu.ScrollDownImageUrl" />
<altmember cref="P:System.Web.UI.WebControls.Menu.ScrollDownText" />
<altmember cref="P:System.Web.UI.WebControls.Menu.ScrollUpImageUrl" />
<altmember cref="P:System.Web.UI.WebControls.Menu.ScrollUpText" />
<altmember cref="P:System.Web.UI.WebControls.Menu.StaticBottomSeparatorImageUrl" />
<altmember cref="P:System.Web.UI.WebControls.Menu.StaticTopSeparatorImageUrl" />
</Docs>
</Member>
<Member MemberName="DynamicEnableDefaultPopOutImage">
<MemberSignature Language="C#" Value="public bool DynamicEnableDefaultPopOutImage { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool DynamicEnableDefaultPopOutImage" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.WebControls.Menu.DynamicEnableDefaultPopOutImage" />
<MemberSignature Language="VB.NET" Value="Public Property DynamicEnableDefaultPopOutImage As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property bool DynamicEnableDefaultPopOutImage { bool get(); void set(bool value); };" />
<MemberSignature Language="F#" Value="member this.DynamicEnableDefaultPopOutImage : bool with get, set" Usage="System.Web.UI.WebControls.Menu.DynamicEnableDefaultPopOutImage" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.DefaultValue(true)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets a value indicating whether the built-in image that indicates that a dynamic menu item has a submenu is displayed.</summary>
<value>
<see langword="true" /> to display the built-in image for dynamic menu items with submenus; otherwise, <see langword="false" />. The default is <see langword="true" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
When a dynamic menu item contains a submenu, an image can be displayed to indicate that the user can expand the menu by positioning the mouse pointer over the menu item. There are two ways to display this image:
- Set the <xref:System.Web.UI.WebControls.Menu.DynamicEnableDefaultPopOutImage%2A> property to `true` to use the built-in image (default).
- Set the <xref:System.Web.UI.WebControls.Menu.DynamicPopOutImageUrl%2A> property to specify a custom image.
If the <xref:System.Web.UI.WebControls.Menu.DynamicPopOutImageUrl%2A> property is set, that image overrides the built-in image.
> [!NOTE]
> If the <xref:System.Web.UI.WebControls.Menu.DynamicPopOutImageUrl%2A> property is not set and the <xref:System.Web.UI.WebControls.Menu.DynamicEnableDefaultPopOutImage%2A> property is set to `false`, no image is displayed.
You can specify alternate text for the image by setting the <xref:System.Web.UI.WebControls.Menu.DynamicPopOutImageTextFormatString%2A> property. This text is displayed as a ToolTip when the user positions the mouse pointer over the image. This text also provides assistive technology devices with a description of the image that can be used to make the control more accessible.
## Examples
The following code example demonstrates how to use the <xref:System.Web.UI.WebControls.Menu.DynamicEnableDefaultPopOutImage%2A> property to hide the image that indicates that a dynamic menu item has a submenu. The <xref:System.Web.UI.WebControls.Menu.DynamicPopOutImageUrl%2A> property must also be set to an empty string ("") for the image to be hidden.
[!code-aspx-csharp[MenuDynamicEnableDefaultPopOutImage#1](~/samples/snippets/csharp/VS_Snippets_WebNet/MenuDynamicEnableDefaultPopOutImage/CS/menudynamicenabledefaultpopoutimagecs.aspx#1)]
[!code-aspx-vb[MenuDynamicEnableDefaultPopOutImage#1](~/samples/snippets/visualbasic/VS_Snippets_WebNet/MenuDynamicEnableDefaultPopOutImage/VB/menudynamicenabledefaultpopoutimagevb.aspx#1)]
]]></format>
</remarks>
<altmember cref="P:System.Web.UI.WebControls.Menu.DynamicPopOutImageUrl" />
<altmember cref="P:System.Web.UI.WebControls.Menu.DynamicPopOutImageTextFormatString" />
<altmember cref="P:System.Web.UI.WebControls.Menu.StaticEnableDefaultPopOutImage" />
<altmember cref="P:System.Web.UI.WebControls.Menu.StaticPopOutImageUrl" />
<altmember cref="P:System.Web.UI.WebControls.Menu.StaticPopOutImageTextFormatString" />
</Docs>
</Member>
<Member MemberName="DynamicHorizontalOffset">
<MemberSignature Language="C#" Value="public int DynamicHorizontalOffset { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance int32 DynamicHorizontalOffset" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.WebControls.Menu.DynamicHorizontalOffset" />
<MemberSignature Language="VB.NET" Value="Public Property DynamicHorizontalOffset As Integer" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property int DynamicHorizontalOffset { int get(); void set(int value); };" />
<MemberSignature Language="F#" Value="member this.DynamicHorizontalOffset : int with get, set" Usage="System.Web.UI.WebControls.Menu.DynamicHorizontalOffset" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.DefaultValue(0)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the number of pixels to shift a dynamic menu horizontally relative to its parent menu item.</summary>
<value>The number of pixels to shift a dynamic menu horizontally relative to its parent menu item. The default is 0.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Use the <xref:System.Web.UI.WebControls.Menu.DynamicHorizontalOffset%2A> property to adjust the horizontal position of a dynamic menu relative to its parent menu item. This property affects the position of a dynamic menu differently depending on whether the <xref:System.Web.UI.WebControls.Menu> control is displayed vertically or horizontally (as specified by the <xref:System.Web.UI.WebControls.Menu.Orientation%2A> property). The following table describes the differences.
|Orientation|Description|
|-----------------|-----------------|
|Horizontal|By default, a dynamic menu is displayed directly below its parent menu item. Setting this property shifts the dynamic menu position horizontally from this base position.|
|Vertical|By default, a dynamic menu item is displayed next to its parent menu item without any spacing in between. Setting this property controls the horizontal spacing between the dynamic menu and its parent menu item.|
> [!NOTE]
> You can set this property to a negative value to shift a dynamic menu in a negative direction. If you are displaying a vertical menu, a negative value causes a dynamic menu and its parent menu item to overlap.
## Examples
The following code example demonstrates how to use the <xref:System.Web.UI.WebControls.Menu.DynamicHorizontalOffset%2A> property to specify a 5-pixel gap between a dynamic menu and its parent menu item.
[!code-aspx-csharp[MenuDynamicHorizontalOffset#1](~/samples/snippets/csharp/VS_Snippets_WebNet/MenuDynamicHorizontalOffset/CS/menudynamichorizontaloffsetcs.aspx#1)]
[!code-aspx-vb[MenuDynamicHorizontalOffset#1](~/samples/snippets/visualbasic/VS_Snippets_WebNet/MenuDynamicHorizontalOffset/VB/menudynamichorizontaloffsetvb.aspx#1)]
]]></format>
</remarks>
<altmember cref="P:System.Web.UI.WebControls.Menu.DynamicVerticalOffset" />
<altmember cref="P:System.Web.UI.WebControls.Menu.StaticSubMenuIndent" />
</Docs>
</Member>
<Member MemberName="DynamicHoverStyle">
<MemberSignature Language="C#" Value="public System.Web.UI.WebControls.Style DynamicHoverStyle { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Web.UI.WebControls.Style DynamicHoverStyle" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.WebControls.Menu.DynamicHoverStyle" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property DynamicHoverStyle As Style" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::Web::UI::WebControls::Style ^ DynamicHoverStyle { System::Web::UI::WebControls::Style ^ get(); };" />
<MemberSignature Language="F#" Value="member this.DynamicHoverStyle : System.Web.UI.WebControls.Style" Usage="System.Web.UI.WebControls.Menu.DynamicHoverStyle" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.DefaultValue(null)</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.ComponentModel.NotifyParentProperty(true)</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerProperty)</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Web.UI.WebControls.Style</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a reference to the <see cref="T:System.Web.UI.WebControls.Style" /> object that allows you to set the appearance of a dynamic menu item when the mouse pointer is positioned over it.</summary>
<value>A reference to the <see cref="T:System.Web.UI.WebControls.Style" /> that represents the style of a dynamic menu item when the mouse pointer is positioned over it.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Use the <xref:System.Web.UI.WebControls.Menu.DynamicHoverStyle%2A> property to control the appearance of a dynamic menu item when the mouse pointer is positioned over it. This property is read-only; however, you can set the properties of the <xref:System.Web.UI.WebControls.Style> object it returns. The properties can be set declaratively in the form `Property-Subproperty`, where `Subproperty` is a property of the <xref:System.Web.UI.WebControls.Style> object (for example, `DynamicHoverStyle-ForeColor`). The properties can also be set programmatically in the form `Property.Subproperty` (for example, `DynamicHoverStyle.ForeColor`).
Style properties for a dynamic menu item are applied in the following order:
1. <xref:System.Web.UI.WebControls.Menu.DynamicMenuStyle%2A>.
2. <xref:System.Web.UI.WebControls.Menu.DynamicMenuItemStyle%2A>. If the <xref:System.Web.UI.WebControls.Menu.LevelMenuItemStyles%2A> collection or <xref:System.Web.UI.WebControls.Menu.LevelSubMenuStyles%2A> collection is defined, it is applied at this time, overriding the other menu item style properties.
3. <xref:System.Web.UI.WebControls.Menu.DynamicSelectedStyle%2A>. If the <xref:System.Web.UI.WebControls.Menu.LevelSelectedStyles%2A> collection is defined, it is applied at this time, overriding the other menu item style properties.
4. <xref:System.Web.UI.WebControls.Menu.DynamicHoverStyle%2A>.
## Examples
The following code example demonstrates how to use the <xref:System.Web.UI.WebControls.Menu.DynamicHoverStyle%2A> property to change the background color of a dynamic menu item to light sky blue when the user positions the mouse pointer over it.
[!code-aspx-csharp[MenuDynamicHoverStyle#1](~/samples/snippets/csharp/VS_Snippets_WebNet/MenuDynamicHoverStyle/CS/menudynamichoverstylecs.aspx#1)]
[!code-aspx-vb[MenuDynamicHoverStyle#1](~/samples/snippets/visualbasic/VS_Snippets_WebNet/MenuDynamicHoverStyle/VB/menudynamichoverstylevb.aspx#1)]
]]></format>
</remarks>
<altmember cref="P:System.Web.UI.WebControls.Menu.DynamicMenuItemStyle" />
<altmember cref="P:System.Web.UI.WebControls.Menu.DynamicMenuStyle" />
<altmember cref="P:System.Web.UI.WebControls.Menu.DynamicSelectedStyle" />
<altmember cref="P:System.Web.UI.WebControls.Menu.LevelMenuItemStyles" />
<altmember cref="P:System.Web.UI.WebControls.Menu.LevelSelectedStyles" />
<altmember cref="P:System.Web.UI.WebControls.Menu.LevelSubMenuStyles" />
<altmember cref="P:System.Web.UI.WebControls.Menu.StaticHoverStyle" />
<altmember cref="P:System.Web.UI.WebControls.Menu.StaticMenuItemStyle" />
<altmember cref="P:System.Web.UI.WebControls.Menu.StaticMenuStyle" />
<altmember cref="P:System.Web.UI.WebControls.Menu.StaticSelectedStyle" />
</Docs>
</Member>
<Member MemberName="DynamicItemFormatString">
<MemberSignature Language="C#" Value="public string DynamicItemFormatString { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance string DynamicItemFormatString" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.WebControls.Menu.DynamicItemFormatString" />
<MemberSignature Language="VB.NET" Value="Public Property DynamicItemFormatString As String" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::String ^ DynamicItemFormatString { System::String ^ get(); void set(System::String ^ value); };" />
<MemberSignature Language="F#" Value="member this.DynamicItemFormatString : string with get, set" Usage="System.Web.UI.WebControls.Menu.DynamicItemFormatString" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.DefaultValue("")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets additional text shown with all menu items that are dynamically displayed.</summary>
<value>The additional text or characters that appear with all menu items. The default value for this property is "{0}."</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This property can be used to insert text to format dynamic menu items in a menu displayed on mobile devices. The <xref:System.Web.UI.WebControls.Menu> control supports templates for the display of static and dynamic menu items. For mobile devices, templates are ignored, so this property allows you to add characters or text to apply formatting to menu items without using a template.
> [!NOTE]
> To achieve consistent formatting when you use this property, you should also set the <xref:System.Web.UI.WebControls.Menu.StaticItemFormatString%2A> property if you want the formatting to be identical between the static and dynamic menu items.
If both template formatting and this property are applied, the template formatting is ignored for mobile devices.
## Examples
The following code example demonstrates how to use the <xref:System.Web.UI.WebControls.Menu.StaticItemFormatString%2A> and <xref:System.Web.UI.WebControls.Menu.DynamicItemFormatString%2A> properties to add text to each menu item.
[!code-aspx-csharp[MenuItemFormatString#1](~/samples/snippets/csharp/VS_Snippets_WebNet/MenuItemFormatString/CS/menuitemformatstringcs.aspx#1)]
[!code-aspx-vb[MenuItemFormatString#1](~/samples/snippets/visualbasic/VS_Snippets_WebNet/MenuItemFormatString/VB/menuitemformatstringvb.aspx#1)]
]]></format>
</remarks>
<altmember cref="P:System.Web.UI.WebControls.Menu.DynamicItemTemplate" />
<altmember cref="P:System.Web.UI.WebControls.Menu.StaticItemFormatString" />
</Docs>
</Member>
<Member MemberName="DynamicItemTemplate">
<MemberSignature Language="C#" Value="public System.Web.UI.ITemplate DynamicItemTemplate { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Web.UI.ITemplate DynamicItemTemplate" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.WebControls.Menu.DynamicItemTemplate" />
<MemberSignature Language="VB.NET" Value="Public Property DynamicItemTemplate As ITemplate" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::Web::UI::ITemplate ^ DynamicItemTemplate { System::Web::UI::ITemplate ^ get(); void set(System::Web::UI::ITemplate ^ value); };" />
<MemberSignature Language="F#" Value="member this.DynamicItemTemplate : System.Web.UI.ITemplate with get, set" Usage="System.Web.UI.WebControls.Menu.DynamicItemTemplate" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.Browsable(false)</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.ComponentModel.DefaultValue(null)</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerProperty)</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.Web.UI.TemplateContainer(typeof(System.Web.UI.WebControls.MenuItemTemplateContainer))</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>set: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Web.UI.ITemplate</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the template that contains the custom content to render for a dynamic menu.</summary>
<value>A <see cref="T:System.Web.UI.ITemplate" /> that contains the custom content for a dynamic menu. The default value is null, which indicates that this property is not set.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Instead of using the built-in rendering for a dynamic menu, you can define your own look and feel for a dynamic menu item by using the <xref:System.Web.UI.WebControls.Menu.DynamicItemTemplate%2A> property. To specify a custom template for a dynamic menu item, first place `<DynamicItemTemplate>` tags between the opening and closing tags of the <xref:System.Web.UI.WebControls.Menu> control. You can then list the contents of the template between the opening and closing `<DynamicItemTemplate>` tags. You can further control the style of a dynamic menu by using the <xref:System.Web.UI.WebControls.Menu.DynamicItemFormatString%2A> property.
]]></format>
</remarks>
<altmember cref="P:System.Web.UI.WebControls.Menu.StaticItemTemplate" />
<altmember cref="P:System.Web.UI.WebControls.Menu.DynamicItemFormatString" />
</Docs>
</Member>
<Member MemberName="DynamicMenuItemStyle">
<MemberSignature Language="C#" Value="public System.Web.UI.WebControls.MenuItemStyle DynamicMenuItemStyle { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Web.UI.WebControls.MenuItemStyle DynamicMenuItemStyle" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.WebControls.Menu.DynamicMenuItemStyle" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property DynamicMenuItemStyle As MenuItemStyle" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::Web::UI::WebControls::MenuItemStyle ^ DynamicMenuItemStyle { System::Web::UI::WebControls::MenuItemStyle ^ get(); };" />
<MemberSignature Language="F#" Value="member this.DynamicMenuItemStyle : System.Web.UI.WebControls.MenuItemStyle" Usage="System.Web.UI.WebControls.Menu.DynamicMenuItemStyle" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.DefaultValue(null)</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.ComponentModel.NotifyParentProperty(true)</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerProperty)</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Web.UI.WebControls.MenuItemStyle</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a reference to the <see cref="T:System.Web.UI.WebControls.MenuItemStyle" /> object that allows you to set the appearance of the menu items within a dynamic menu.</summary>
<value>A reference to the <see cref="T:System.Web.UI.WebControls.MenuItemStyle" /> that represents the style of the menu items within a dynamic menu.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Use the <xref:System.Web.UI.WebControls.Menu.DynamicMenuItemStyle%2A> property to control the appearance of the menu items within a dynamic menu. This property is read-only; however, you can set the properties of the <xref:System.Web.UI.WebControls.MenuItemStyle> object it returns. The properties can be set declaratively in the form `Property-Subproperty`, where `Subproperty` is a property of the <xref:System.Web.UI.WebControls.MenuItemStyle> object (for example, `DynamicMenuItemStyle-ForeColor`). The properties can also be set programmatically in the form `Property.Subproperty` (for example, `DynamicMenuItemStyle.ForeColor`).
Style properties for a dynamic menu item are applied in the following order:
1. <xref:System.Web.UI.WebControls.Menu.DynamicMenuStyle%2A>.
2. <xref:System.Web.UI.WebControls.Menu.DynamicMenuItemStyle%2A>. If the <xref:System.Web.UI.WebControls.Menu.LevelMenuItemStyles%2A> collection or <xref:System.Web.UI.WebControls.Menu.LevelSubMenuStyles%2A> collection is defined, it is applied at this time, overriding the other menu item style properties.
3. <xref:System.Web.UI.WebControls.Menu.DynamicSelectedStyle%2A>. If the <xref:System.Web.UI.WebControls.Menu.LevelSelectedStyles%2A> collection is defined, it is applied at this time, overriding the other menu item style properties.
4. <xref:System.Web.UI.WebControls.Menu.DynamicHoverStyle%2A>.
## Examples
The following code example demonstrates how to use the <xref:System.Web.UI.WebControls.Menu.DynamicMenuItemStyle%2A> property to specify a light sky blue background color for the menu items in a dynamic menu.
[!code-aspx-csharp[MenuDynamicMenuItemStyle#1](~/samples/snippets/csharp/VS_Snippets_WebNet/menudynamicmenuitemstyle/CS/MenuDynamicMenuItemStylecs.aspx#1)]
[!code-aspx-vb[MenuDynamicMenuItemStyle#1](~/samples/snippets/visualbasic/VS_Snippets_WebNet/menudynamicmenuitemstyle/VB/MenuDynamicMenuItemStylevb.aspx#1)]
]]></format>
</remarks>
<altmember cref="P:System.Web.UI.WebControls.Menu.DynamicHoverStyle" />
<altmember cref="P:System.Web.UI.WebControls.Menu.DynamicMenuStyle" />
<altmember cref="P:System.Web.UI.WebControls.Menu.DynamicSelectedStyle" />
<altmember cref="P:System.Web.UI.WebControls.Menu.LevelMenuItemStyles" />
<altmember cref="P:System.Web.UI.WebControls.Menu.LevelSelectedStyles" />
<altmember cref="P:System.Web.UI.WebControls.Menu.LevelSubMenuStyles" />
<altmember cref="P:System.Web.UI.WebControls.Menu.StaticHoverStyle" />
<altmember cref="P:System.Web.UI.WebControls.Menu.StaticMenuItemStyle" />
<altmember cref="P:System.Web.UI.WebControls.Menu.StaticMenuStyle" />
<altmember cref="P:System.Web.UI.WebControls.Menu.StaticSelectedStyle" />
</Docs>
</Member>
<Member MemberName="DynamicMenuStyle">
<MemberSignature Language="C#" Value="public System.Web.UI.WebControls.SubMenuStyle DynamicMenuStyle { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Web.UI.WebControls.SubMenuStyle DynamicMenuStyle" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.WebControls.Menu.DynamicMenuStyle" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property DynamicMenuStyle As SubMenuStyle" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::Web::UI::WebControls::SubMenuStyle ^ DynamicMenuStyle { System::Web::UI::WebControls::SubMenuStyle ^ get(); };" />
<MemberSignature Language="F#" Value="member this.DynamicMenuStyle : System.Web.UI.WebControls.SubMenuStyle" Usage="System.Web.UI.WebControls.Menu.DynamicMenuStyle" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.DefaultValue(null)</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.ComponentModel.NotifyParentProperty(true)</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerProperty)</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Web.UI.WebControls.SubMenuStyle</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a reference to the <see cref="T:System.Web.UI.WebControls.MenuItemStyle" /> object that allows you to set the appearance of a dynamic menu.</summary>
<value>A reference to the <see cref="T:System.Web.UI.WebControls.MenuItemStyle" /> that represents the style of a dynamic menu.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Use the <xref:System.Web.UI.WebControls.Menu.DynamicMenuStyle%2A> property to control the appearance of a dynamic menu. This property is read-only; however, you can set the properties of the <xref:System.Web.UI.WebControls.MenuItemStyle> object it returns. The properties can be set declaratively in the form `Property-Subproperty`, where `Subproperty` is a property of the <xref:System.Web.UI.WebControls.MenuItemStyle> object (for example, `DynamicMenuStyle-ForeColor`). The properties can also be set programmatically in the form `Property.Subproperty` (for example, `DynamicMenuStyle.ForeColor`).
Style properties for a dynamic menu item are applied in the following order:
1. <xref:System.Web.UI.WebControls.Menu.DynamicMenuStyle%2A>.
2. <xref:System.Web.UI.WebControls.Menu.DynamicMenuItemStyle%2A>. If the <xref:System.Web.UI.WebControls.Menu.LevelMenuItemStyles%2A> collection or <xref:System.Web.UI.WebControls.Menu.LevelSubMenuStyles%2A> collection is defined, it is applied at this time, overriding the other menu item style properties.
3. <xref:System.Web.UI.WebControls.Menu.DynamicSelectedStyle%2A>. If the <xref:System.Web.UI.WebControls.Menu.LevelSelectedStyles%2A> collection is defined, it is applied at this time, overriding the other menu item style properties.
4. <xref:System.Web.UI.WebControls.Menu.DynamicHoverStyle%2A>.
## Examples
The following code example demonstrates how to use the <xref:System.Web.UI.WebControls.Menu.DynamicMenuStyle%2A> property to specify a light sky blue background color for a dynamic menu.
[!code-aspx-csharp[MenuDynamicMenuStyle#1](~/samples/snippets/csharp/VS_Snippets_WebNet/MenuDynamicMenuStyle/CS/menudynamicmenustylecs.aspx#1)]
[!code-aspx-vb[MenuDynamicMenuStyle#1](~/samples/snippets/visualbasic/VS_Snippets_WebNet/MenuDynamicMenuStyle/VB/menudynamicmenustylevb.aspx#1)]
]]></format>
</remarks>
<altmember cref="P:System.Web.UI.WebControls.Menu.DynamicHoverStyle" />
<altmember cref="P:System.Web.UI.WebControls.Menu.DynamicMenuItemStyle" />
<altmember cref="P:System.Web.UI.WebControls.Menu.DynamicSelectedStyle" />
<altmember cref="P:System.Web.UI.WebControls.Menu.LevelMenuItemStyles" />
<altmember cref="P:System.Web.UI.WebControls.Menu.LevelSelectedStyles" />
<altmember cref="P:System.Web.UI.WebControls.Menu.LevelSubMenuStyles" />
<altmember cref="P:System.Web.UI.WebControls.Menu.StaticHoverStyle" />
<altmember cref="P:System.Web.UI.WebControls.Menu.StaticMenuItemStyle" />
<altmember cref="P:System.Web.UI.WebControls.Menu.StaticMenuStyle" />
<altmember cref="P:System.Web.UI.WebControls.Menu.StaticSelectedStyle" />
</Docs>
</Member>
<Member MemberName="DynamicPopOutImageTextFormatString">
<MemberSignature Language="C#" Value="public string DynamicPopOutImageTextFormatString { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance string DynamicPopOutImageTextFormatString" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.WebControls.Menu.DynamicPopOutImageTextFormatString" />
<MemberSignature Language="VB.NET" Value="Public Property DynamicPopOutImageTextFormatString As String" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::String ^ DynamicPopOutImageTextFormatString { System::String ^ get(); void set(System::String ^ value); };" />
<MemberSignature Language="F#" Value="member this.DynamicPopOutImageTextFormatString : string with get, set" Usage="System.Web.UI.WebControls.Menu.DynamicPopOutImageTextFormatString" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the alternate text for the image used to indicate that a dynamic menu item has a submenu.</summary>
<value>The alternate text for the image used to indicate that a dynamic menu item has a submenu. The default is an empty string (""), which indicates that this property is not set.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
When a dynamic menu item contains a submenu, an image can be displayed to indicate that the user can expand the menu. Use the <xref:System.Web.UI.WebControls.Menu.DynamicPopOutImageTextFormatString%2A> property to specify the alternate text for this image. The text that you specify provides assistive technology devices with a description of the image that can be used to make the control more accessible.
There are two ways to display the image:
- Set the <xref:System.Web.UI.WebControls.Menu.DynamicEnableDefaultPopOutImage%2A> property to `true` to use the built-in image (default).
- Set the <xref:System.Web.UI.WebControls.Menu.DynamicPopOutImageUrl%2A> property to specify a custom image.
> [!NOTE]
> This property applies to both the built-in image and the custom image.
## Examples
The following code example demonstrates how to use the <xref:System.Web.UI.WebControls.Menu.DynamicPopOutImageTextFormatString%2A> property to specify the alternate text for the image used to indicate that a dynamic menu item has a submenu. This text is displayed as a ToolTip when the user positions the mouse pointer over the image.
[!code-aspx-csharp[MenuDynamicPopoutImageText#1](~/samples/snippets/csharp/VS_Snippets_WebNet/MenuDynamicPopoutImageText/CS/menudynamicpopoutimagetextcs.aspx#1)]
[!code-aspx-vb[MenuDynamicPopoutImageText#1](~/samples/snippets/visualbasic/VS_Snippets_WebNet/MenuDynamicPopoutImageText/VB/menudynamicpopoutimagetextvb.aspx#1)]
]]></format>
</remarks>
<altmember cref="P:System.Web.UI.WebControls.Menu.DynamicEnableDefaultPopOutImage" />
<altmember cref="P:System.Web.UI.WebControls.Menu.DynamicPopOutImageUrl" />
<altmember cref="P:System.Web.UI.WebControls.Menu.StaticEnableDefaultPopOutImage" />
<altmember cref="P:System.Web.UI.WebControls.Menu.StaticPopOutImageUrl" />
<altmember cref="P:System.Web.UI.WebControls.Menu.StaticPopOutImageTextFormatString" />
</Docs>
</Member>
<Member MemberName="DynamicPopOutImageUrl">
<MemberSignature Language="C#" Value="public string DynamicPopOutImageUrl { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance string DynamicPopOutImageUrl" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.WebControls.Menu.DynamicPopOutImageUrl" />
<MemberSignature Language="VB.NET" Value="Public Property DynamicPopOutImageUrl As String" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::String ^ DynamicPopOutImageUrl { System::String ^ get(); void set(System::String ^ value); };" />
<MemberSignature Language="F#" Value="member this.DynamicPopOutImageUrl : string with get, set" Usage="System.Web.UI.WebControls.Menu.DynamicPopOutImageUrl" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.DefaultValue("")</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8">
<AttributeName>System.ComponentModel.Editor("System.Web.UI.Design.ImageUrlEditor, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof(System.Drawing.Design.UITypeEditor))</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.Web.UI.UrlProperty</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5">
<AttributeName>System.ComponentModel.Editor("System.Web.UI.Design.ImageUrlEditor, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof(System.Drawing.Design.UITypeEditor))</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the URL to a custom image that is displayed in a dynamic menu item when the dynamic menu item has a submenu.</summary>
<value>The URL to an image used to indicate that a dynamic menu item has a submenu. The default value is an empty string (""), which indicates that this property is not set.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
When a dynamic menu item contains a submenu, an image can be displayed to indicate that the user can expand the menu by positioning the mouse pointer over the menu item. There are two ways to display this image:
- Set the <xref:System.Web.UI.WebControls.Menu.DynamicEnableDefaultPopOutImage%2A> property to `true` to use the built-in image (default).
- Set the <xref:System.Web.UI.WebControls.Menu.DynamicPopOutImageUrl%2A> property to specify a custom image.
If the <xref:System.Web.UI.WebControls.Menu.DynamicPopOutImageUrl%2A> property is set, that image overrides the built-in image.
If the <xref:System.Web.UI.WebControls.Menu.DynamicPopOutImageUrl%2A> property is not set and the <xref:System.Web.UI.WebControls.Menu.DynamicEnableDefaultPopOutImage%2A> property is set to `false`, no image is displayed.
> [!NOTE]
> When you set this property, use a slash mark (/) instead of a backslash (\\). If you use backslashes in the path, the specified image will not be displayed.
You can specify alternate text for the image by setting the <xref:System.Web.UI.WebControls.Menu.DynamicPopOutImageTextFormatString%2A> property.
## Examples
The following code example demonstrates how to use the <xref:System.Web.UI.WebControls.Menu.DynamicPopOutImageUrl%2A> property to specify a custom image to display in a dynamic menu item to indicate that the menu item has a submenu.
[!code-aspx-csharp[MenuDynamicPopoutImageText#1](~/samples/snippets/csharp/VS_Snippets_WebNet/MenuDynamicPopoutImageText/CS/menudynamicpopoutimagetextcs.aspx#1)]
[!code-aspx-vb[MenuDynamicPopoutImageText#1](~/samples/snippets/visualbasic/VS_Snippets_WebNet/MenuDynamicPopoutImageText/VB/menudynamicpopoutimagetextvb.aspx#1)]
]]></format>
</remarks>
<altmember cref="P:System.Web.UI.WebControls.Menu.DynamicEnableDefaultPopOutImage" />
<altmember cref="P:System.Web.UI.WebControls.Menu.DynamicPopOutImageTextFormatString" />
<altmember cref="P:System.Web.UI.WebControls.Menu.StaticEnableDefaultPopOutImage" />
<altmember cref="P:System.Web.UI.WebControls.Menu.StaticPopOutImageUrl" />
<altmember cref="P:System.Web.UI.WebControls.Menu.StaticPopOutImageTextFormatString" />
</Docs>
</Member>
<Member MemberName="DynamicSelectedStyle">
<MemberSignature Language="C#" Value="public System.Web.UI.WebControls.MenuItemStyle DynamicSelectedStyle { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Web.UI.WebControls.MenuItemStyle DynamicSelectedStyle" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.WebControls.Menu.DynamicSelectedStyle" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property DynamicSelectedStyle As MenuItemStyle" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::Web::UI::WebControls::MenuItemStyle ^ DynamicSelectedStyle { System::Web::UI::WebControls::MenuItemStyle ^ get(); };" />
<MemberSignature Language="F#" Value="member this.DynamicSelectedStyle : System.Web.UI.WebControls.MenuItemStyle" Usage="System.Web.UI.WebControls.Menu.DynamicSelectedStyle" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.DefaultValue(null)</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.ComponentModel.NotifyParentProperty(true)</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerProperty)</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Web.UI.WebControls.MenuItemStyle</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a reference to the <see cref="T:System.Web.UI.WebControls.MenuItemStyle" /> object that allows you to set the appearance of the dynamic menu item selected by the user.</summary>
<value>A reference to the <see cref="T:System.Web.UI.WebControls.MenuItemStyle" /> that represents the style of the selected dynamic menu item.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Use the <xref:System.Web.UI.WebControls.Menu.DynamicSelectedStyle%2A> property to control the appearance of a dynamic menu item when the user selects it from the menu. This property is read-only; however, you can set the properties of the <xref:System.Web.UI.WebControls.MenuItemStyle> object it returns. The properties can be set declaratively in the form `Property-Subproperty`, where `Subproperty` is a property of the <xref:System.Web.UI.WebControls.MenuItemStyle> object (for example, `DynamicSelectedStyle-ForeColor`). The properties can also be set programmatically in the form `Property.Subproperty` (for example, `DynamicSelectedStyle.ForeColor`).
Style properties for a dynamic menu item are applied in the following order:
1. <xref:System.Web.UI.WebControls.Menu.DynamicMenuStyle%2A>.
2. <xref:System.Web.UI.WebControls.Menu.DynamicMenuItemStyle%2A>. If the <xref:System.Web.UI.WebControls.Menu.LevelMenuItemStyles%2A> collection or <xref:System.Web.UI.WebControls.Menu.LevelSubMenuStyles%2A> collection is defined, it is applied at this time, overriding the other menu item style properties.
3. <xref:System.Web.UI.WebControls.Menu.DynamicSelectedStyle%2A>. If the <xref:System.Web.UI.WebControls.Menu.LevelSelectedStyles%2A> collection is defined, it is applied at this time, overriding the other menu item style properties.
4. <xref:System.Web.UI.WebControls.Menu.DynamicHoverStyle%2A>.
## Examples
The following code example demonstrates how to use the <xref:System.Web.UI.WebControls.Menu.DynamicSelectedStyle%2A> property to specify a light blue background color for the selected dynamic menu item.
[!code-aspx-csharp[MenuDynamicSelectedStyle#1](~/samples/snippets/csharp/VS_Snippets_WebNet/MenuDynamicSelectedStyle/CS/menudynamicselectedstylecs.aspx#1)]
[!code-aspx-vb[MenuDynamicSelectedStyle#1](~/samples/snippets/visualbasic/VS_Snippets_WebNet/MenuDynamicSelectedStyle/VB/menudynamicselectedstylevb.aspx#1)]
]]></format>
</remarks>
<altmember cref="P:System.Web.UI.WebControls.Menu.DynamicHoverStyle" />
<altmember cref="P:System.Web.UI.WebControls.Menu.DynamicMenuItemStyle" />
<altmember cref="P:System.Web.UI.WebControls.Menu.DynamicMenuStyle" />
<altmember cref="P:System.Web.UI.WebControls.Menu.LevelMenuItemStyles" />
<altmember cref="P:System.Web.UI.WebControls.Menu.LevelSelectedStyles" />
<altmember cref="P:System.Web.UI.WebControls.Menu.LevelSubMenuStyles" />
<altmember cref="P:System.Web.UI.WebControls.Menu.StaticHoverStyle" />
<altmember cref="P:System.Web.UI.WebControls.Menu.StaticMenuItemStyle" />
<altmember cref="P:System.Web.UI.WebControls.Menu.StaticMenuStyle" />
<altmember cref="P:System.Web.UI.WebControls.Menu.StaticSelectedStyle" />
</Docs>
</Member>
<Member MemberName="DynamicTopSeparatorImageUrl">
<MemberSignature Language="C#" Value="public string DynamicTopSeparatorImageUrl { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance string DynamicTopSeparatorImageUrl" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.WebControls.Menu.DynamicTopSeparatorImageUrl" />
<MemberSignature Language="VB.NET" Value="Public Property DynamicTopSeparatorImageUrl As String" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::String ^ DynamicTopSeparatorImageUrl { System::String ^ get(); void set(System::String ^ value); };" />
<MemberSignature Language="F#" Value="member this.DynamicTopSeparatorImageUrl : string with get, set" Usage="System.Web.UI.WebControls.Menu.DynamicTopSeparatorImageUrl" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.DefaultValue("")</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8">
<AttributeName>System.ComponentModel.Editor("System.Web.UI.Design.ImageUrlEditor, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof(System.Drawing.Design.UITypeEditor))</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.Web.UI.UrlProperty</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5">
<AttributeName>System.ComponentModel.Editor("System.Web.UI.Design.ImageUrlEditor, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof(System.Drawing.Design.UITypeEditor))</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the URL to an image to display at the top of each dynamic menu item to separate it from other menu items.</summary>
<value>The URL to a separator image displayed at the top of each dynamic menu item. The default value is an empty string (""), which indicates that this property is not set.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Use the <xref:System.Web.UI.WebControls.Menu.DynamicTopSeparatorImageUrl%2A> property to specify an optional custom image to display at the top of each dynamic menu item. This image acts as a separator between menu items and is commonly an image of a line.
> [!NOTE]
> You can also display a separator image at the bottom of each dynamic menu item by setting the <xref:System.Web.UI.WebControls.Menu.DynamicBottomSeparatorImageUrl%2A> property.
## Examples
The following code example demonstrates how to use the <xref:System.Web.UI.WebControls.Menu.DynamicTopSeparatorImageUrl%2A> property to display a separator image at the top of each dynamic menu item.
[!code-aspx-csharp[MenuDynamicTopSeparatorImageUrl#1](~/samples/snippets/csharp/VS_Snippets_WebNet/MenuDynamicTopSeparatorImageUrl/CS/menudynamictopseparatorimageurlcs.aspx#1)]
[!code-aspx-vb[MenuDynamicTopSeparatorImageUrl#1](~/samples/snippets/visualbasic/VS_Snippets_WebNet/MenuDynamicTopSeparatorImageUrl/VB/menudynamictopseparatorimageurlvb.aspx#1)]
]]></format>
</remarks>
<altmember cref="P:System.Web.UI.WebControls.Menu.DynamicBottomSeparatorImageUrl" />
<altmember cref="P:System.Web.UI.WebControls.Menu.ScrollDownImageUrl" />
<altmember cref="P:System.Web.UI.WebControls.Menu.ScrollDownText" />
<altmember cref="P:System.Web.UI.WebControls.Menu.ScrollUpImageUrl" />
<altmember cref="P:System.Web.UI.WebControls.Menu.ScrollUpText" />
<altmember cref="P:System.Web.UI.WebControls.Menu.StaticBottomSeparatorImageUrl" />
<altmember cref="P:System.Web.UI.WebControls.Menu.StaticTopSeparatorImageUrl" />
</Docs>
</Member>
<Member MemberName="DynamicVerticalOffset">
<MemberSignature Language="C#" Value="public int DynamicVerticalOffset { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance int32 DynamicVerticalOffset" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.WebControls.Menu.DynamicVerticalOffset" />
<MemberSignature Language="VB.NET" Value="Public Property DynamicVerticalOffset As Integer" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property int DynamicVerticalOffset { int get(); void set(int value); };" />
<MemberSignature Language="F#" Value="member this.DynamicVerticalOffset : int with get, set" Usage="System.Web.UI.WebControls.Menu.DynamicVerticalOffset" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.DefaultValue(0)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the number of pixels to shift a dynamic menu vertically relative to its parent menu item.</summary>
<value>The number of pixels to shift a dynamic menu vertically relative to its parent menu item. The default is 0.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Use the <xref:System.Web.UI.WebControls.Menu.DynamicVerticalOffset%2A> property to adjust the vertical position of a dynamic menu relative to its parent menu item. This property affects the position of a dynamic menu differently depending on whether the <xref:System.Web.UI.WebControls.Menu> control is displayed vertically or horizontally (as specified by the <xref:System.Web.UI.WebControls.Menu.Orientation%2A> property). The following table describes the differences.
|Orientation|Description|
|-----------------|-----------------|
|Horizontal|By default, a dynamic menu is displayed directly below its parent menu item without any spacing in between. Setting this property controls the vertical spacing between the dynamic menu and its parent menu item.|
|Vertical|By default, a dynamic menu item is displayed next to its parent menu item with the top edges aligned. Setting this property shifts the dynamic menu position vertically from this base position.|
> [!NOTE]
> You can set this property to a negative value to shift a dynamic menu in a negative direction. If you are displaying a horizontal menu, a negative value causes a dynamic menu and its parent menu item to overlap.
## Examples
The following code example demonstrates how to use the <xref:System.Web.UI.WebControls.Menu.DynamicVerticalOffset%2A> property to shift a dynamic menu down by 10 pixels from the top of its parent menu item.
[!code-aspx-csharp[MenuDynamicHorizontalOffset#1](~/samples/snippets/csharp/VS_Snippets_WebNet/MenuDynamicHorizontalOffset/CS/menudynamichorizontaloffsetcs.aspx#1)]
[!code-aspx-vb[MenuDynamicHorizontalOffset#1](~/samples/snippets/visualbasic/VS_Snippets_WebNet/MenuDynamicHorizontalOffset/VB/menudynamichorizontaloffsetvb.aspx#1)]
]]></format>
</remarks>
<altmember cref="P:System.Web.UI.WebControls.Menu.DynamicHorizontalOffset" />
<altmember cref="P:System.Web.UI.WebControls.Menu.Orientation" />
<altmember cref="P:System.Web.UI.WebControls.Menu.StaticSubMenuIndent" />
</Docs>
</Member>
<Member MemberName="EnsureDataBound">
<MemberSignature Language="C#" Value="protected override void EnsureDataBound ();" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig virtual instance void EnsureDataBound() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.WebControls.Menu.EnsureDataBound" />
<MemberSignature Language="VB.NET" Value="Protected Overrides Sub EnsureDataBound ()" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; override void EnsureDataBound();" />
<MemberSignature Language="F#" Value="override this.EnsureDataBound : unit -&gt; unit" Usage="menu.EnsureDataBound " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Verifies that the menu control requires data binding and that a valid data source control is specified before calling the <see cref="M:System.Web.UI.WebControls.Menu.DataBind" /> method.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
> [!NOTE]
> This method is used primarily by control developers to extend the <xref:System.Web.UI.WebControls.Menu> control.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="FindItem">
<MemberSignature Language="C#" Value="public System.Web.UI.WebControls.MenuItem FindItem (string valuePath);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance class System.Web.UI.WebControls.MenuItem FindItem(string valuePath) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.WebControls.Menu.FindItem(System.String)" />
<MemberSignature Language="VB.NET" Value="Public Function FindItem (valuePath As String) As MenuItem" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; System::Web::UI::WebControls::MenuItem ^ FindItem(System::String ^ valuePath);" />
<MemberSignature Language="F#" Value="member this.FindItem : string -&gt; System.Web.UI.WebControls.MenuItem" Usage="menu.FindItem valuePath" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Web.UI.WebControls.MenuItem</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="valuePath" Type="System.String" />
</Parameters>
<Docs>
<param name="valuePath">The value path to the menu item to retrieve.</param>
<summary>Retrieves the menu item at the specified value path.</summary>
<returns>A <see cref="T:System.Web.UI.WebControls.MenuItem" /> that represents the menu item at the specified value path.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Use the <xref:System.Web.UI.WebControls.Menu.FindItem%2A> method to retrieve a <xref:System.Web.UI.WebControls.MenuItem> object from the <xref:System.Web.UI.WebControls.Menu> control. To retrieve the <xref:System.Web.UI.WebControls.MenuItem> object, you must specify a menu path to the menu item. The menu path is a string of delimited values that form the path from a root menu item to the current menu item. To determine the delimiter character, use the <xref:System.Web.UI.WebControls.Menu.PathSeparator%2A> property.
## Examples
The following code example demonstrates how to use the <xref:System.Web.UI.WebControls.Menu.FindItem%2A> method to retrieve a menu item from a <xref:System.Web.UI.WebControls.Menu> control at a specified value path.
[!code-aspx-csharp[MenuPathSeparator#1](~/samples/snippets/csharp/VS_Snippets_WebNet/MenuPathSeparator/CS/menupathseparatorcs.aspx#1)]
[!code-aspx-vb[MenuPathSeparator#1](~/samples/snippets/visualbasic/VS_Snippets_WebNet/MenuPathSeparator/VB/menupathseparatorvb.aspx#1)]
]]></format>
</remarks>
<altmember cref="P:System.Web.UI.WebControls.Menu.PathSeparator" />
<altmember cref="P:System.Web.UI.WebControls.TreeNode.ValuePath" />
</Docs>
</Member>
<Member MemberName="GetDesignModeState">
<MemberSignature Language="C#" Value="protected override System.Collections.IDictionary GetDesignModeState ();" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig virtual instance class System.Collections.IDictionary GetDesignModeState() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.WebControls.Menu.GetDesignModeState" />
<MemberSignature Language="VB.NET" Value="Protected Overrides Function GetDesignModeState () As IDictionary" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; override System::Collections::IDictionary ^ GetDesignModeState();" />
<MemberSignature Language="F#" Value="override this.GetDesignModeState : unit -&gt; System.Collections.IDictionary" Usage="menu.GetDesignModeState " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Collections.IDictionary</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Retrieves the design-time state of the <see cref="T:System.Web.UI.WebControls.Menu" /> control.</summary>
<returns>An <see cref="T:System.Collections.IDictionary" /> containing the design-time state of the <see cref="T:System.Web.UI.WebControls.Menu" /> control.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.UI.WebControls.Menu.GetDesignModeState%2A> method is a helper method used to get the current design-time state of the <xref:System.Web.UI.WebControls.Menu> control.
]]></format>
</remarks>
<altmember cref="T:System.Collections.IDictionary" />
</Docs>
</Member>
<Member MemberName="IncludeStyleBlock">
<MemberSignature Language="C#" Value="public bool IncludeStyleBlock { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool IncludeStyleBlock" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.WebControls.Menu.IncludeStyleBlock" />
<MemberSignature Language="VB.NET" Value="Public Property IncludeStyleBlock As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property bool IncludeStyleBlock { bool get(); void set(bool value); };" />
<MemberSignature Language="F#" Value="member this.IncludeStyleBlock : bool with get, set" Usage="System.Web.UI.WebControls.Menu.IncludeStyleBlock" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8">
<AttributeName>System.ComponentModel.DefaultValue(true)</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>System.ComponentModel.Description("Determines whether or not to render the inline style block (only used in standards compliance mode)")</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>set: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets a value that indicates whether ASP.NET should render a block of cascading style sheet (CSS) definitions for the styles that are used in the menu.</summary>
<value>A value that indicates whether ASP.NET should render a block of CSS definitions for the styles that are used in the menu. The default value is <see langword="true" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.UI.WebControls.Menu> control uses CSS styles to control its appearance in a browser. By default, it renders a `style` element that contains the CSS definitions for the CSS classes that it uses. You typically set this property to `false` in the following situations:
- You want to provide your own CSS definitions in order to customize the appearance of the menu. You must then provide your own block of CSS definitions in the page, or include a link to an external CSS file that contains the definitions.
- You want to keep the default appearance but prefer to keep the generated CSS definitions in a separate file. You must then provide the file and link to it.
In either of these situations, you can get a copy of the default CSS block that the <xref:System.Web.UI.WebControls.Menu> control generates by setting the property to `true`, running the page, and viewing the page in a browser. You can then view the page source in the browser and copy and paste the CSS block into the page markup or into a separate file.
If you set this property to `false`, you cannot set style properties. For example, you cannot add a `DynamicHoverStyle-ForeColor` attribute in markup or set the `DynamicHoverStyle.ForeColor` property in code.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="Items">
<MemberSignature Language="C#" Value="public System.Web.UI.WebControls.MenuItemCollection Items { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Web.UI.WebControls.MenuItemCollection Items" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.WebControls.Menu.Items" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property Items As MenuItemCollection" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::Web::UI::WebControls::MenuItemCollection ^ Items { System::Web::UI::WebControls::MenuItemCollection ^ get(); };" />
<MemberSignature Language="F#" Value="member this.Items : System.Web.UI.WebControls.MenuItemCollection" Usage="System.Web.UI.WebControls.Menu.Items" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.DefaultValue(null)</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8">
<AttributeName>System.ComponentModel.Editor("System.Web.UI.Design.WebControls.MenuItemCollectionEditor,System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof(System.Drawing.Design.UITypeEditor))</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.ComponentModel.MergableProperty(false)</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerProperty)</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5">
<AttributeName>System.ComponentModel.Editor("System.Web.UI.Design.WebControls.MenuItemCollectionEditor,System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof(System.Drawing.Design.UITypeEditor))</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Web.UI.WebControls.MenuItemCollection</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a <see cref="T:System.Web.UI.WebControls.MenuItemCollection" /> object that contains all menu items in the <see cref="T:System.Web.UI.WebControls.Menu" /> control.</summary>
<value>A <see cref="T:System.Web.UI.WebControls.MenuItemCollection" /> that contains all menu items in the <see cref="T:System.Web.UI.WebControls.Menu" /> control.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Use the <xref:System.Web.UI.WebControls.Menu.Items%2A> property (collection) to get a <xref:System.Web.UI.WebControls.MenuItemCollection> object that contains all the menu items in a <xref:System.Web.UI.WebControls.Menu> control. This collection is commonly used to quickly iterate through all the menu items, or to access a specific menu item.
The <xref:System.Web.UI.WebControls.Menu.Items%2A> collection can also be used to programmatically manage the menu items. You can add, insert, remove, and retrieve <xref:System.Web.UI.WebControls.MenuItem> collection objects. Any updates to the collection will automatically be reflected in the <xref:System.Web.UI.WebControls.Menu> control after the next round trip to the server.
## Examples
The following code example demonstrates how to use the <xref:System.Web.UI.WebControls.Menu.Items%2A> collection to traverse the menu items in the <xref:System.Web.UI.WebControls.Menu> control.
[!code-aspx-csharp[MenuItems#1](~/samples/snippets/csharp/VS_Snippets_WebNet/MenuItems/CS/menuitemscs.aspx#1)]
[!code-aspx-vb[MenuItems#1](~/samples/snippets/visualbasic/VS_Snippets_WebNet/MenuItems/VB/menuitemsvb.aspx#1)]
]]></format>
</remarks>
<altmember cref="T:System.Web.UI.WebControls.MenuItem" />
<altmember cref="T:System.Web.UI.WebControls.MenuItemCollection" />
<altmember cref="P:System.Web.UI.WebControls.MenuItem.ChildItems" />
</Docs>
</Member>
<Member MemberName="ItemWrap">
<MemberSignature Language="C#" Value="public bool ItemWrap { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool ItemWrap" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.WebControls.Menu.ItemWrap" />
<MemberSignature Language="VB.NET" Value="Public Property ItemWrap As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property bool ItemWrap { bool get(); void set(bool value); };" />
<MemberSignature Language="F#" Value="member this.ItemWrap : bool with get, set" Usage="System.Web.UI.WebControls.Menu.ItemWrap" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.DefaultValue(false)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets a value indicating whether the text for menu items should wrap.</summary>
<value>
<see langword="true" /> to wrap the menu item text; otherwise, <see langword="false" />. The default is <see langword="false" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Use the <xref:System.Web.UI.WebControls.Menu.ItemWrap%2A> property to specify whether the text displayed in each menu item wraps. When the text runs out of space, it is automatically split and continued on the following line.
## Examples
The following code example demonstrates how to use the <xref:System.Web.UI.WebControls.Menu.ItemWrap%2A> property to enable text wrapping in the <xref:System.Web.UI.WebControls.Menu> control.
[!code-aspx-csharp[MenuItemWrap#1](~/samples/snippets/csharp/VS_Snippets_WebNet/MenuItemWrap/CS/menuitemwrapcs.aspx#1)]
[!code-aspx-vb[MenuItemWrap#1](~/samples/snippets/visualbasic/VS_Snippets_WebNet/MenuItemWrap/VB/menuitemwrapvb.aspx#1)]
]]></format>
</remarks>
<altmember cref="P:System.Web.UI.WebControls.WebControl.Font" />
<altmember cref="P:System.Web.UI.WebControls.WebControl.ForeColor" />
<altmember cref="P:System.Web.UI.WebControls.Menu.DynamicHorizontalOffset" />
<altmember cref="P:System.Web.UI.WebControls.Menu.DynamicVerticalOffset" />
<altmember cref="P:System.Web.UI.WebControls.Menu.StaticSubMenuIndent" />
</Docs>
</Member>
<Member MemberName="LevelMenuItemStyles">
<MemberSignature Language="C#" Value="public System.Web.UI.WebControls.MenuItemStyleCollection LevelMenuItemStyles { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Web.UI.WebControls.MenuItemStyleCollection LevelMenuItemStyles" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.WebControls.Menu.LevelMenuItemStyles" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property LevelMenuItemStyles As MenuItemStyleCollection" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::Web::UI::WebControls::MenuItemStyleCollection ^ LevelMenuItemStyles { System::Web::UI::WebControls::MenuItemStyleCollection ^ get(); };" />
<MemberSignature Language="F#" Value="member this.LevelMenuItemStyles : System.Web.UI.WebControls.MenuItemStyleCollection" Usage="System.Web.UI.WebControls.Menu.LevelMenuItemStyles" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.DefaultValue(null)</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8">
<AttributeName>System.ComponentModel.Editor("System.Web.UI.Design.WebControls.MenuItemStyleCollectionEditor,System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof(System.Drawing.Design.UITypeEditor))</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerProperty)</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5">
<AttributeName>System.ComponentModel.Editor("System.Web.UI.Design.WebControls.MenuItemStyleCollectionEditor,System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof(System.Drawing.Design.UITypeEditor))</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Web.UI.WebControls.MenuItemStyleCollection</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a <see cref="T:System.Web.UI.WebControls.MenuItemStyleCollection" /> object that contains the style settings that are applied to menu items based on their level in a <see cref="T:System.Web.UI.WebControls.Menu" /> control.</summary>
<value>A <see cref="T:System.Web.UI.WebControls.MenuItemStyleCollection" /> that contains the style settings that are applied to menu items based on their level in a <see cref="T:System.Web.UI.WebControls.Menu" /> control.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Use the <xref:System.Web.UI.WebControls.Menu.LevelMenuItemStyles%2A> collection as an alternative to the individual style properties (such as <xref:System.Web.UI.WebControls.Menu.DynamicMenuItemStyle%2A>) to control the style of menu items at the individual levels of the menu. The styles contained in this collection are applied to the menu items based on their menu level. The first style in the collection corresponds to the style of menu items in the first level of the menu. The second style in the collection corresponds to the style of menu items in the second level of the menu, and so on. This collection is most often used to generate table of contents-style navigation menus where menu items at a certain level should have the same appearance, regardless of whether they have submenus.
> [!NOTE]
> If a style is defined for a certain level using the <xref:System.Web.UI.WebControls.Menu.LevelMenuItemStyles%2A> collection, this overrides any menu item style settings for the menu items at that level.
## Examples
The following code example demonstrates how to use the <xref:System.Web.UI.WebControls.Menu.LevelMenuItemStyles%2A> collection to apply style settings to the menu items in a <xref:System.Web.UI.WebControls.Menu> control based on their level.
[!code-aspx-csharp[MenuLevelMenuItemStyles#1](~/samples/snippets/csharp/VS_Snippets_WebNet/MenuLevelMenuItemStyles/CS/menulevelmenuitemstylecs.aspx#1)]
[!code-aspx-vb[MenuLevelMenuItemStyles#1](~/samples/snippets/visualbasic/VS_Snippets_WebNet/MenuLevelMenuItemStyles/VB/menulevelmenuitemstylevb.aspx#1)]
]]></format>
</remarks>
<altmember cref="P:System.Web.UI.WebControls.Menu.DynamicHoverStyle" />
<altmember cref="P:System.Web.UI.WebControls.Menu.DynamicMenuItemStyle" />
<altmember cref="P:System.Web.UI.WebControls.Menu.DynamicMenuStyle" />
<altmember cref="P:System.Web.UI.WebControls.Menu.DynamicSelectedStyle" />
<altmember cref="P:System.Web.UI.WebControls.Menu.LevelSelectedStyles" />
<altmember cref="P:System.Web.UI.WebControls.Menu.LevelSubMenuStyles" />
<altmember cref="P:System.Web.UI.WebControls.Menu.StaticHoverStyle" />
<altmember cref="P:System.Web.UI.WebControls.Menu.StaticMenuItemStyle" />
<altmember cref="P:System.Web.UI.WebControls.Menu.StaticMenuStyle" />
<altmember cref="P:System.Web.UI.WebControls.Menu.StaticSelectedStyle" />
</Docs>
</Member>
<Member MemberName="LevelSelectedStyles">
<MemberSignature Language="C#" Value="public System.Web.UI.WebControls.MenuItemStyleCollection LevelSelectedStyles { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Web.UI.WebControls.MenuItemStyleCollection LevelSelectedStyles" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.WebControls.Menu.LevelSelectedStyles" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property LevelSelectedStyles As MenuItemStyleCollection" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::Web::UI::WebControls::MenuItemStyleCollection ^ LevelSelectedStyles { System::Web::UI::WebControls::MenuItemStyleCollection ^ get(); };" />
<MemberSignature Language="F#" Value="member this.LevelSelectedStyles : System.Web.UI.WebControls.MenuItemStyleCollection" Usage="System.Web.UI.WebControls.Menu.LevelSelectedStyles" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.DefaultValue(null)</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8">
<AttributeName>System.ComponentModel.Editor("System.Web.UI.Design.WebControls.MenuItemStyleCollectionEditor,System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof(System.Drawing.Design.UITypeEditor))</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerProperty)</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5">
<AttributeName>System.ComponentModel.Editor("System.Web.UI.Design.WebControls.MenuItemStyleCollectionEditor,System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof(System.Drawing.Design.UITypeEditor))</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Web.UI.WebControls.MenuItemStyleCollection</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a <see cref="T:System.Web.UI.WebControls.MenuItemStyleCollection" /> object that contains the style settings that are applied to the selected menu item based on its level in a <see cref="T:System.Web.UI.WebControls.Menu" /> control.</summary>
<value>A <see cref="T:System.Web.UI.WebControls.MenuItemStyleCollection" /> that contains the style settings that are applied to the selected menu item based on its level in a <see cref="T:System.Web.UI.WebControls.Menu" /> control.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Use the <xref:System.Web.UI.WebControls.Menu.LevelSelectedStyles%2A> collection as an alternative to the <xref:System.Web.UI.WebControls.Menu.DynamicSelectedStyle%2A> and <xref:System.Web.UI.WebControls.Menu.StaticSelectedStyle%2A> properties to control the style of a selected menu item at the individual levels of the menu. The styles contained in this collection are applied to a selected menu item based on its menu level. The first style in the collection corresponds to the style of a selected menu item in the first level of the menu. The second style in the collection corresponds to the style of a selected menu item in the second level of the menu, and so on. This collection is most often used to generate table of contents-style navigation menus where menu items at a certain level should have the same appearance, regardless of whether they have submenus.
> [!NOTE]
> If a style is defined for a certain level using the <xref:System.Web.UI.WebControls.Menu.LevelSelectedStyles%2A> collection, this overrides the <xref:System.Web.UI.WebControls.Menu.DynamicSelectedStyle%2A> and <xref:System.Web.UI.WebControls.Menu.StaticSelectedStyle%2A> properties at that level.
## Examples
The following code example demonstrates how to use the <xref:System.Web.UI.WebControls.Menu.LevelSelectedStyles%2A> collection to apply a style setting to the selected menu item in a <xref:System.Web.UI.WebControls.Menu> control based on its level.
[!code-aspx-csharp[MenuLevelMenuItemStyles#1](~/samples/snippets/csharp/VS_Snippets_WebNet/MenuLevelMenuItemStyles/CS/menulevelmenuitemstylecs.aspx#1)]
[!code-aspx-vb[MenuLevelMenuItemStyles#1](~/samples/snippets/visualbasic/VS_Snippets_WebNet/MenuLevelMenuItemStyles/VB/menulevelmenuitemstylevb.aspx#1)]
]]></format>
</remarks>
<altmember cref="P:System.Web.UI.WebControls.Menu.DynamicHoverStyle" />
<altmember cref="P:System.Web.UI.WebControls.Menu.DynamicMenuItemStyle" />
<altmember cref="P:System.Web.UI.WebControls.Menu.DynamicMenuStyle" />
<altmember cref="P:System.Web.UI.WebControls.Menu.DynamicSelectedStyle" />
<altmember cref="P:System.Web.UI.WebControls.Menu.LevelMenuItemStyles" />
<altmember cref="P:System.Web.UI.WebControls.Menu.LevelSubMenuStyles" />
<altmember cref="P:System.Web.UI.WebControls.Menu.StaticHoverStyle" />
<altmember cref="P:System.Web.UI.WebControls.Menu.StaticMenuItemStyle" />
<altmember cref="P:System.Web.UI.WebControls.Menu.StaticMenuStyle" />
<altmember cref="P:System.Web.UI.WebControls.Menu.StaticSelectedStyle" />
</Docs>
</Member>
<Member MemberName="LevelSubMenuStyles">
<MemberSignature Language="C#" Value="public System.Web.UI.WebControls.SubMenuStyleCollection LevelSubMenuStyles { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Web.UI.WebControls.SubMenuStyleCollection LevelSubMenuStyles" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.WebControls.Menu.LevelSubMenuStyles" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property LevelSubMenuStyles As SubMenuStyleCollection" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::Web::UI::WebControls::SubMenuStyleCollection ^ LevelSubMenuStyles { System::Web::UI::WebControls::SubMenuStyleCollection ^ get(); };" />
<MemberSignature Language="F#" Value="member this.LevelSubMenuStyles : System.Web.UI.WebControls.SubMenuStyleCollection" Usage="System.Web.UI.WebControls.Menu.LevelSubMenuStyles" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.DefaultValue(null)</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8">
<AttributeName>System.ComponentModel.Editor("System.Web.UI.Design.WebControls.SubMenuStyleCollectionEditor,System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof(System.Drawing.Design.UITypeEditor))</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerProperty)</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5">
<AttributeName>System.ComponentModel.Editor("System.Web.UI.Design.WebControls.SubMenuStyleCollectionEditor,System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof(System.Drawing.Design.UITypeEditor))</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Web.UI.WebControls.SubMenuStyleCollection</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a <see cref="T:System.Web.UI.WebControls.MenuItemStyleCollection" /> object that contains the style settings that are applied to the submenu items in the static menu based on their level in a <see cref="T:System.Web.UI.WebControls.Menu" /> control.</summary>
<value>A <see cref="T:System.Web.UI.WebControls.MenuItemStyleCollection" /> that contains the style settings that are applied to the submenu items in the static menu based on their level in a <see cref="T:System.Web.UI.WebControls.Menu" /> control.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Use the <xref:System.Web.UI.WebControls.Menu.LevelSubMenuStyles%2A> collection as an alternative to the individual style properties (such as <xref:System.Web.UI.WebControls.Menu.StaticMenuItemStyle%2A>) to control the style of the static submenu items displayed in the static menu at the individual levels. The styles contained in this collection are applied to the static submenu items based on their menu level. The first style in the collection corresponds to the style of the first static submenu level displayed in the static menu. The second style in the collection corresponds to the style of the second submenu level displayed in the static menu, and so on. This collection is most often used to generate table of contents-style navigation menus where menu items at a certain level should have the same appearance, regardless of whether they have submenus.
> [!NOTE]
> If a style is defined for a certain level using the <xref:System.Web.UI.WebControls.Menu.LevelSubMenuStyles%2A> collection, this overrides any static submenu item style settings at that level.
## Examples
The following code example demonstrates how to use the <xref:System.Web.UI.WebControls.Menu.LevelSubMenuStyles%2A> collection to apply style settings to the submenu items displayed in the static menu of a <xref:System.Web.UI.WebControls.Menu> control based on their level.
[!code-aspx-csharp[MenuLevelSubMenuStyles#1](~/samples/snippets/csharp/VS_Snippets_WebNet/MenuLevelSubMenuStyles/CS/menulevelsubmenustylescs.aspx#1)]
[!code-aspx-vb[MenuLevelSubMenuStyles#1](~/samples/snippets/visualbasic/VS_Snippets_WebNet/MenuLevelSubMenuStyles/VB/menulevelsubmenustylesvb.aspx#1)]
]]></format>
</remarks>
<altmember cref="P:System.Web.UI.WebControls.Menu.DynamicHoverStyle" />
<altmember cref="P:System.Web.UI.WebControls.Menu.DynamicMenuItemStyle" />
<altmember cref="P:System.Web.UI.WebControls.Menu.DynamicMenuStyle" />
<altmember cref="P:System.Web.UI.WebControls.Menu.DynamicSelectedStyle" />
<altmember cref="P:System.Web.UI.WebControls.Menu.LevelMenuItemStyles" />
<altmember cref="P:System.Web.UI.WebControls.Menu.LevelSelectedStyles" />
<altmember cref="P:System.Web.UI.WebControls.Menu.StaticHoverStyle" />
<altmember cref="P:System.Web.UI.WebControls.Menu.StaticMenuItemStyle" />
<altmember cref="P:System.Web.UI.WebControls.Menu.StaticMenuStyle" />
<altmember cref="P:System.Web.UI.WebControls.Menu.StaticSelectedStyle" />
</Docs>
</Member>
<Member MemberName="LoadControlState">
<MemberSignature Language="C#" Value="protected internal override void LoadControlState (object savedState);" />
<MemberSignature Language="ILAsm" Value=".method familyorassemblyhidebysig virtual instance void LoadControlState(object savedState) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.WebControls.Menu.LoadControlState(System.Object)" />
<MemberSignature Language="VB.NET" Value="Protected Friend Overrides Sub LoadControlState (savedState As Object)" />
<MemberSignature Language="C++ CLI" Value="protected public:&#xA; override void LoadControlState(System::Object ^ savedState);" />
<MemberSignature Language="F#" Value="override this.LoadControlState : obj -&gt; unit" Usage="menu.LoadControlState savedState" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="savedState" Type="System.Object" />
</Parameters>
<Docs>
<param name="savedState">An <see cref="T:System.Object" /> that represents the control state to be restored.</param>
<summary>Loads the state of the properties in the <see cref="T:System.Web.UI.WebControls.Menu" /> control that need to be persisted.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
> [!NOTE]
> This method is used primarily by control developers to extend the <xref:System.Web.UI.WebControls.Menu> control.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="LoadViewState">
<MemberSignature Language="C#" Value="protected override void LoadViewState (object state);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig virtual instance void LoadViewState(object state) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.WebControls.Menu.LoadViewState(System.Object)" />
<MemberSignature Language="VB.NET" Value="Protected Overrides Sub LoadViewState (state As Object)" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; override void LoadViewState(System::Object ^ state);" />
<MemberSignature Language="F#" Value="override this.LoadViewState : obj -&gt; unit" Usage="menu.LoadViewState state" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="state" Type="System.Object" />
</Parameters>
<Docs>
<param name="state">An <see cref="T:System.Object" /> that contains the saved view-state values for the control.</param>
<summary>Loads the previously saved view state of the <see cref="T:System.Web.UI.WebControls.Menu" /> control.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="MaximumDynamicDisplayLevels">
<MemberSignature Language="C#" Value="public int MaximumDynamicDisplayLevels { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance int32 MaximumDynamicDisplayLevels" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.WebControls.Menu.MaximumDynamicDisplayLevels" />
<MemberSignature Language="VB.NET" Value="Public Property MaximumDynamicDisplayLevels As Integer" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property int MaximumDynamicDisplayLevels { int get(); void set(int value); };" />
<MemberSignature Language="F#" Value="member this.MaximumDynamicDisplayLevels : int with get, set" Usage="System.Web.UI.WebControls.Menu.MaximumDynamicDisplayLevels" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.DefaultValue(3)</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.Web.UI.Themeable(true)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the number of menu levels to render for a dynamic menu.</summary>
<value>The number of menu levels to render for a dynamic menu. The default is 3.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
You can display multiple menu levels in the static menu by setting the <xref:System.Web.UI.WebControls.Menu.StaticDisplayLevels%2A> property to a value greater than 1. You can also display additional levels in dynamic menus by setting this property to a value greater than 0. For example, if you display two menu levels in the static menu (by setting the <xref:System.Web.UI.WebControls.Menu.StaticDisplayLevels%2A> property to 2) and then set this property to 3, three additional menu levels are displayed in dynamic menus. All remaining higher menu levels (if any) are discarded.
> [!NOTE]
> Setting this property to 0 displays a flat menu up to the level specified by the <xref:System.Web.UI.WebControls.Menu.StaticDisplayLevels%2A> property, without any dynamic menus.
## Examples
The following code example demonstrates how to use the <xref:System.Web.UI.WebControls.Menu.MaximumDynamicDisplayLevels%2A> property to limit the number of menu levels to display in a dynamic menu to 1. Only the root menu level is displayed.
[!code-aspx-csharp[MenuMaximumDynamicDisplayLevels#1](~/samples/snippets/csharp/VS_Snippets_WebNet/MenuMaximumDynamicDisplayLevels/CS/menumaximumdynamicdisplaylevelscs.aspx#1)]
[!code-aspx-vb[MenuMaximumDynamicDisplayLevels#1](~/samples/snippets/visualbasic/VS_Snippets_WebNet/MenuMaximumDynamicDisplayLevels/VB/menumaximumdynamicdisplaylevelsvb.aspx#1)]
]]></format>
</remarks>
<exception cref="T:System.ArgumentOutOfRangeException">The <see cref="P:System.Web.UI.WebControls.Menu.MaximumDynamicDisplayLevels" /> property is set to a value less than 0.</exception>
<altmember cref="P:System.Web.UI.WebControls.Menu.StaticDisplayLevels" />
</Docs>
</Member>
<Member MemberName="MenuItemClick">
<MemberSignature Language="C#" Value="public event System.Web.UI.WebControls.MenuEventHandler MenuItemClick;" />
<MemberSignature Language="ILAsm" Value=".event class System.Web.UI.WebControls.MenuEventHandler MenuItemClick" />
<MemberSignature Language="DocId" Value="E:System.Web.UI.WebControls.Menu.MenuItemClick" />
<MemberSignature Language="VB.NET" Value="Public Custom Event MenuItemClick As MenuEventHandler " />
<MemberSignature Language="C++ CLI" Value="public:&#xA; event System::Web::UI::WebControls::MenuEventHandler ^ MenuItemClick;" />
<MemberSignature Language="F#" Value="member this.MenuItemClick : System.Web.UI.WebControls.MenuEventHandler " Usage="member this.MenuItemClick : System.Web.UI.WebControls.MenuEventHandler " />
<MemberType>Event</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Web.UI.WebControls.MenuEventHandler</ReturnType>
</ReturnValue>
<Docs>
<summary>Occurs when a menu item in a <see cref="T:System.Web.UI.WebControls.Menu" /> control is clicked.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.UI.WebControls.Menu.MenuItemClick> event is raised when a menu item is clicked in a <xref:System.Web.UI.WebControls.Menu> control. This allows you to provide an event handler that performs a custom routine, such as synchronizing with another control on the page, whenever this event occurs.
A <xref:System.Web.UI.WebControls.MenuEventArgs> object is passed to the event handler, which allows you to access the properties of the menu item that raised the event.
For more information about how to handle events, see [Handling and Raising Events](~/docs/standard/events/index.md).
## Examples
The following code example demonstrates how to create an event handler for the <xref:System.Web.UI.WebControls.Menu.MenuItemClick> event that displays the text of the menu item selected by the user.
[!code-aspx-csharp[MenuMenuItemClick#1](~/samples/snippets/csharp/VS_Snippets_WebNet/MenuMenuItemClick/CS/menumenuitemclickcs.aspx#1)]
[!code-aspx-vb[MenuMenuItemClick#1](~/samples/snippets/visualbasic/VS_Snippets_WebNet/MenuMenuItemClick/VB/menumenuitemclickvb.aspx#1)]
]]></format>
</remarks>
<altmember cref="T:System.Web.UI.WebControls.MenuEventArgs" />
<altmember cref="T:System.Web.UI.WebControls.MenuEventHandler" />
<altmember cref="E:System.Web.UI.WebControls.Menu.MenuItemDataBound" />
<altmember cref="M:System.Web.UI.WebControls.Menu.OnMenuItemClick(System.Web.UI.WebControls.MenuEventArgs)" />
</Docs>
</Member>
<Member MemberName="MenuItemClickCommandName">
<MemberSignature Language="C#" Value="public static readonly string MenuItemClickCommandName;" />
<MemberSignature Language="ILAsm" Value=".field public static initonly string MenuItemClickCommandName" />
<MemberSignature Language="DocId" Value="F:System.Web.UI.WebControls.Menu.MenuItemClickCommandName" />
<MemberSignature Language="VB.NET" Value="Public Shared ReadOnly MenuItemClickCommandName As String " />
<MemberSignature Language="C++ CLI" Value="public: static initonly System::String ^ MenuItemClickCommandName;" />
<MemberSignature Language="F#" Value=" staticval mutable MenuItemClickCommandName : string" Usage="System.Web.UI.WebControls.Menu.MenuItemClickCommandName" />
<MemberType>Field</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>Contains the command name.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This read-only field contains the name of the command used to access menu items. The default value is "Click".
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="MenuItemDataBound">
<MemberSignature Language="C#" Value="public event System.Web.UI.WebControls.MenuEventHandler MenuItemDataBound;" />
<MemberSignature Language="ILAsm" Value=".event class System.Web.UI.WebControls.MenuEventHandler MenuItemDataBound" />
<MemberSignature Language="DocId" Value="E:System.Web.UI.WebControls.Menu.MenuItemDataBound" />
<MemberSignature Language="VB.NET" Value="Public Custom Event MenuItemDataBound As MenuEventHandler " />
<MemberSignature Language="C++ CLI" Value="public:&#xA; event System::Web::UI::WebControls::MenuEventHandler ^ MenuItemDataBound;" />
<MemberSignature Language="F#" Value="member this.MenuItemDataBound : System.Web.UI.WebControls.MenuEventHandler " Usage="member this.MenuItemDataBound : System.Web.UI.WebControls.MenuEventHandler " />
<MemberType>Event</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Web.UI.WebControls.MenuEventHandler</ReturnType>
</ReturnValue>
<Docs>
<summary>Occurs when a menu item in a <see cref="T:System.Web.UI.WebControls.Menu" /> control is bound to data.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.UI.WebControls.Menu.MenuItemDataBound> event is raised when a menu item is bound to data in a <xref:System.Web.UI.WebControls.Menu> control. This allows you to provide an event handler that performs a custom routine, such as adding custom content or modifying a menu item before it is rendered, whenever this event occurs.
A <xref:System.Web.UI.WebControls.MenuEventArgs> object is passed to the event handler, which allows you to access the properties of the menu item that raised the event.
For more information about how to handle events, see [Handling and Raising Events](~/docs/standard/events/index.md).
## Examples
The following code example demonstrates how to create an event handler for the <xref:System.Web.UI.WebControls.Menu.MenuItemDataBound> event that modifies the text of the `Home` menu item before it is displayed in a <xref:System.Web.UI.WebControls.Menu> control.
[!code-aspx-csharp[MenuItemDataBound#1](~/samples/snippets/csharp/VS_Snippets_WebNet/MenuItemDataBound/CS/menumenuitemdataboundcs.aspx#1)]
[!code-aspx-vb[MenuItemDataBound#1](~/samples/snippets/visualbasic/VS_Snippets_WebNet/MenuItemDataBound/VB/menumenuitemdataboundvb.aspx#1)]
]]></format>
</remarks>
<altmember cref="T:System.Web.UI.WebControls.MenuEventArgs" />
<altmember cref="T:System.Web.UI.WebControls.MenuEventHandler" />
<altmember cref="E:System.Web.UI.WebControls.Menu.MenuItemClick" />
<altmember cref="M:System.Web.UI.WebControls.Menu.OnMenuItemDataBound(System.Web.UI.WebControls.MenuEventArgs)" />
</Docs>
</Member>
<Member MemberName="OnBubbleEvent">
<MemberSignature Language="C#" Value="protected override bool OnBubbleEvent (object source, EventArgs e);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig virtual instance bool OnBubbleEvent(object source, class System.EventArgs e) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.WebControls.Menu.OnBubbleEvent(System.Object,System.EventArgs)" />
<MemberSignature Language="VB.NET" Value="Protected Overrides Function OnBubbleEvent (source As Object, e As EventArgs) As Boolean" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; override bool OnBubbleEvent(System::Object ^ source, EventArgs ^ e);" />
<MemberSignature Language="F#" Value="override this.OnBubbleEvent : obj * EventArgs -&gt; bool" Usage="menu.OnBubbleEvent (source, e)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="source" Type="System.Object" />
<Parameter Name="e" Type="System.EventArgs" />
</Parameters>
<Docs>
<param name="source">The source of the event.</param>
<param name="e">An <see cref="T:System.EventArgs" /> that contains event data.</param>
<summary>Determines whether the event for the <see cref="T:System.Web.UI.WebControls.Menu" /> control is passed up the page's user interface (UI) server control hierarchy.</summary>
<returns>
<see langword="true" /> if the event has been canceled; otherwise, <see langword="false" />. The default is <see langword="false" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This member overrides <xref:System.Web.UI.Control.OnBubbleEvent%2A>.
> [!NOTE]
> This method is used primarily by control developers to extend the <xref:System.Web.UI.WebControls.Menu> control.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="OnDataBinding">
<MemberSignature Language="C#" Value="protected override void OnDataBinding (EventArgs e);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig virtual instance void OnDataBinding(class System.EventArgs e) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.WebControls.Menu.OnDataBinding(System.EventArgs)" />
<MemberSignature Language="VB.NET" Value="Protected Overrides Sub OnDataBinding (e As EventArgs)" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; override void OnDataBinding(EventArgs ^ e);" />
<MemberSignature Language="F#" Value="override this.OnDataBinding : EventArgs -&gt; unit" Usage="menu.OnDataBinding e" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="e" Type="System.EventArgs" />
</Parameters>
<Docs>
<param name="e">A <see cref="T:System.Web.UI.WebControls.MenuEventArgs" /> that contains the event data.</param>
<summary>Raises the <see cref="E:System.Web.UI.Control.DataBinding" /> event.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.UI.Control.DataBinding> event is raised when data is bound to the <xref:System.Web.UI.WebControls.Menu> control. This method notifies the control to perform any data-binding logic that is associated with it.
The <xref:System.Web.UI.WebControls.Menu.OnDataBinding%2A> method allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.
This method is generally used by control developers when extending the <xref:System.Web.UI.WebControls.Menu> class.
Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](~/docs/standard/events/index.md).
]]></format>
</remarks>
<block subset="none" type="overrides">
<para>When overriding <see cref="M:System.Web.UI.WebControls.Menu.OnDataBinding(System.EventArgs)" /> in a derived class, be sure to call the base class's <see cref="M:System.Web.UI.WebControls.Menu.OnDataBinding(System.EventArgs)" /> method so that registered delegates receive the event.</para>
</block>
<altmember cref="T:System.Web.UI.WebControls.MenuEventArgs" />
<altmember cref="T:System.Web.UI.WebControls.MenuEventHandler" />
<altmember cref="E:System.Web.UI.WebControls.Menu.MenuItemDataBound" />
</Docs>
</Member>
<Member MemberName="OnInit">
<MemberSignature Language="C#" Value="protected internal override void OnInit (EventArgs e);" />
<MemberSignature Language="ILAsm" Value=".method familyorassemblyhidebysig virtual instance void OnInit(class System.EventArgs e) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.WebControls.Menu.OnInit(System.EventArgs)" />
<MemberSignature Language="VB.NET" Value="Protected Friend Overrides Sub OnInit (e As EventArgs)" />
<MemberSignature Language="C++ CLI" Value="protected public:&#xA; override void OnInit(EventArgs ^ e);" />
<MemberSignature Language="F#" Value="override this.OnInit : EventArgs -&gt; unit" Usage="menu.OnInit e" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="e" Type="System.EventArgs" />
</Parameters>
<Docs>
<param name="e">A <see cref="T:System.Web.UI.WebControls.MenuEventArgs" /> that contains the event data.</param>
<summary>Raises the <see cref="E:System.Web.UI.Control.Init" /> event.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
When notified by this method, Web server controls must perform any initialization steps that are required to create and set up an instance. In this stage of the server control's life cycle, the control's view state has yet to be populated. Additionally, you cannot access another server control when this method is called, regardless of whether it is a child or parent to this control. Other server controls are not guaranteed to be created and ready for access.
Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](~/docs/standard/events/index.md).
The <xref:System.Web.UI.WebControls.Menu.OnInit%2A> method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.
]]></format>
</remarks>
<block subset="none" type="overrides">
<para>When overriding <see cref="M:System.Web.UI.WebControls.Menu.OnInit(System.EventArgs)" /> in a derived class, be sure to call the base class's <see cref="M:System.Web.UI.WebControls.Menu.OnInit(System.EventArgs)" /> method so that registered delegates receive the event.</para>
</block>
</Docs>
</Member>
<Member MemberName="OnMenuItemClick">
<MemberSignature Language="C#" Value="protected virtual void OnMenuItemClick (System.Web.UI.WebControls.MenuEventArgs e);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig newslot virtual instance void OnMenuItemClick(class System.Web.UI.WebControls.MenuEventArgs e) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.WebControls.Menu.OnMenuItemClick(System.Web.UI.WebControls.MenuEventArgs)" />
<MemberSignature Language="VB.NET" Value="Protected Overridable Sub OnMenuItemClick (e As MenuEventArgs)" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; virtual void OnMenuItemClick(System::Web::UI::WebControls::MenuEventArgs ^ e);" />
<MemberSignature Language="F#" Value="abstract member OnMenuItemClick : System.Web.UI.WebControls.MenuEventArgs -&gt; unit&#xA;override this.OnMenuItemClick : System.Web.UI.WebControls.MenuEventArgs -&gt; unit" Usage="menu.OnMenuItemClick e" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="e" Type="System.Web.UI.WebControls.MenuEventArgs" />
</Parameters>
<Docs>
<param name="e">A <see cref="T:System.Web.UI.WebControls.MenuEventArgs" /> that contains the event data.</param>
<summary>Raises the <see cref="E:System.Web.UI.WebControls.Menu.MenuItemClick" /> event.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.UI.WebControls.Menu.OnMenuItemClick%2A> method is called by the <xref:System.Web.UI.WebControls.Menu> control to raise the <xref:System.Web.UI.WebControls.Menu.MenuItemClick> event. It is generally used by control developers when extending the <xref:System.Web.UI.WebControls.Menu> class.
Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](~/docs/standard/events/index.md).
The <xref:System.Web.UI.WebControls.Menu.OnMenuItemClick%2A> method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.
]]></format>
</remarks>
<block subset="none" type="overrides">
<para>When overriding <see cref="M:System.Web.UI.WebControls.Menu.OnMenuItemClick(System.Web.UI.WebControls.MenuEventArgs)" /> in a derived class, be sure to call the base class's <see cref="M:System.Web.UI.WebControls.Menu.OnMenuItemClick(System.Web.UI.WebControls.MenuEventArgs)" /> method so that registered delegates receive the event.</para>
</block>
<altmember cref="T:System.Web.UI.WebControls.MenuEventArgs" />
<altmember cref="T:System.Web.UI.WebControls.MenuEventHandler" />
<altmember cref="E:System.Web.UI.WebControls.Menu.MenuItemClick" />
<altmember cref="M:System.Web.UI.WebControls.Menu.OnMenuItemDataBound(System.Web.UI.WebControls.MenuEventArgs)" />
</Docs>
</Member>
<Member MemberName="OnMenuItemDataBound">
<MemberSignature Language="C#" Value="protected virtual void OnMenuItemDataBound (System.Web.UI.WebControls.MenuEventArgs e);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig newslot virtual instance void OnMenuItemDataBound(class System.Web.UI.WebControls.MenuEventArgs e) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.WebControls.Menu.OnMenuItemDataBound(System.Web.UI.WebControls.MenuEventArgs)" />
<MemberSignature Language="VB.NET" Value="Protected Overridable Sub OnMenuItemDataBound (e As MenuEventArgs)" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; virtual void OnMenuItemDataBound(System::Web::UI::WebControls::MenuEventArgs ^ e);" />
<MemberSignature Language="F#" Value="abstract member OnMenuItemDataBound : System.Web.UI.WebControls.MenuEventArgs -&gt; unit&#xA;override this.OnMenuItemDataBound : System.Web.UI.WebControls.MenuEventArgs -&gt; unit" Usage="menu.OnMenuItemDataBound e" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="e" Type="System.Web.UI.WebControls.MenuEventArgs" />
</Parameters>
<Docs>
<param name="e">A <see cref="T:System.Web.UI.WebControls.MenuEventArgs" /> that contains the event data.</param>
<summary>Raises the <see cref="E:System.Web.UI.WebControls.Menu.MenuItemDataBound" /> event.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.UI.WebControls.Menu.OnMenuItemDataBound%2A> method is called by the <xref:System.Web.UI.WebControls.Menu> control to raise the <xref:System.Web.UI.WebControls.Menu.MenuItemDataBound> event. It is generally used by control developers when extending the <xref:System.Web.UI.WebControls.Menu> class.
Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](~/docs/standard/events/index.md).
The <xref:System.Web.UI.WebControls.Menu.OnMenuItemDataBound%2A> method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.
]]></format>
</remarks>
<block subset="none" type="overrides">
<para>When overriding <see cref="M:System.Web.UI.WebControls.Menu.OnMenuItemDataBound(System.Web.UI.WebControls.MenuEventArgs)" /> in a derived class, be sure to call the base class's <see cref="M:System.Web.UI.WebControls.Menu.OnMenuItemDataBound(System.Web.UI.WebControls.MenuEventArgs)" /> method so that registered delegates receive the event.</para>
</block>
<altmember cref="T:System.Web.UI.WebControls.MenuEventArgs" />
<altmember cref="T:System.Web.UI.WebControls.MenuEventHandler" />
<altmember cref="E:System.Web.UI.WebControls.Menu.MenuItemDataBound" />
<altmember cref="M:System.Web.UI.WebControls.Menu.OnMenuItemClick(System.Web.UI.WebControls.MenuEventArgs)" />
</Docs>
</Member>
<Member MemberName="OnPreRender">
<MemberSignature Language="C#" Value="protected internal override void OnPreRender (EventArgs e);" />
<MemberSignature Language="ILAsm" Value=".method familyorassemblyhidebysig virtual instance void OnPreRender(class System.EventArgs e) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.WebControls.Menu.OnPreRender(System.EventArgs)" />
<MemberSignature Language="VB.NET" Value="Protected Friend Overrides Sub OnPreRender (e As EventArgs)" />
<MemberSignature Language="C++ CLI" Value="protected public:&#xA; override void OnPreRender(EventArgs ^ e);" />
<MemberSignature Language="F#" Value="override this.OnPreRender : EventArgs -&gt; unit" Usage="menu.OnPreRender e" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="e" Type="System.EventArgs" />
</Parameters>
<Docs>
<param name="e">An <see cref="T:System.EventArgs" /> that contains the event data.</param>
<summary>Raises the <see cref="E:System.Web.UI.Control.PreRender" /> event.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.UI.WebControls.Menu.OnPreRender%2A> method is called by the <xref:System.Web.UI.WebControls.Menu> control to raise the <xref:System.Web.UI.Control.PreRender> event. It is generally used by control developers when extending the <xref:System.Web.UI.WebControls.Menu> class.
Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](~/docs/standard/events/index.md).
The <xref:System.Web.UI.WebControls.Menu.OnPreRender%2A> method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.
]]></format>
</remarks>
<block subset="none" type="overrides">
<para>When overriding <see cref="M:System.Web.UI.WebControls.Menu.OnPreRender(System.EventArgs)" /> in a derived class, be sure to call the base class's <see cref="M:System.Web.UI.WebControls.Menu.OnPreRender(System.EventArgs)" /> method so that registered delegates receive the event.</para>
</block>
</Docs>
</Member>
<Member MemberName="Orientation">
<MemberSignature Language="C#" Value="public System.Web.UI.WebControls.Orientation Orientation { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.Web.UI.WebControls.Orientation Orientation" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.WebControls.Menu.Orientation" />
<MemberSignature Language="VB.NET" Value="Public Property Orientation As Orientation" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::Web::UI::WebControls::Orientation Orientation { System::Web::UI::WebControls::Orientation get(); void set(System::Web::UI::WebControls::Orientation value); };" />
<MemberSignature Language="F#" Value="member this.Orientation : System.Web.UI.WebControls.Orientation with get, set" Usage="System.Web.UI.WebControls.Menu.Orientation" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.DefaultValue(Mono.Cecil.CustomAttributeArgument)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Web.UI.WebControls.Orientation</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the direction in which to render the <see cref="T:System.Web.UI.WebControls.Menu" /> control.</summary>
<value>One of the <see cref="T:System.Web.UI.WebControls.Orientation" /> enumeration values. The default is <see langword="Orientation.Vertical" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Use the <xref:System.Web.UI.WebControls.Menu.Orientation%2A> property to specify the direction in which to render the <xref:System.Web.UI.WebControls.Menu> control. The following table lists the available directions.
|Orientation|Description|
|-----------------|-----------------|
|`Orientation.Horizontal`|The <xref:System.Web.UI.WebControls.Menu> control is rendered horizontally.|
|`Orientation.Vertical`|The <xref:System.Web.UI.WebControls.Menu> control is rendered vertically.|
## Examples
The following code example demonstrates how to use the <xref:System.Web.UI.WebControls.Menu.Orientation%2A> property to display a horizontal menu.
[!code-aspx-csharp[MenuOrientation#1](~/samples/snippets/csharp/VS_Snippets_WebNet/MenuOrientation/CS/menuorientationcs.aspx#1)]
[!code-aspx-vb[MenuOrientation#1](~/samples/snippets/visualbasic/VS_Snippets_WebNet/MenuOrientation/VB/menuorientationvb.aspx#1)]
]]></format>
</remarks>
<altmember cref="T:System.Web.UI.WebControls.Orientation" />
</Docs>
</Member>
<Member MemberName="PathSeparator">
<MemberSignature Language="C#" Value="public char PathSeparator { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance char PathSeparator" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.WebControls.Menu.PathSeparator" />
<MemberSignature Language="VB.NET" Value="Public Property PathSeparator As Char" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property char PathSeparator { char get(); void set(char value); };" />
<MemberSignature Language="F#" Value="member this.PathSeparator : char with get, set" Usage="System.Web.UI.WebControls.Menu.PathSeparator" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.DefaultValue('/')</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Char</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the character used to delimit the path of a menu item in a <see cref="T:System.Web.UI.WebControls.Menu" /> control.</summary>
<value>The character used to delimit the path of a menu item. The default value is a slash mark (/).</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Each menu item (represented by a <xref:System.Web.UI.WebControls.MenuItem> object) in the <xref:System.Web.UI.WebControls.Menu> control has a <xref:System.Web.UI.WebControls.MenuItem.ValuePath%2A> property that specifies the position of the menu item. The value path is a string of delimited values that form the path from a root menu item to the current menu item. Use the <xref:System.Web.UI.WebControls.Menu.PathSeparator%2A> property to specify the delimiting character used to separate the values in the menu path. This value is commonly used when parsing the list for the individual values.
Depending on the text displayed in the <xref:System.Web.UI.WebControls.Menu> control, the delimiter character might need to be changed to prevent any conflicts. For example, if you set the delimiter character to a comma, the displayed text should not contain any commas; otherwise, the <xref:System.Web.UI.WebControls.MenuItem.ValuePath%2A> property cannot be parsed accurately.
## Examples
The following code example demonstrates how to use the <xref:System.Web.UI.WebControls.Menu.PathSeparator%2A> property to change the delimiter character for a menu item's value path to a comma.
[!code-aspx-csharp[MenuPathSeparator#1](~/samples/snippets/csharp/VS_Snippets_WebNet/MenuPathSeparator/CS/menupathseparatorcs.aspx#1)]
[!code-aspx-vb[MenuPathSeparator#1](~/samples/snippets/visualbasic/VS_Snippets_WebNet/MenuPathSeparator/VB/menupathseparatorvb.aspx#1)]
]]></format>
</remarks>
<altmember cref="P:System.Web.UI.WebControls.MenuItem.ValuePath" />
<altmember cref="M:System.Web.UI.WebControls.Menu.FindItem(System.String)" />
</Docs>
</Member>
<Member MemberName="PerformDataBinding">
<MemberSignature Language="C#" Value="protected internal override void PerformDataBinding ();" />
<MemberSignature Language="ILAsm" Value=".method familyorassemblyhidebysig virtual instance void PerformDataBinding() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.WebControls.Menu.PerformDataBinding" />
<MemberSignature Language="VB.NET" Value="Protected Friend Overrides Sub PerformDataBinding ()" />
<MemberSignature Language="C++ CLI" Value="protected public:&#xA; override void PerformDataBinding();" />
<MemberSignature Language="F#" Value="override this.PerformDataBinding : unit -&gt; unit" Usage="menu.PerformDataBinding " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Binds the items from the data source to the menu items in the <see cref="T:System.Web.UI.WebControls.Menu" /> control.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.UI.WebControls.Menu.PerformDataBinding%2A> method is a helper method called by the <xref:System.Web.UI.WebControls.Menu> control to bind the items in the data source to the <xref:System.Web.UI.WebControls.Menu> control.
]]></format>
</remarks>
<altmember cref="M:System.Web.UI.WebControls.HierarchicalDataBoundControl.PerformDataBinding" />
</Docs>
</Member>
<Member MemberName="RaisePostBackEvent">
<MemberSignature Language="C#" Value="protected internal virtual void RaisePostBackEvent (string eventArgument);" />
<MemberSignature Language="ILAsm" Value=".method familyorassemblyhidebysig newslot virtual instance void RaisePostBackEvent(string eventArgument) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.WebControls.Menu.RaisePostBackEvent(System.String)" />
<MemberSignature Language="VB.NET" Value="Protected Friend Overridable Sub RaisePostBackEvent (eventArgument As String)" />
<MemberSignature Language="C++ CLI" Value="protected public:&#xA; virtual void RaisePostBackEvent(System::String ^ eventArgument);" />
<MemberSignature Language="F#" Value="abstract member RaisePostBackEvent : string -&gt; unit&#xA;override this.RaisePostBackEvent : string -&gt; unit" Usage="menu.RaisePostBackEvent eventArgument" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(System.String)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="eventArgument" Type="System.String" />
</Parameters>
<Docs>
<param name="eventArgument">A <see cref="T:System.String" /> that represents the event argument passed to the event handler.</param>
<summary>Processes an event raised when a form is posted to the server.</summary>
<remarks>To be added.</remarks>
<altmember cref="M:System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(System.String)" />
</Docs>
</Member>
<Member MemberName="Render">
<MemberSignature Language="C#" Value="protected internal override void Render (System.Web.UI.HtmlTextWriter writer);" />
<MemberSignature Language="ILAsm" Value=".method familyorassemblyhidebysig virtual instance void Render(class System.Web.UI.HtmlTextWriter writer) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.WebControls.Menu.Render(System.Web.UI.HtmlTextWriter)" />
<MemberSignature Language="VB.NET" Value="Protected Friend Overrides Sub Render (writer As HtmlTextWriter)" />
<MemberSignature Language="C++ CLI" Value="protected public:&#xA; override void Render(System::Web::UI::HtmlTextWriter ^ writer);" />
<MemberSignature Language="F#" Value="override this.Render : System.Web.UI.HtmlTextWriter -&gt; unit" Usage="menu.Render writer" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="writer" Type="System.Web.UI.HtmlTextWriter" />
</Parameters>
<Docs>
<param name="writer">The <see cref="T:System.Web.UI.HtmlTextWriter" /> that represents the output stream used to write content to a Web page.</param>
<summary>Renders the menu control on the client browser.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="RenderBeginTag">
<MemberSignature Language="C#" Value="public override void RenderBeginTag (System.Web.UI.HtmlTextWriter writer);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance void RenderBeginTag(class System.Web.UI.HtmlTextWriter writer) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.WebControls.Menu.RenderBeginTag(System.Web.UI.HtmlTextWriter)" />
<MemberSignature Language="VB.NET" Value="Public Overrides Sub RenderBeginTag (writer As HtmlTextWriter)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; override void RenderBeginTag(System::Web::UI::HtmlTextWriter ^ writer);" />
<MemberSignature Language="F#" Value="override this.RenderBeginTag : System.Web.UI.HtmlTextWriter -&gt; unit" Usage="menu.RenderBeginTag writer" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="writer" Type="System.Web.UI.HtmlTextWriter" />
</Parameters>
<Docs>
<param name="writer">The <see cref="T:System.Web.UI.HtmlTextWriter" /> containing methods to build and render the device-specific output.</param>
<summary>Adds tag attributes and writes the markup for the opening tag of the control to the output stream emitted to the browser or device.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.UI.WebControls.Menu.RenderBeginTag%2A> method adds tag attributes and writes the markup for the opening tag of the control to the output stream emitted to the response stream for the client browser.
Override <xref:System.Web.UI.WebControls.Menu.RenderBeginTag%2A> when you want to implement custom behavior, for example to write multiple tags to the response stream before any control content, such as `<table><tr><td>`. This method overrides the <xref:System.Web.UI.WebControls.Menu.RenderBeginTag%2A> method to add the <xref:System.Web.UI.WebControls.Menu.SkipLinkText%2A> property.
> [!NOTE]
> This method is used primarily by control developers to extend the <xref:System.Web.UI.WebControls.Menu> control.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="RenderContents">
<MemberSignature Language="C#" Value="protected internal override void RenderContents (System.Web.UI.HtmlTextWriter writer);" />
<MemberSignature Language="ILAsm" Value=".method familyorassemblyhidebysig virtual instance void RenderContents(class System.Web.UI.HtmlTextWriter writer) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.WebControls.Menu.RenderContents(System.Web.UI.HtmlTextWriter)" />
<MemberSignature Language="VB.NET" Value="Protected Friend Overrides Sub RenderContents (writer As HtmlTextWriter)" />
<MemberSignature Language="C++ CLI" Value="protected public:&#xA; override void RenderContents(System::Web::UI::HtmlTextWriter ^ writer);" />
<MemberSignature Language="F#" Value="override this.RenderContents : System.Web.UI.HtmlTextWriter -&gt; unit" Usage="menu.RenderContents writer" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="writer" Type="System.Web.UI.HtmlTextWriter" />
</Parameters>
<Docs>
<param name="writer">The <see cref="T:System.Web.UI.HtmlTextWriter" /> containing methods to build and render the device-specific output.</param>
<summary>This member overrides <see cref="M:System.Web.UI.WebControls.WebControl.RenderContents(System.Web.UI.HtmlTextWriter)" />.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Override the <xref:System.Web.UI.WebControls.WebControl.RenderContents%2A> method to render the contents of the control between the begin and end tags. The default implementation of this method renders any child controls.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="RenderEndTag">
<MemberSignature Language="C#" Value="public override void RenderEndTag (System.Web.UI.HtmlTextWriter writer);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance void RenderEndTag(class System.Web.UI.HtmlTextWriter writer) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.WebControls.Menu.RenderEndTag(System.Web.UI.HtmlTextWriter)" />
<MemberSignature Language="VB.NET" Value="Public Overrides Sub RenderEndTag (writer As HtmlTextWriter)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; override void RenderEndTag(System::Web::UI::HtmlTextWriter ^ writer);" />
<MemberSignature Language="F#" Value="override this.RenderEndTag : System.Web.UI.HtmlTextWriter -&gt; unit" Usage="menu.RenderEndTag writer" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="writer" Type="System.Web.UI.HtmlTextWriter" />
</Parameters>
<Docs>
<param name="writer">The <see cref="T:System.Web.UI.HtmlTextWriter" /> containing methods to build and render the device-specific output.</param>
<summary>Performs final markup and writes the HTML closing tag of the control to the output stream emitted to the browser or device.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This method overrides <xref:System.Web.UI.WebControls.WebControl.RenderEndTag%2A?displayProperty=nameWithType> to render <xref:System.Web.UI.WebControls.Menu> submenus and the <xref:System.Web.UI.WebControls.Menu.SkipLinkText%2A> property.
> [!NOTE]
> This method is used primarily by control developers to extend the <xref:System.Web.UI.WebControls.Menu> control.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="RenderingMode">
<MemberSignature Language="C#" Value="public System.Web.UI.WebControls.MenuRenderingMode RenderingMode { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.Web.UI.WebControls.MenuRenderingMode RenderingMode" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.WebControls.Menu.RenderingMode" />
<MemberSignature Language="VB.NET" Value="Public Property RenderingMode As MenuRenderingMode" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::Web::UI::WebControls::MenuRenderingMode RenderingMode { System::Web::UI::WebControls::MenuRenderingMode get(); void set(System::Web::UI::WebControls::MenuRenderingMode value); };" />
<MemberSignature Language="F#" Value="member this.RenderingMode : System.Web.UI.WebControls.MenuRenderingMode with get, set" Usage="System.Web.UI.WebControls.Menu.RenderingMode" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8">
<AttributeName>System.ComponentModel.DefaultValue(Mono.Cecil.CustomAttributeArgument)</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Web.UI.WebControls.MenuRenderingMode</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets a value that specifies whether the <see cref="T:System.Web.UI.WebControls.Menu" /> control renders HTML <see langword="table" /> elements and inline styles, or <see langword="listitem" /> elements and cascading style sheet (CSS) styles.</summary>
<value>A value that specifies whether the <see cref="T:System.Web.UI.WebControls.Menu" /> control renders HTML <see langword="table" /> elements and inline styles, or <see langword="listitem" /> elements and cascading style sheet (CSS) styles. The default value is <see cref="F:System.Web.UI.WebControls.MenuRenderingMode.Default" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The value of the <xref:System.Web.UI.WebControls.Menu.RenderingMode%2A> property determines how the menu control renders markup for the <xref:System.Web.UI.WebControls.Menu> control.
In ASP.NET 3.5 and earlier versions, the <xref:System.Web.UI.WebControls.Menu> control uses HTML `table` elements and inline styles to specify the appearance of the menu in a browser. In ASP.NET 4 and later versions, by default the <xref:System.Web.UI.WebControls.Menu> control uses HTML `listitem` elements and cascading style sheet (CSS) styles.
If you do not set this property, the <xref:System.Web.UI.WebControls.Menu> control renders markup that is appropriate to the ASP.NET version that is indicated by the <xref:System.Web.UI.Control.RenderingCompatibility%2A?displayProperty=nameWithType> property. The <xref:System.Web.UI.WebControls.Menu> control uses the following rules:
- If the value of the <xref:System.Web.UI.Control.RenderingCompatibility%2A> property is `3.5`, the <xref:System.Web.UI.WebControls.Menu> control uses HTML `table` elements and inline styles.
- If the value of the <xref:System.Web.UI.Control.RenderingCompatibility%2A> property is `4.0` or greater, the <xref:System.Web.UI.WebControls.Menu> control uses HTML `listitem` elements and CSS styles.
This property is provided for backward compatibility. If the <xref:System.Web.UI.Control.RenderingCompatibility%2A> property indicates that you want controls to generate HTML that is compatible with ASP.NET 4 or later, but you want the <xref:System.Web.UI.WebControls.Menu> control to be an exception that uses earlier behavior, you can set this property to <xref:System.Web.UI.WebControls.MenuRenderingMode.Table>. For example, if you