In This Article

WizardPageCollection Class

Encapsulates a collection of WizardPage components.

[TypeConverter(typeof(WizardPageCollectionConverter))]
public class WizardPageCollection
Inheritance:
object object

Remarks

This class is a zero-based indexed collection.

Constructors

WizardPageCollection(ControlCollection)

Initializes a new instance of the WizardPageCollection class.

public WizardPageCollection(Control.ControlCollection wizardPageContainerControls)
Parameter Type Description
wizardPageContainerControls Control.ControlCollection

The control collection to link to.

See Also

Properties

Count

Gets the number of pages contained in the collection.

public virtual int Count { get; }

Property Value

int:

The number of pages contained in the collection.

See Also

IsFixedSize

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

public bool IsFixedSize { get; }

Property Value

bool:

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.

See Also

IsReadOnly

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

public bool IsReadOnly { get; }

Property Value

bool:

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

See Also

IsSynchronized

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

public virtual bool IsSynchronized { get; }

Property Value

bool:

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.

See Also

this[int]

Gets the WizardPage at the specified index.

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

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

The index of the WizardPage to return.

Property Value

WizardPage:

The WizardPage at the specified index.

See Also

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.

See Also

Methods

Add(WizardPage)

Adds the specified WizardPage to the collection.

public int Add(WizardPage page)
Parameter Type Description
page WizardPage

The WizardPage to add.

Returns

int:

The index of the WizardPage that was inserted.

See Also

AddRange(WizardPage[])

Adds the specified array of WizardPage controls to the collection.

public void AddRange(WizardPage[] pages)
Parameter Type Description
pages WizardPage[]

The array of WizardPage controls to add.

See Also

Clear()

Removes all WizardPage objects from the collection.

public void Clear()

See Also

Contains(WizardPage)

Determines whether the specified WizardPage is in the collection.

public bool Contains(WizardPage page)
Parameter Type Description
page WizardPage

The WizardPage to look for.

Returns

bool:

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

See Also

CopyTo(Array, int)

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 int

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

See Also

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.

See Also

IndexOf(WizardPage)

Returns the index of the specified WizardPage in the collection.

public int IndexOf(WizardPage page)
Parameter Type Description
page WizardPage

The WizardPage to look for.

Returns

int:

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

See Also

Insert(int, WizardPage)

Inserts an WizardPage into the specified location in the collection.

public void Insert(int index, WizardPage page)
Parameter Type Description
index int

The index at which to place the WizardPage.

page WizardPage

The WizardPage to add.

See Also

MoveTo(WizardPage, int)

Moves a WizardPage to the specified index.

public void MoveTo(WizardPage page, int newIndex)
Parameter Type Description
page WizardPage

The WizardPage to move.

newIndex int

The new index.

See Also

Remove(WizardPage)

Removes the specified WizardPage from the collection.

public void Remove(WizardPage page)
Parameter Type Description
page WizardPage

The WizardPage to remove.

See Also

RemoveAt(int)

Removes the WizardPage at the specified index from the collection.

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

The index of the WizardPage to remove.

See Also

Inherited Members

See Also