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

Customizing the Stack Position

ThePageViewMode.Stack supports the following types of selection modes which define how the content area is positioned according to the selected item:

  • Bottom (used by default): implies that the stack items are ordered starting from the bottom of the control up to the first item added in the control. The Content Area is displayed on-top of the stack in the remaining available space.

  • Left: implies that the stack items are ordered starting from the left edge of the control right to the first added item. The content area is positioned right after the stack in the remaining space.

  • Top: implies that the stack items are ordered starting from the top edge of the control down to the first added item. The content area is positioned right after the stack in the remaining space.

  • Right: implies that the stack items are ordered starting from the right edge of the control left to the first added item. The content area is positioned right after the stack in the remaining space.

Regardless the stack position, the content of the selected item is displayed at one place: where the content area resides.

It is important to consider both the size of the control and the count of the pages added to maintain a reasonable amount of space for the content area.

StackPosition

RadPageViewStackElement stackElement = this.radPageView1.ViewElement as RadPageViewStackElement;
stackElement.StackPosition = StackViewPosition.Right;

Dim stackElement As RadPageViewStackElement = TryCast(Me.radPageView1.ViewElement, RadPageViewStackElement)
stackElement.StackPosition = StackViewPosition.Right

The ViewElement property of the RadPageView control returns a reference to the main element of the currently active view in the control. So, to cast the ViewElement to any an element representing a specific view type, you should make sure that you have set the ViewMode of the RadPageView control to this view type.

See Also

In this article