Edit this page

Fitting Items

RadPageView, when its ViewMode property is set to Strip, it allows you to change the behavior of its tabs. Below you can see how.

The main property that controls the behavior of the tabs is the ItemMode property of the RadPageViewStripElement.

  • None - Each item uses its desired size.
RadPageViewStripElement stripElement = this.pageView.ViewElement as RadPageViewStripElement;
stripElement.ItemFitMode = StripViewItemFitMode.None;

Dim stripElement As RadPageViewStripElement = TryCast(Me.pageView.ViewElement, RadPageViewStripElement)
stripElement.ItemFitMode = StripViewItemFitMode.None

pageview-strip-view-fitting-items 001

  • Shrink - Items are shrunk if their size exceeds the available one.
RadPageViewStripElement stripElement1 = this.pageView.ViewElement as RadPageViewStripElement;
stripElement1.ItemFitMode = StripViewItemFitMode.Shrink;

Dim stripElement1 As RadPageViewStripElement = TryCast(Me.pageView.ViewElement, RadPageViewStripElement)
stripElement1.ItemFitMode = StripViewItemFitMode.Shrink

pageview-strip-view-fitting-items 002

  • Fill - Items are expanded if their size is less than the available one.
RadPageViewStripElement stripElement2 = this.pageView.ViewElement as RadPageViewStripElement;
stripElement2.ItemFitMode = StripViewItemFitMode.Fill;

Dim stripElement2 As RadPageViewStripElement = TryCast(Me.pageView.ViewElement, RadPageViewStripElement)
stripElement2.ItemFitMode = StripViewItemFitMode.Fill

pageview-strip-view-fitting-items 003

  • ShrinkAndFill - Items are either shrinked or expanded when needed.
RadPageViewStripElement stripElement3 = this.pageView.ViewElement as RadPageViewStripElement;
stripElement3.ItemFitMode = StripViewItemFitMode.ShrinkAndFill;

Dim stripElement3 As RadPageViewStripElement = TryCast(Me.pageView.ViewElement, RadPageViewStripElement)
stripElement3.ItemFitMode = StripViewItemFitMode.ShrinkAndFill

pageview-strip-view-fitting-items 004

  • FillHeight - Items are stretched in the available height of their parent container.
RadPageViewStripElement stripElement4 = this.pageView.ViewElement as RadPageViewStripElement;
stripElement4.ItemContainer.MinSize = new System.Drawing.Size(0, 50);
stripElement4.ItemFitMode = StripViewItemFitMode.FillHeight;

Dim stripElement4 As RadPageViewStripElement = TryCast(Me.pageView.ViewElement, RadPageViewStripElement)
stripElement4.ItemContainer.MinSize = New System.Drawing.Size(0, 50)

pageview-strip-view-fitting-items 005

  • MultiLine - Items are arranged in multiLine layout. You can also set the MultiLineItemFitMode property to None or Reflow. If you set the MultiLineItemFitMode property to None you will manually need to set the Row property of the items:
this.pageView.ViewMode = PageViewMode.Strip;
RadPageViewStripElement stripElement = this.pageView.ViewElement as RadPageViewStripElement;
stripElement.ItemFitMode = StripViewItemFitMode.MultiLine;
stripElement.MultiLineItemFitMode = MultiLineItemFitMode.None;
this.radPageViewPage4.Item.Row = 2;
this.radPageViewPage5.Item.Row = 3;

Me.pageView.ViewMode = PageViewMode.Strip
Dim stripElement As RadPageViewStripElement = TryCast(Me.pageView.ViewElement, RadPageViewStripElement)
stripElement.ItemFitMode = StripViewItemFitMode.MultiLine
stripElement.MultiLineItemFitMode = MultiLineItemFitMode.None
Me.RadPageViewPage4.Item.Row = 2
Me.RadPageViewPage5.Item.Row = 3

pageview-strip-view-fitting-items 006

If the MultiLineItemFitMode property is set to Reflow, the layout will automatically calculate these settings:

this.pageView.ViewMode = PageViewMode.Strip;
RadPageViewStripElement stripElement1 = this.pageView.ViewElement as RadPageViewStripElement;
stripElement1.ItemFitMode = StripViewItemFitMode.MultiLine;
stripElement1.MultiLineItemFitMode = MultiLineItemFitMode.Reflow;

Me.pageView.ViewMode = PageViewMode.Strip
Dim stripElement1 As RadPageViewStripElement = TryCast(Me.pageView.ViewElement, RadPageViewStripElement)
stripElement1.ItemFitMode = StripViewItemFitMode.MultiLine
stripElement1.MultiLineItemFitMode = MultiLineItemFitMode.Reflow

pageview-strip-view-fitting-items 007

See Also