a575963da9
Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
594 lines
38 KiB
XML
594 lines
38 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<Type Name="MenuItemCollection" FullName="System.Web.UI.WebControls.MenuItemCollection">
|
|
<TypeSignature Language="C#" Value="public sealed class MenuItemCollection : System.Collections.ICollection, System.Web.UI.IStateManager" />
|
|
<AssemblyInfo>
|
|
<AssemblyName>System.Web</AssemblyName>
|
|
<AssemblyVersion>2.0.0.0</AssemblyVersion>
|
|
</AssemblyInfo>
|
|
<Base>
|
|
<BaseTypeName>System.Object</BaseTypeName>
|
|
</Base>
|
|
<Interfaces>
|
|
<Interface>
|
|
<InterfaceName>System.Collections.ICollection</InterfaceName>
|
|
</Interface>
|
|
<Interface>
|
|
<InterfaceName>System.Web.UI.IStateManager</InterfaceName>
|
|
</Interface>
|
|
</Interfaces>
|
|
<Docs>
|
|
<since version=".NET 2.0" />
|
|
<remarks>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>The <see cref="T:System.Web.UI.WebControls.MenuItemCollection" /> class is used to store and manage a collection of <see cref="T:System.Web.UI.WebControls.MenuItem" /> objects in the <see cref="T:System.Web.UI.WebControls.Menu" /> control. The <see cref="T:System.Web.UI.WebControls.Menu" /> control uses the <see cref="T:System.Web.UI.WebControls.MenuItemCollection" /> class to store its root menu items in the <see cref="P:System.Web.UI.WebControls.Menu.Items" /> property. This collection is also used for the <see cref="P:System.Web.UI.WebControls.MenuItem.ChildItems" /> property of a <see cref="T:System.Web.UI.WebControls.MenuItem" /> object to store a menu item's submenu items (if any).</para>
|
|
<para>The <see cref="T:System.Web.UI.WebControls.MenuItemCollection" /> class supports several ways to access the items in the collection:</para>
|
|
<list type="bullet">
|
|
<item>
|
|
<para>Use the <see cref="P:System.Web.UI.WebControls.MenuItemCollection.Item(System.Int32)" /> indexer to directly retrieve a <see cref="T:System.Web.UI.WebControls.MenuItem" /> object at a specific zero-based index.</para>
|
|
</item>
|
|
<item>
|
|
<para>Use the <see cref="M:System.Web.UI.WebControls.MenuItemCollection.GetEnumerator" /> method to create an enumerator that can be used to iterate through the collection.</para>
|
|
</item>
|
|
<item>
|
|
<para>Use the <see cref="M:System.Web.UI.WebControls.MenuItemCollection.CopyTo(System.Array,System.Int32)" /> method to copy the contents of the collection into an array.</para>
|
|
</item>
|
|
</list>
|
|
<para>You can programmatically manage a <see cref="T:System.Web.UI.WebControls.MenuItemCollection" /> object by adding and removing <see cref="T:System.Web.UI.WebControls.MenuItem" /> objects. To add menu items to the collection, use the <see cref="M:System.Web.UI.WebControls.MenuItemCollection.Add(System.Web.UI.WebControls.MenuItem)" /> or the <see cref="M:System.Web.UI.WebControls.MenuItemCollection.AddAt(System.Int32,System.Web.UI.WebControls.MenuItem)" /> method. To remove nodes from the collection, use the <see cref="M:System.Web.UI.WebControls.MenuItemCollection.Remove(System.Web.UI.WebControls.MenuItem)" />, the <see cref="M:System.Web.UI.WebControls.MenuItemCollection.RemoveAt(System.Int32)" />, or the <see cref="M:System.Web.UI.WebControls.MenuItemCollection.Clear" /> method.</para>
|
|
<block subset="none" type="note">
|
|
<para>When the <see cref="T:System.Web.UI.WebControls.Menu" /> control is bound to a data source, the <see cref="P:System.Web.UI.WebControls.Menu.Items" /> and <see cref="P:System.Web.UI.WebControls.MenuItem.ChildItems" /> collections are automatically populated each time binding occurs. Any changes to the collections between bindings will be lost. To retain these changes, either update the data source or manually rebuild the collection each time you bind.</para>
|
|
</block>
|
|
<para>The <see cref="T:System.Web.UI.WebControls.MenuItemCollection" /> class contains properties and methods that allow you to retrieve information about the collection itself. To find out how many items are in the collection, use the <see cref="P:System.Web.UI.WebControls.MenuItemCollection.Count" /> property. If you want to determine whether the collection contains a certain <see cref="T:System.Web.UI.WebControls.MenuItem" /> object, use the <see cref="M:System.Web.UI.WebControls.MenuItemCollection.Contains(System.Web.UI.WebControls.MenuItem)" /> method. To get the index of a <see cref="T:System.Web.UI.WebControls.MenuItem" /> object in the collection, use the <see cref="M:System.Web.UI.WebControls.MenuItemCollection.IndexOf(System.Web.UI.WebControls.MenuItem)" /> method.</para>
|
|
</remarks>
|
|
<summary>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>Represents a collection of menu items in a <see cref="T:System.Web.UI.WebControls.Menu" /> control. This class cannot be inherited.</para>
|
|
</summary>
|
|
</Docs>
|
|
<Members>
|
|
<Member MemberName=".ctor">
|
|
<MemberSignature Language="C#" Value="public MenuItemCollection ();" />
|
|
<MemberType>Constructor</MemberType>
|
|
<Parameters />
|
|
<Docs>
|
|
<since version=".NET 2.0" />
|
|
<remarks>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>Use this constructor to initialize a new instance of the <see cref="T:System.Web.UI.WebControls.MenuItemCollection" /> class using the default values. This constructor is commonly used when creating a collection of root menu items where a parent menu (or owner) is not required.</para>
|
|
<block subset="none" type="note">
|
|
<para>When creating a collection of child menu items, you should use the overloaded constructor that takes the <paramref name="owner" /> parameter, instead of this constructor, to specify the parent menu item.</para>
|
|
</block>
|
|
<para>This constructor is used primarily by control developers when extending the <see cref="T:System.Web.UI.WebControls.Menu" /> control to initialize the <see cref="P:System.Web.UI.WebControls.Menu.Items" /> property.</para>
|
|
</remarks>
|
|
<summary>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>Initializes a new instance of the <see cref="T:System.Web.UI.WebControls.MenuItemCollection" /> class using the default values.</para>
|
|
</summary>
|
|
</Docs>
|
|
<AssemblyInfo>
|
|
<AssemblyVersion>2.0.0.0</AssemblyVersion>
|
|
</AssemblyInfo>
|
|
</Member>
|
|
<Member MemberName=".ctor">
|
|
<MemberSignature Language="C#" Value="public MenuItemCollection (System.Web.UI.WebControls.MenuItem owner);" />
|
|
<MemberType>Constructor</MemberType>
|
|
<Parameters>
|
|
<Parameter Name="owner" Type="System.Web.UI.WebControls.MenuItem" />
|
|
</Parameters>
|
|
<Docs>
|
|
<since version=".NET 2.0" />
|
|
<remarks>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>Use this constructor to initialize a new instance of the <see cref="T:System.Web.UI.WebControls.MenuItemCollection" /> class using the specified parent menu item (or owner). This constructor is commonly used when creating a collection of child menu items where you need to specify the parent menu item.</para>
|
|
<block subset="none" type="note">
|
|
<para>When creating a collection of root menu items, consider using the default constructor because root menu items do not have a parent menu item.</para>
|
|
</block>
|
|
<para>This constructor is used primarily by control developers when extending the <see cref="T:System.Web.UI.WebControls.MenuItem" /> class to initialize the <see cref="P:System.Web.UI.WebControls.MenuItem.ChildItems" /> property.</para>
|
|
</remarks>
|
|
<summary>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>Initializes a new instance of the <see cref="T:System.Web.UI.WebControls.MenuItemCollection" /> class using the specified parent menu item (or owner).</para>
|
|
</summary>
|
|
<param name="owner">
|
|
<attribution license="cc4" from="Microsoft" modified="false" />A <see cref="T:System.Web.UI.WebControls.MenuItem" /> that represents the parent menu item of the current <see cref="T:System.Web.UI.WebControls.MenuItemCollection" />.</param>
|
|
</Docs>
|
|
<AssemblyInfo>
|
|
<AssemblyVersion>2.0.0.0</AssemblyVersion>
|
|
</AssemblyInfo>
|
|
</Member>
|
|
<Member MemberName="Add">
|
|
<MemberSignature Language="C#" Value="public void Add (System.Web.UI.WebControls.MenuItem child);" />
|
|
<MemberType>Method</MemberType>
|
|
<ReturnValue>
|
|
<ReturnType>System.Void</ReturnType>
|
|
</ReturnValue>
|
|
<Parameters>
|
|
<Parameter Name="child" Type="System.Web.UI.WebControls.MenuItem" />
|
|
</Parameters>
|
|
<Docs>
|
|
<since version=".NET 2.0" />
|
|
<remarks>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>Use the <see cref="M:System.Web.UI.WebControls.MenuItemCollection.Add(System.Web.UI.WebControls.MenuItem)" /> method to append the specified <see cref="T:System.Web.UI.WebControls.MenuItem" /> object to the end of the collection.</para>
|
|
<block subset="none" type="note">
|
|
<para>You can add null values and duplicate <see cref="T:System.Web.UI.WebControls.MenuItem" /> objects to the collection.</para>
|
|
</block>
|
|
<para>As an alternative, you can insert a <see cref="T:System.Web.UI.WebControls.MenuItem" /> object in the collection at a specific index by using the <see cref="M:System.Web.UI.WebControls.MenuItemCollection.AddAt(System.Int32,System.Web.UI.WebControls.MenuItem)" /> method.</para>
|
|
</remarks>
|
|
<summary>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>Appends the specified <see cref="T:System.Web.UI.WebControls.MenuItem" /> object to the end of the current <see cref="T:System.Web.UI.WebControls.MenuItemCollection" /> object.</para>
|
|
</summary>
|
|
<param name="child">
|
|
<attribution license="cc4" from="Microsoft" modified="false" />The <see cref="T:System.Web.UI.WebControls.MenuItem" /> to append to the end of the current <see cref="T:System.Web.UI.WebControls.MenuItemCollection" />.</param>
|
|
</Docs>
|
|
<AssemblyInfo>
|
|
<AssemblyVersion>2.0.0.0</AssemblyVersion>
|
|
</AssemblyInfo>
|
|
</Member>
|
|
<Member MemberName="AddAt">
|
|
<MemberSignature Language="C#" Value="public void AddAt (int index, System.Web.UI.WebControls.MenuItem child);" />
|
|
<MemberType>Method</MemberType>
|
|
<ReturnValue>
|
|
<ReturnType>System.Void</ReturnType>
|
|
</ReturnValue>
|
|
<Parameters>
|
|
<Parameter Name="index" Type="System.Int32" />
|
|
<Parameter Name="child" Type="System.Web.UI.WebControls.MenuItem" />
|
|
</Parameters>
|
|
<Docs>
|
|
<since version=".NET 2.0" />
|
|
<remarks>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>Use the <see cref="M:System.Web.UI.WebControls.MenuItemCollection.AddAt(System.Int32,System.Web.UI.WebControls.MenuItem)" /> method to insert the specified <see cref="T:System.Web.UI.WebControls.MenuItem" /> object in the collection at the specified index.</para>
|
|
<block subset="none" type="note">
|
|
<para>You can add null values and duplicate <see cref="T:System.Web.UI.WebControls.MenuItem" /> objects to the collection.</para>
|
|
</block>
|
|
<para>As an alternative, you can simply append a <see cref="T:System.Web.UI.WebControls.MenuItem" /> object to the end of the collection by using the <see cref="M:System.Web.UI.WebControls.MenuItemCollection.Add(System.Web.UI.WebControls.MenuItem)" /> method.</para>
|
|
</remarks>
|
|
<summary>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>Inserts the specified <see cref="T:System.Web.UI.WebControls.MenuItem" /> object in the current <see cref="T:System.Web.UI.WebControls.MenuItemCollection" /> object at the specified index location.</para>
|
|
</summary>
|
|
<param name="index">
|
|
<attribution license="cc4" from="Microsoft" modified="false" />The zero-based index location at which to insert the <see cref="T:System.Web.UI.WebControls.MenuItem" />.</param>
|
|
<param name="child">
|
|
<attribution license="cc4" from="Microsoft" modified="false" />The <see cref="T:System.Web.UI.WebControls.MenuItem" /> to insert.</param>
|
|
</Docs>
|
|
<AssemblyInfo>
|
|
<AssemblyVersion>2.0.0.0</AssemblyVersion>
|
|
</AssemblyInfo>
|
|
</Member>
|
|
<Member MemberName="Clear">
|
|
<MemberSignature Language="C#" Value="public void Clear ();" />
|
|
<MemberType>Method</MemberType>
|
|
<ReturnValue>
|
|
<ReturnType>System.Void</ReturnType>
|
|
</ReturnValue>
|
|
<Parameters />
|
|
<Docs>
|
|
<since version=".NET 2.0" />
|
|
<remarks>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>Use the <see cref="M:System.Web.UI.WebControls.MenuItemCollection.Clear" /> method to remove every <see cref="T:System.Web.UI.WebControls.MenuItem" /> object from the current <see cref="T:System.Web.UI.WebControls.MenuItemCollection" /> object.</para>
|
|
<block subset="none" type="note">
|
|
<para>To remove an individual node from the collection, consider using the <see cref="M:System.Web.UI.WebControls.MenuItemCollection.Remove(System.Web.UI.WebControls.MenuItem)" /> or the <see cref="M:System.Web.UI.WebControls.MenuItemCollection.RemoveAt(System.Int32)" /> method.</para>
|
|
</block>
|
|
</remarks>
|
|
<summary>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>Removes all items from the current <see cref="T:System.Web.UI.WebControls.MenuItemCollection" /> object.</para>
|
|
</summary>
|
|
</Docs>
|
|
<AssemblyInfo>
|
|
<AssemblyVersion>2.0.0.0</AssemblyVersion>
|
|
</AssemblyInfo>
|
|
</Member>
|
|
<Member MemberName="Contains">
|
|
<MemberSignature Language="C#" Value="public bool Contains (System.Web.UI.WebControls.MenuItem child);" />
|
|
<MemberType>Method</MemberType>
|
|
<ReturnValue>
|
|
<ReturnType>System.Boolean</ReturnType>
|
|
</ReturnValue>
|
|
<Parameters>
|
|
<Parameter Name="child" Type="System.Web.UI.WebControls.MenuItem" />
|
|
</Parameters>
|
|
<Docs>
|
|
<param name="child">To be added.</param>
|
|
<since version=".NET 2.0" />
|
|
<remarks>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>Use the <see cref="M:System.Web.UI.WebControls.MenuItemCollection.Contains(System.Web.UI.WebControls.MenuItem)" /> method to determine whether a <see cref="T:System.Web.UI.WebControls.MenuItem" /> object is contained in the current <see cref="T:System.Web.UI.WebControls.MenuItemCollection" /> object. The <see cref="T:System.Web.UI.WebControls.MenuItem" /> and its properties is compared with the passed in value. This method is commonly used to test for the existence of a <see cref="T:System.Web.UI.WebControls.MenuItem" /> object before performing a task, such as adding or removing a menu item from the collection.</para>
|
|
</remarks>
|
|
<summary>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>Determines whether the specified <see cref="T:System.Web.UI.WebControls.MenuItem" /> object is in the collection.</para>
|
|
</summary>
|
|
<returns>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>true if the specified <see cref="T:System.Web.UI.WebControls.MenuItem" /> object is contained in the collection; otherwise, false.</para>
|
|
</returns>
|
|
</Docs>
|
|
<AssemblyInfo>
|
|
<AssemblyVersion>2.0.0.0</AssemblyVersion>
|
|
</AssemblyInfo>
|
|
</Member>
|
|
<Member MemberName="CopyTo">
|
|
<MemberSignature Language="C#" Value="public void CopyTo (Array itemArray, int index);" />
|
|
<MemberType>Method</MemberType>
|
|
<ReturnValue>
|
|
<ReturnType>System.Void</ReturnType>
|
|
</ReturnValue>
|
|
<Parameters>
|
|
<Parameter Name="itemArray" Type="System.Array" />
|
|
<Parameter Name="index" Type="System.Int32" />
|
|
</Parameters>
|
|
<Docs>
|
|
<param name="itemArray">To be added.</param>
|
|
<since version=".NET 2.0" />
|
|
<remarks>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>Use the <see cref="M:System.Web.UI.WebControls.MenuItemCollection.CopyTo(System.Array,System.Int32)" /> method to copy the contents of the current <see cref="T:System.Web.UI.WebControls.MenuItemCollection" /> object into the specified zero-based <see cref="T:System.Array" />. Items are copied starting at the specified index of the target array. With the <see cref="T:System.Array" />, you can then use array syntax to access the items in the <see cref="T:System.Web.UI.WebControls.MenuItemCollection" /> object.</para>
|
|
<para>As an alternative, you can also use the <see cref="M:System.Web.UI.WebControls.MenuItemCollection.GetEnumerator" /> method to create an enumerator that can be used to access the items in the collection.</para>
|
|
</remarks>
|
|
<summary>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>Copies all the items from the <see cref="T:System.Web.UI.WebControls.MenuItemCollection" /> object to a compatible one-dimensional <see cref="T:System.Array" />, starting at the specified index in the target array.</para>
|
|
</summary>
|
|
<param name="index">
|
|
<attribution license="cc4" from="Microsoft" modified="false" />The position in the target array at which to start receiving the copied content.</param>
|
|
</Docs>
|
|
<AssemblyInfo>
|
|
<AssemblyVersion>2.0.0.0</AssemblyVersion>
|
|
</AssemblyInfo>
|
|
</Member>
|
|
<Member MemberName="CopyTo">
|
|
<MemberSignature Language="C#" Value="public void CopyTo (System.Web.UI.WebControls.MenuItem[] itemArray, int index);" />
|
|
<MemberType>Method</MemberType>
|
|
<ReturnValue>
|
|
<ReturnType>System.Void</ReturnType>
|
|
</ReturnValue>
|
|
<Parameters>
|
|
<Parameter Name="itemArray" Type="System.Web.UI.WebControls.MenuItem[]" />
|
|
<Parameter Name="index" Type="System.Int32" />
|
|
</Parameters>
|
|
<Docs>
|
|
<param name="itemArray">To be added.</param>
|
|
<since version=".NET 2.0" />
|
|
<remarks>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>Use the <see cref="M:System.Web.UI.WebControls.MenuItemCollection.CopyTo(System.Web.UI.WebControls.MenuItem[],System.Int32)" /> method to copy the contents of the current <see cref="T:System.Web.UI.WebControls.MenuItemCollection" /> object into the specified zero-based array. Items are copied starting at the specified index of the target array. With the array, you can then use array syntax to access the items in the <see cref="T:System.Web.UI.WebControls.MenuItemCollection" /> object.</para>
|
|
<para>As an alternative, you can also use the <see cref="M:System.Web.UI.WebControls.MenuItemCollection.GetEnumerator" /> method to create an enumerator that can be used to access the items in the collection.</para>
|
|
</remarks>
|
|
<summary>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>Copies all the items from the <see cref="T:System.Web.UI.WebControls.MenuItemCollection" /> object to a compatible one-dimensional array of <see cref="T:System.Web.UI.WebControls.MenuItem" /> objects, starting at the specified index in the target array.</para>
|
|
</summary>
|
|
<param name="index">
|
|
<attribution license="cc4" from="Microsoft" modified="false" />The position in the target array at which to start receiving the copied content.</param>
|
|
</Docs>
|
|
<AssemblyInfo>
|
|
<AssemblyVersion>2.0.0.0</AssemblyVersion>
|
|
</AssemblyInfo>
|
|
</Member>
|
|
<Member MemberName="Count">
|
|
<MemberSignature Language="C#" Value="public int Count { get; }" />
|
|
<MemberType>Property</MemberType>
|
|
<ReturnValue>
|
|
<ReturnType>System.Int32</ReturnType>
|
|
</ReturnValue>
|
|
<Docs>
|
|
<value>To be added.</value>
|
|
<since version=".NET 2.0" />
|
|
<remarks>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>Use the <see cref="P:System.Web.UI.WebControls.MenuItemCollection.Count" /> property to determine the number of items in a <see cref="T:System.Web.UI.WebControls.MenuItemCollection" /> object. This property is commonly used when iterating through a collection to determine the upper bound of the collection. The <see cref="P:System.Web.UI.WebControls.MenuItemCollection.Count" /> property is also commonly used to determine whether a collection is empty.</para>
|
|
</remarks>
|
|
<summary>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>Gets the number of menu items contained in the current <see cref="T:System.Web.UI.WebControls.MenuItemCollection" /> object.</para>
|
|
</summary>
|
|
</Docs>
|
|
<AssemblyInfo>
|
|
<AssemblyVersion>2.0.0.0</AssemblyVersion>
|
|
</AssemblyInfo>
|
|
</Member>
|
|
<Member MemberName="GetEnumerator">
|
|
<MemberSignature Language="C#" Value="public System.Collections.IEnumerator GetEnumerator ();" />
|
|
<MemberType>Method</MemberType>
|
|
<ReturnValue>
|
|
<ReturnType>System.Collections.IEnumerator</ReturnType>
|
|
</ReturnValue>
|
|
<Parameters />
|
|
<Docs>
|
|
<since version=".NET 2.0" />
|
|
<remarks>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>Use the <see cref="M:System.Web.UI.WebControls.MenuItemCollection.GetEnumerator" /> method to create an enumerator that can be easily iterated through to get each item in the current <see cref="T:System.Web.UI.WebControls.MenuItemCollection" /> object. To get the item currently pointed to in the enumerator, use the <see cref="P:System.Collections.IEnumerator.Current" /> property. Use the <see cref="M:System.Collections.IEnumerator.MoveNext" /> method to move to the next item. If you need to move the enumerator back to the beginning of the collection, use the <see cref="M:System.Collections.IEnumerator.Reset" /> method.</para>
|
|
<block subset="none" type="note">
|
|
<para>After you create an enumerator or use the <see cref="M:System.Collections.IEnumerator.Reset" /> method, you must call the <see cref="M:System.Collections.IEnumerator.MoveNext" /> method. Otherwise, the item represented by the <see cref="P:System.Collections.IEnumerator.Current" /> property is undefined.</para>
|
|
</block>
|
|
<para>As an alternative, you can also use the <see cref="Overload:System.Web.UI.WebControls.MenuItemCollection.CopyTo" /> method to copy the items in the collection to an array. You can then use the array to access the items in the collection.</para>
|
|
</remarks>
|
|
<summary>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>Returns an enumerator that can be used to iterate through the items in the current <see cref="T:System.Web.UI.WebControls.MenuItemCollection" /> object.</para>
|
|
</summary>
|
|
<returns>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>An enumerator that can be used to iterate through the items in the current <see cref="T:System.Web.UI.WebControls.MenuItemCollection" />.</para>
|
|
</returns>
|
|
</Docs>
|
|
<AssemblyInfo>
|
|
<AssemblyVersion>2.0.0.0</AssemblyVersion>
|
|
</AssemblyInfo>
|
|
</Member>
|
|
<Member MemberName="IndexOf">
|
|
<MemberSignature Language="C#" Value="public int IndexOf (System.Web.UI.WebControls.MenuItem item);" />
|
|
<MemberType>Method</MemberType>
|
|
<ReturnValue>
|
|
<ReturnType>System.Int32</ReturnType>
|
|
</ReturnValue>
|
|
<Parameters>
|
|
<Parameter Name="item" Type="System.Web.UI.WebControls.MenuItem" />
|
|
</Parameters>
|
|
<Docs>
|
|
<param name="item">To be added.</param>
|
|
<since version=".NET 2.0" />
|
|
<remarks>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>Use the <see cref="M:System.Web.UI.WebControls.MenuItemCollection.IndexOf(System.Web.UI.WebControls.MenuItem)" /> method to determine the index of the specified <see cref="T:System.Web.UI.WebControls.MenuItem" /> object in the current <see cref="T:System.Web.UI.WebControls.MenuItemCollection" /> object. If the menu item is not in the collection, the method returns -1.</para>
|
|
<block subset="none" type="note">
|
|
<para>If the specified menu item appears multiple times in the collection, the index of the first occurrence is returned.</para>
|
|
</block>
|
|
</remarks>
|
|
<summary>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>Determines the index of the specified <see cref="T:System.Web.UI.WebControls.MenuItem" /> object in the collection.</para>
|
|
</summary>
|
|
<returns>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>The zero-based index of the first occurrence of <paramref name="value" /> within the current <see cref="T:System.Web.UI.WebControls.MenuItemCollection" />, if found; otherwise, -1.</para>
|
|
</returns>
|
|
</Docs>
|
|
<AssemblyInfo>
|
|
<AssemblyVersion>2.0.0.0</AssemblyVersion>
|
|
</AssemblyInfo>
|
|
</Member>
|
|
<Member MemberName="IsSynchronized">
|
|
<MemberSignature Language="C#" Value="public bool IsSynchronized { get; }" />
|
|
<MemberType>Property</MemberType>
|
|
<ReturnValue>
|
|
<ReturnType>System.Boolean</ReturnType>
|
|
</ReturnValue>
|
|
<Docs>
|
|
<value>To be added.</value>
|
|
<since version=".NET 2.0" />
|
|
<remarks>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>The <see cref="P:System.Web.UI.WebControls.MenuItemCollection.IsSynchronized" /> property is used to indicate whether access to the <see cref="T:System.Web.UI.WebControls.MenuItemCollection" /> object is synchronized (thread safe). This property is derived from the <see cref="T:System.Collections.ICollection" /> class and is overridden to always return false.</para>
|
|
<para>For more information on the <see cref="P:System.Web.UI.WebControls.MenuItemCollection.IsSynchronized" /> property, see the <see cref="P:System.Collections.ICollection.IsSynchronized" /> property of the <see cref="T:System.Collections.ICollection" /> interface.</para>
|
|
</remarks>
|
|
<summary>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>Gets a value indicating whether access to the <see cref="T:System.Web.UI.WebControls.MenuItemCollection" /> object is synchronized (thread safe).</para>
|
|
</summary>
|
|
</Docs>
|
|
<AssemblyInfo>
|
|
<AssemblyVersion>2.0.0.0</AssemblyVersion>
|
|
</AssemblyInfo>
|
|
</Member>
|
|
<Member MemberName="Item">
|
|
<MemberSignature Language="C#" Value="public System.Web.UI.WebControls.MenuItem this[int i] { get; }" />
|
|
<MemberType>Property</MemberType>
|
|
<ReturnValue>
|
|
<ReturnType>System.Web.UI.WebControls.MenuItem</ReturnType>
|
|
</ReturnValue>
|
|
<Parameters>
|
|
<Parameter Name="i" Type="System.Int32" />
|
|
</Parameters>
|
|
<Docs>
|
|
<param name="i">To be added.</param>
|
|
<summary>To be added.</summary>
|
|
<value>To be added.</value>
|
|
<remarks>To be added.</remarks>
|
|
<since version=".NET 2.0" />
|
|
</Docs>
|
|
<AssemblyInfo>
|
|
<AssemblyVersion>2.0.0.0</AssemblyVersion>
|
|
</AssemblyInfo>
|
|
</Member>
|
|
<Member MemberName="Remove">
|
|
<MemberSignature Language="C#" Value="public void Remove (System.Web.UI.WebControls.MenuItem item);" />
|
|
<MemberType>Method</MemberType>
|
|
<ReturnValue>
|
|
<ReturnType>System.Void</ReturnType>
|
|
</ReturnValue>
|
|
<Parameters>
|
|
<Parameter Name="item" Type="System.Web.UI.WebControls.MenuItem" />
|
|
</Parameters>
|
|
<Docs>
|
|
<param name="item">To be added.</param>
|
|
<since version=".NET 2.0" />
|
|
<remarks>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>Use the <see cref="M:System.Web.UI.WebControls.MenuItemCollection.Remove(System.Web.UI.WebControls.MenuItem)" /> method to remove the specified menu item from the collection. All items that follow that menu item are then moved up to fill in the vacant position. The indexes of the moved items are also updated.</para>
|
|
<block subset="none" type="note">
|
|
<para>The <see cref="T:System.Web.UI.WebControls.MenuItemCollection" /> object can contain null values, as well as duplicate <see cref="T:System.Web.UI.WebControls.MenuItem" /> objects.</para>
|
|
</block>
|
|
<para>As an alternative, you can remove a menu item from a specific index in the collection by using the <see cref="M:System.Web.UI.WebControls.MenuItemCollection.RemoveAt(System.Int32)" /> method. You can also remove all menu items from the collection by using the <see cref="M:System.Web.UI.WebControls.MenuItemCollection.Clear" /> method.</para>
|
|
</remarks>
|
|
<summary>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>Removes the specified <see cref="T:System.Web.UI.WebControls.MenuItem" /> object from the <see cref="T:System.Web.UI.WebControls.MenuItemCollection" /> object.</para>
|
|
</summary>
|
|
</Docs>
|
|
<AssemblyInfo>
|
|
<AssemblyVersion>2.0.0.0</AssemblyVersion>
|
|
</AssemblyInfo>
|
|
</Member>
|
|
<Member MemberName="RemoveAt">
|
|
<MemberSignature Language="C#" Value="public void RemoveAt (int index);" />
|
|
<MemberType>Method</MemberType>
|
|
<ReturnValue>
|
|
<ReturnType>System.Void</ReturnType>
|
|
</ReturnValue>
|
|
<Parameters>
|
|
<Parameter Name="index" Type="System.Int32" />
|
|
</Parameters>
|
|
<Docs>
|
|
<since version=".NET 2.0" />
|
|
<remarks>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>Use the <see cref="M:System.Web.UI.WebControls.MenuItemCollection.RemoveAt(System.Int32)" /> method to remove the <see cref="T:System.Web.UI.WebControls.MenuItem" /> object at the specified index location from the collection. All items that follow that menu item are then moved up to fill in the vacant position. The indexes of the moved items are also updated.</para>
|
|
<block subset="none" type="note">
|
|
<para>The <see cref="T:System.Web.UI.WebControls.MenuItemCollection" /> object can contain null values, as well as duplicate <see cref="T:System.Web.UI.WebControls.MenuItem" /> objects.</para>
|
|
</block>
|
|
<para>As an alternative, you can remove a specific <see cref="T:System.Web.UI.WebControls.MenuItem" /> object by using the <see cref="M:System.Web.UI.WebControls.MenuItemCollection.Remove(System.Web.UI.WebControls.MenuItem)" /> method. You can also remove all menu items from the collection by using the <see cref="M:System.Web.UI.WebControls.MenuItemCollection.Clear" /> method.</para>
|
|
</remarks>
|
|
<summary>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>Removes the <see cref="T:System.Web.UI.WebControls.MenuItem" /> object at the specified index location from the current <see cref="T:System.Web.UI.WebControls.MenuItemCollection" /> object.</para>
|
|
</summary>
|
|
<param name="index">
|
|
<attribution license="cc4" from="Microsoft" modified="false" />The zero-based index location of the menu item to remove.</param>
|
|
</Docs>
|
|
<AssemblyInfo>
|
|
<AssemblyVersion>2.0.0.0</AssemblyVersion>
|
|
</AssemblyInfo>
|
|
</Member>
|
|
<Member MemberName="SyncRoot">
|
|
<MemberSignature Language="C#" Value="public object SyncRoot { get; }" />
|
|
<MemberType>Property</MemberType>
|
|
<ReturnValue>
|
|
<ReturnType>System.Object</ReturnType>
|
|
</ReturnValue>
|
|
<Docs>
|
|
<value>To be added.</value>
|
|
<since version=".NET 2.0" />
|
|
<remarks>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>The <see cref="P:System.Web.UI.WebControls.MenuItemCollection.SyncRoot" /> property provides a synchronized version of the <see cref="T:System.Web.UI.WebControls.MenuItemCollection" /> object that can be used with synchronizing (threading) code.</para>
|
|
<block subset="none" type="note">
|
|
<para>The <see cref="P:System.Web.UI.WebControls.MenuItemCollection.IsSynchronized" /> property of this class always returns false, which indicates that the <see cref="T:System.Web.UI.WebControls.MenuItemCollection" /> class is not synchronized (not thread safe).</para>
|
|
</block>
|
|
<para>Synchronizing code must perform operations on the <see cref="P:System.Web.UI.WebControls.MenuItemCollection.SyncRoot" /> object of the <see cref="T:System.Web.UI.WebControls.MenuItemCollection" /> collection, not directly on the <see cref="T:System.Web.UI.WebControls.MenuItemCollection" /> object itself. This ensures proper operation of collections that are derived from other objects. Specifically, it maintains proper synchronization with other threads that might be simultaneously modifying the <see cref="T:System.Web.UI.WebControls.MenuItemCollection" /> object.</para>
|
|
<block subset="none" type="note">
|
|
<para>The object returned in this implementation is the <see cref="T:System.Collections.ArrayList" /> object used to store the <see cref="T:System.Web.UI.WebControls.MenuItem" /> objects in the collection.</para>
|
|
</block>
|
|
<para>Enumerating through a collection is intrinsically not a thread-safe procedure. Even when a collection is synchronized, other threads could still modify the collection, causing the enumerator to throw an exception. To guarantee thread safety during enumeration, you can either lock the collection during the entire enumeration or catch the exceptions resulting from changes made by other threads.</para>
|
|
<para>For more information on the <see cref="P:System.Web.UI.WebControls.MenuItemCollection.SyncRoot" /> property, see the <see cref="P:System.Collections.ICollection.SyncRoot" /> property of the <see cref="T:System.Collections.ICollection" /> interface.</para>
|
|
</remarks>
|
|
<summary>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>Gets an object that can be used to synchronize access to the <see cref="T:System.Web.UI.WebControls.MenuItemCollection" /> object.</para>
|
|
</summary>
|
|
</Docs>
|
|
<AssemblyInfo>
|
|
<AssemblyVersion>2.0.0.0</AssemblyVersion>
|
|
</AssemblyInfo>
|
|
</Member>
|
|
<Member MemberName="System.Collections.ICollection.CopyTo">
|
|
<MemberSignature Language="C#" Value="void ICollection.CopyTo (Array array, int index);" />
|
|
<MemberType>Method</MemberType>
|
|
<AssemblyInfo>
|
|
<AssemblyVersion>2.0.0.0</AssemblyVersion>
|
|
</AssemblyInfo>
|
|
<ReturnValue>
|
|
<ReturnType>System.Void</ReturnType>
|
|
</ReturnValue>
|
|
<Parameters>
|
|
<Parameter Name="array" Type="System.Array" />
|
|
<Parameter Name="index" Type="System.Int32" />
|
|
</Parameters>
|
|
<Docs>
|
|
<param name="array">To be added.</param>
|
|
<param name="index">To be added.</param>
|
|
<summary>To be added.</summary>
|
|
<remarks>To be added.</remarks>
|
|
</Docs>
|
|
</Member>
|
|
<Member MemberName="System.Web.UI.IStateManager.IsTrackingViewState">
|
|
<MemberSignature Language="C#" Value="bool System.Web.UI.IStateManager.IsTrackingViewState { get; }" />
|
|
<MemberType>Property</MemberType>
|
|
<AssemblyInfo>
|
|
<AssemblyVersion>2.0.0.0</AssemblyVersion>
|
|
</AssemblyInfo>
|
|
<ReturnValue>
|
|
<ReturnType>System.Boolean</ReturnType>
|
|
</ReturnValue>
|
|
<Docs>
|
|
<value>To be added.</value>
|
|
<remarks>To be added.</remarks>
|
|
<summary>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>Gets a value that indicates whether the <see cref="T:System.Web.UI.WebControls.MenuItemCollection" /> object is saving changes to its view state.</para>
|
|
</summary>
|
|
</Docs>
|
|
</Member>
|
|
<Member MemberName="System.Web.UI.IStateManager.LoadViewState">
|
|
<MemberSignature Language="C#" Value="void IStateManager.LoadViewState (object state);" />
|
|
<MemberType>Method</MemberType>
|
|
<AssemblyInfo>
|
|
<AssemblyVersion>2.0.0.0</AssemblyVersion>
|
|
</AssemblyInfo>
|
|
<ReturnValue>
|
|
<ReturnType>System.Void</ReturnType>
|
|
</ReturnValue>
|
|
<Parameters>
|
|
<Parameter Name="state" Type="System.Object" />
|
|
</Parameters>
|
|
<Docs>
|
|
<remarks>To be added.</remarks>
|
|
<summary>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>Loads the <see cref="T:System.Web.UI.WebControls.MenuItemCollection" /> object's previously saved view state.</para>
|
|
</summary>
|
|
<param name="state">
|
|
<attribution license="cc4" from="Microsoft" modified="false" />An <see cref="T:System.Object" /> that contains the saved view state values.</param>
|
|
</Docs>
|
|
</Member>
|
|
<Member MemberName="System.Web.UI.IStateManager.SaveViewState">
|
|
<MemberSignature Language="C#" Value="object IStateManager.SaveViewState ();" />
|
|
<MemberType>Method</MemberType>
|
|
<AssemblyInfo>
|
|
<AssemblyVersion>2.0.0.0</AssemblyVersion>
|
|
</AssemblyInfo>
|
|
<ReturnValue>
|
|
<ReturnType>System.Object</ReturnType>
|
|
</ReturnValue>
|
|
<Parameters />
|
|
<Docs>
|
|
<remarks>To be added.</remarks>
|
|
<summary>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>Saves the changes to view state to an <see cref="T:System.Object" />.</para>
|
|
</summary>
|
|
<returns>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>The <see cref="T:System.Object" /> that contains the view state changes.</para>
|
|
</returns>
|
|
</Docs>
|
|
</Member>
|
|
<Member MemberName="System.Web.UI.IStateManager.TrackViewState">
|
|
<MemberSignature Language="C#" Value="void IStateManager.TrackViewState ();" />
|
|
<MemberType>Method</MemberType>
|
|
<AssemblyInfo>
|
|
<AssemblyVersion>2.0.0.0</AssemblyVersion>
|
|
</AssemblyInfo>
|
|
<ReturnValue>
|
|
<ReturnType>System.Void</ReturnType>
|
|
</ReturnValue>
|
|
<Parameters />
|
|
<Docs>
|
|
<remarks>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>After this method has been called on a server control, the <see cref="P:System.Web.UI.Control.IsTrackingViewState" /> property returns true.</para>
|
|
</remarks>
|
|
<summary>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>Instructs the <see cref="T:System.Web.UI.WebControls.MenuItemCollection" /> object to track changes to its view state.</para>
|
|
</summary>
|
|
</Docs>
|
|
</Member>
|
|
</Members>
|
|
</Type> |