New to Telerik UI for WinForms? Start a free 30-day trial

Manages the root pages owned by a RadPageView and keeps their order aligned with its child controls.

Definition

Constructors

Creates a page collection backed by the owner's control collection.

C#
public RadPageViewPageCollection(RadPageView owner)
Parameters:ownerRadPageView

The view whose pages are managed by this collection.

Properties

Gets the number of pages currently owned by the view.

C#
public int Count { get; }

Implements: ICollection.Count

Gets the page at the specified zero-based index; the collection does not support replacing a page through this indexer.

C#
public RadPageViewPage this[int index] { get; set; }
Parameters:indexint

The zero-based page index.

Exceptions: InvalidOperationException

The indexer setter is used.

Gets the RadPageViewPage instance that matches the specified name.

C#
public RadPageViewPage this[string name] { get; }
Parameters:namestring

Methods

Adds a page, assigning a unique PageN name and matching text when both are empty. The view's PageAdding event can cancel the addition.

C#
public void Add(RadPageViewPage item)
Parameters:itemRadPageViewPage

The page to add.

Requests a page reordering through the view's child-control collection. The view's PageIndexChanging event can cancel the change.

C#
public void ChangeIndex(RadPageViewPage page, int newIndex)
Parameters:pageRadPageViewPage

The page to move.

newIndexint

The requested zero-based position.

Removes all pages unless the view's PagesClearing event cancels the operation.

C#
public void Clear()

Implements: IList.Clear()

Determines whether the view currently contains the specified page.

C#
public bool Contains(RadPageViewPage item)
Parameters:itemRadPageViewPage

The page to locate.

Returns:

bool

true if the page belongs to the view; otherwise, false.

Determines whether the view contains a page with the specified Name.

C#
public bool Contains(string name)
Parameters:namestring

The page name to find.

Returns:

bool

true if a matching page exists; otherwise, false.

Copies the pages into an array starting at the specified destination index.

C#
public void CopyTo(RadPageViewPage[] array, int arrayIndex)
Parameters:arrayRadPageViewPage[]

The destination array.

arrayIndexint

The zero-based destination index at which copying begins.

Enumerates the pages in the order maintained by the view's control collection.

C#
public IEnumerator<RadPageViewPage> GetEnumerator()
Returns:

IEnumerator<RadPageViewPage>

An enumerator over the pages.

Gets the zero-based position of a page in the view's control collection.

C#
public int IndexOf(RadPageViewPage item)
Parameters:itemRadPageViewPage

The page to locate.

Returns:

int

The page index, or -1 if it is not present.

Adds a page and requests that it be moved to the specified zero-based position. The addition can be canceled by PageAdding, and the position change can be canceled by PageIndexChanging.

C#
public void Insert(int index, RadPageViewPage item)
Parameters:indexint

The requested page index.

itemRadPageViewPage

The page to insert.

Requests removal of a page from the view. The view's PageRemoving event can cancel the removal.

C#
public bool Remove(RadPageViewPage item)
Parameters:itemRadPageViewPage

The page to remove.

Returns:

bool

Always returns true, including when the removal is canceled.

Removes the page at the specified zero-based position. The view's PageRemoving event can cancel the removal.

C#
public void RemoveAt(int index)
Parameters:indexint

The zero-based position of the page to remove.

Implements: IList.RemoveAt(int)

Attempts to exchange the positions of two pages that belong to this view. Each index change can be canceled independently by PageIndexChanging, which can leave the pages in a partially changed order.

C#
public void Swap(RadPageViewPage page1, RadPageViewPage page2)
Parameters:page1RadPageViewPage

The first page.

page2RadPageViewPage

The second page.

Exceptions: ArgumentException

Either page does not belong to this view.