In This Article

NavigationPaneCollection Class

Encapsulates a collection of NavigationPane components.

public class NavigationPaneCollection : IList, ICollection, IEnumerable
Inheritance:
Object Object

Remarks

This class is a zero-based indexed collection.

Constructors

NavigationPaneCollection(Control.ControlCollection)

Initializes a new instance of the NavigationPaneCollection class.

public NavigationPaneCollection(Control.ControlCollection navigationBarControls)
Parameter Type Description
navigationBarControls Control.ControlCollection

The control collection to link to.

Properties

Count

Gets the number of panes contained in the collection.

public virtual int Count { get; }

Property Value

Int32:

The number of panes contained in the collection.

IsFixedSize

Gets a value indicating whether the collection has a fixed size.

public bool IsFixedSize { get; }

Property Value

Boolean:

true if the collection has a fixed size; otherwise, false.

Remarks

A collection with a fixed size does not allow the addition or removal of elements, but it allows the modification of existing elements.

IsReadOnly

Gets a value indicating whether the collection is read-only.

public bool IsReadOnly { get; }

Property Value

Boolean:

true if the collection is read-only; otherwise, false.

IsSynchronized

Gets a value indicating whether access to the collection is synchronized (thread-safe).

public virtual bool IsSynchronized { get; }

Property Value

Boolean:

true if the collection is synchronized (thread-safe); otherwise, false.

Remarks

To guarantee the thread safety of the collection, all operations must be done through the wrapper returned by the SyncRoot property.

Item[Int32]

Gets the NavigationPane at the specified index.

[C#] In C#, this property is the indexer for the NavigationPaneCollection class.

public NavigationPane this[int index] { get; set; }
Parameter Type Description
index Int32

The index of the NavigationPane to return.

Property Value

NavigationPane:

The NavigationPane at the specified index.

Item[String]

Gets the NavigationPane with the specified key.

public NavigationPane this[string key] { get; }
Parameter Type Description
key String

The key of the NavigationPane to return.

Property Value

NavigationPane:

The NavigationPane with the specified key.

SyncRoot

Gets an Object that can be used to synchronize access to the collection.

public virtual object SyncRoot { get; }

Property Value

Object:

An Object that can be used to synchronize access to the collection.

Methods

Add(NavigationPane)

Adds the specified NavigationPane to the collection.

public int Add(NavigationPane pane)
Parameter Type Description
pane NavigationPane

The NavigationPane to add.

Returns

Int32:

The index of the NavigationPane that was inserted.

AddRange(NavigationPane[])

Adds the specified array of NavigationPane controls to the collection.

public void AddRange(NavigationPane[] panes)
Parameter Type Description
panes NavigationPane[]

The array of NavigationPane controls to add.

Clear()

Removes all NavigationPane objects from the collection.

public void Clear()

Contains(NavigationPane)

Determines whether the specified NavigationPane is in the collection.

public bool Contains(NavigationPane pane)
Parameter Type Description
pane NavigationPane

The NavigationPane to look for.

Returns

Boolean:

true if the collection contains the NavigationPane; otherwise, false.

Contains(String)

Determines whether the a NavigationPane with the specified key is in the collection.

public virtual bool Contains(string key)
Parameter Type Description
key String

The key of the NavigationPane to look for.

Returns

Boolean:

true if the collection contains a NavigationPane with the specified key; otherwise, false.

CopyTo(Array, Int32)

Copies the entire collection to a compatible one-dimensional Array, starting at the specified index of the target array.

public virtual void CopyTo(Array array, int arrayIndex)
Parameter Type Description
array Array

The one-dimensional Array that is the destination of the elements copied from the collection. The Array must have zero-based indexing.

arrayIndex Int32

The zero-based index in array at which copying begins.

GetEnumerator()

Retrieves an IEnumerator object for the entire collection.

public virtual IEnumerator GetEnumerator()

Returns

IEnumerator:

An IEnumerator object for the entire collection

Remarks

Enumerators are intended to be used only to read data in the collection. Enumerators cannot be used to modify the underlying collection.

The enumerator does not have exclusive access to the collection.

When an enumerator is instantiated, it takes a snapshot of the current state of the collection. If changes are made to the collection, such as adding, modifying or deleting elements, the snapshot gets out of sync and the enumerator throws an InvalidOperationException. Two enumerators instantiated from the same collection at the same time can have different snapshots of the collection.

IndexOf(NavigationPane)

Returns the index of the specified NavigationPane in the collection.

public int IndexOf(NavigationPane pane)
Parameter Type Description
pane NavigationPane

The NavigationPane to look for.

Returns

Int32:

If found, the index where the NavigationPane is in the collection; otherwise, -1.

IndexOf(String)

Returns the index of the NavigationPane with the specified key in the collection.

public int IndexOf(string key)
Parameter Type Description
key String

The key of the NavigationPane to look for.

Returns

Int32:

If found, the index where the NavigationPane is in the collection; otherwise, -1.

Insert(Int32, NavigationPane)

Inserts an NavigationPane into the specified location in the collection.

public void Insert(int index, NavigationPane pane)
Parameter Type Description
index Int32

The index at which to place the NavigationPane.

pane NavigationPane

The NavigationPane to add.

MoveTo(NavigationPane, Int32)

Moves a NavigationPane to the specified index.

public void MoveTo(NavigationPane pane, int newIndex)
Parameter Type Description
pane NavigationPane

The NavigationPane to move.

newIndex Int32

The new index.

Remove(NavigationPane)

Removes the specified NavigationPane from the collection.

public void Remove(NavigationPane pane)
Parameter Type Description
pane NavigationPane

The NavigationPane to remove.

RemoveAt(Int32)

Removes the NavigationPane at the specified index from the collection.

public void RemoveAt(int index)
Parameter Type Description
index Int32

The index of the NavigationPane to remove.

Inherited Members

See Also