Manages the root pages owned by a RadPageView and keeps their order aligned with its child controls.
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.UI.dll
Syntax:
public class RadPageViewPageCollection : RadPageViewObject, IDisposable, IList, ICollection, IEnumerable
Inheritance: objectDisposableObjectRadPageViewObjectRadPageViewPageCollection
Implements:
Inherited Members
Constructors
Creates a page collection backed by the owner's control collection.
public RadPageViewPageCollection(RadPageView owner)
The view whose pages are managed by this collection.
Properties
Gets the number of pages currently owned by the view.
public int Count { get; }
Implements:
Gets the page at the specified zero-based index; the collection does not support replacing a page through this indexer.
public RadPageViewPage this[int index] { get; set; }
The zero-based page index.
Exceptions: InvalidOperationExceptionThe indexer setter is used.
Gets the RadPageViewPage instance that matches the specified name.
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.
Requests a page reordering through the view's child-control collection. The view's PageIndexChanging event can cancel the change.
public void ChangeIndex(RadPageViewPage page, int newIndex)
The page to move.
newIndexintThe requested zero-based position.
Removes all pages unless the view's PagesClearing event cancels the operation.
public void Clear()
Implements:
Determines whether the view currently contains the specified page.
public bool Contains(RadPageViewPage item)
The page to locate.
Returns:Copies the pages into an array starting at the specified destination index.
public void CopyTo(RadPageViewPage[] array, int arrayIndex)
The destination array.
arrayIndexintThe zero-based destination index at which copying begins.
Enumerates the pages in the order maintained by the view's control collection.
public IEnumerator<RadPageViewPage> GetEnumerator()
IEnumerator<RadPageViewPage>
An enumerator over the pages.
Gets the zero-based position of a page in the view's control collection.
public int IndexOf(RadPageViewPage item)
The page to locate.
Returns: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.
public void Insert(int index, RadPageViewPage item)
The requested page index.
itemRadPageViewPageThe page to insert.
Requests removal of a page from the view. The view's PageRemoving event can cancel the removal.
public bool Remove(RadPageViewPage item)
The page to remove.
Returns: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.
public void RemoveAt(int index)
The zero-based position of the page to remove.
Implements:
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.
public void Swap(RadPageViewPage page1, RadPageViewPage page2)
The first page.
page2RadPageViewPageThe second page.
Exceptions: ArgumentExceptionEither page does not belong to this view.