Class NavigationDrawerItemCollection
Collection which holds the NavigationDrawer's child items
Inheritance
Implements
Inherited Members
Namespace: Syncfusion.Windows.Forms.Tools
Assembly: Syncfusion.Tools.Windows.dll
Syntax
public class NavigationDrawerItemCollection : IList<Control>, ICollection<Control>, IEnumerable<Control>, IList, ICollection, IEnumerable
Properties
Count
Gets the number of elements contained in the collection.
Declaration
public int Count { get; }
Property Value
Type |
---|
System.Int32 |
Item[Int32]
Gets or sets the element at the specified index.
Declaration
public Control this[int index] { get; set; }
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The zero-based index of the element to get or set. |
Property Value
Type | Description |
---|---|
System.Windows.Forms.Control | The element at the specified index. |
Methods
Add(Control)
Adds an item to the collection.
Declaration
public void Add(Control item)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Forms.Control | item | The item to add to the collection. |
AsEnumerable()
Enumarable list for collection
Declaration
public IEnumerable<Control> AsEnumerable()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.Windows.Forms.Control> | Returns the updated Collection List |
Clear()
Removes all items from the collection.
Declaration
public void Clear()
Contains(Control)
Determines whether the collection contains a specific value.
Declaration
public bool Contains(Control item)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Forms.Control | item | The object to locate in the collection. |
Returns
Type | Description |
---|---|
System.Boolean | True if the item is found in the collection, otherwise false. |
GetEnumerator()
Returns an enumerator that iterates through a collection.
Declaration
public IEnumerator<Control> GetEnumerator()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerator<System.Windows.Forms.Control> | An IEnumerator object that can be used to iterate through the collection. |
IndexOf(Control)
Determines the index of a specific item in the list.
Declaration
public int IndexOf(Control item)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Forms.Control | item | The object to locate in the list. |
Returns
Type | Description |
---|---|
System.Int32 | The index of the item if found in the list, otherwise -1. |
Insert(Int32, Control)
Inserts an item to the list at the specified index.
Declaration
public void Insert(int index, Control item)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The zero-based index at which item should be inserted. |
System.Windows.Forms.Control | item | The object to insert into the list. |
Remove(Control)
Removes the first occurrence of a specific object from the collection.
Declaration
public bool Remove(Control item)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Forms.Control | item | The object to remove from the collection. |
Returns
Type | Description |
---|---|
System.Boolean | True if the item was successfully removed from the colleection, otherwise false. This method also returns false if the item is not found in the original collection. |
RemoveAt(Int32)
Removes the item at the specified index.
Declaration
public void RemoveAt(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The zero-based index of the item to remove. |
Sort()
Sorts the items in the collection
Declaration
public void Sort()
Sort(IComparer<Control>)
Sorts the items in the collection using the provided comparer.
Declaration
public void Sort(IComparer<Control> comparer)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IComparer<System.Windows.Forms.Control> | comparer | The comparer used to compare items. |
Explicit Interface Implementations
ICollection<Control>.CopyTo(Control[], Int32)
Copies the elements of the collection to an array, starting at a particular array index.
Declaration
void ICollection<Control>.CopyTo(Control[] array, int index)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Forms.Control[] | array | The one-dimensional array that is the destination of the elements copied from the collection. The array must have zero-based indexing. |
System.Int32 | index | The zero-based index in array at which copying begins. |
ICollection<Control>.IsReadOnly
Gets a value indicating whether the collection is read-only.
Declaration
bool ICollection<Control>.IsReadOnly { get; }
Returns
Type |
---|
System.Boolean |
ICollection.CopyTo(Array, Int32)
Copies the elements of the collection to an array, starting at a particular array index.
Declaration
void ICollection.CopyTo(Array array, int index)
Parameters
Type | Name | Description |
---|---|---|
System.Array | array | The one-dimensional array that is the destination of the elements copied from the collection. The array must have zero-based indexing. |
System.Int32 | index | The zero-based index in array at which copying begins |
ICollection.IsSynchronized
Gets a value indicating whether access to the collection is synchronized (thread safe).
Declaration
bool ICollection.IsSynchronized { get; }
Returns
Type |
---|
System.Boolean |
ICollection.SyncRoot
Gets an object that can be used to synchronize access to the collection.
Declaration
object ICollection.SyncRoot { get; }
Returns
Type |
---|
System.Object |
IEnumerable.GetEnumerator()
Returns an enumerator that iterates through a collection.
Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
Type | Description |
---|---|
System.Collections.IEnumerator | An IEnumerator object that can be used to iterate through the collection. |
IList.Add(Object)
Adds an item to the list.
Declaration
int IList.Add(object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj | The item to add to the list. |
Returns
Type | Description |
---|---|
System.Int32 | The position at which the item is inserted. |
IList.Contains(Object)
Determines whether the list contains a specific value.
Declaration
bool IList.Contains(object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj | The object to locate in the list. |
Returns
Type | Description |
---|---|
System.Boolean | True if an instance of the item is found in the list, otherwise false. |
IList.get_Item(Int32)
Declaration
object IList.get_Item(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index |
Returns
Type |
---|
System.Object |
IList.IndexOf(Object)
Determines the index of a specific item in the list.
Declaration
int IList.IndexOf(object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj | The object to locate in the list. |
Returns
Type | Description |
---|---|
System.Int32 | The index of the item if found in the list, otherwise -1. |
IList.Insert(Int32, Object)
Inserts an item to the list at the specified index.
Declaration
void IList.Insert(int index, object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The zero-based index at which item should be inserted. |
System.Object | obj | The object to insert into the list. |
IList.IsFixedSize
Gets a value indicating whether the list has a fixed size.
Declaration
bool IList.IsFixedSize { get; }
Returns
Type |
---|
System.Boolean |
IList.IsReadOnly
Gets a value indicating whether the list is read-only.
Declaration
bool IList.IsReadOnly { get; }
Returns
Type |
---|
System.Boolean |
IList.Item[Int32]
Gets or sets the element at the specified index.
Declaration
object IList.this[] { get; set; }
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The zero-based index of the element to get or set. |
Returns
Type | Description |
---|---|
System.Object | The element at the specified index. |
IList.Remove(Object)
Removes the first occurrence of a specific object from the collection.
Declaration
void IList.Remove(object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj |
IList.set_Item(Int32, Object)
Declaration
void IList.set_Item(int index, object value)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | |
System.Object | value |