This is a migrated thread and some comments may be shown as answers.

Sizing One of Many Tabs

1 Answer 115 Views
PageView
This is a migrated thread and some comments may be shown as answers.
Christopher
Top achievements
Rank 1
Christopher asked on 22 Sep 2015, 05:03 PM
I am using a RadPageView to display 5 tabs. The 5th tab is disabled and I would like to set a property such that it fills the remaining space in the header area. I know I can set the ItemFitMode to Fill, but that resizes all tabs. Is there a way to only set a single tab to fill?

1 Answer, 1 is accepted

Sort by
0
Dimitar
Telerik team
answered on 23 Sep 2015, 01:17 PM
Hello Christopher, 

Thank you for writing.

This can be achieved by changing the ItemFitMode to None and adjusting the size of the last tab manually. This can be done in the SizeChanged event for example:
void radPageView1_SizeChanged(object sender, EventArgs e)
{
    RadPageViewStripElement stripElement = this.radPageView1.ViewElement as RadPageViewStripElement;
 
    float width = stripElement.ItemContainer.ItemLayout.ControlBoundingRectangle.Width;
    for (int i = 0; i < radPageView1.Pages.Count - 1; i++)
    {
        width -= radPageView1.Pages[i].Item.ForcedLayoutSize.Width;
        
    }
   
    radPageViewPage5.Item.MinSize = new Size(Convert.ToInt32(width), Convert.ToInt32(radPageViewPage5.ItemSize.Height));
}

I hope this helps. Should you have any other questions do not hesitate to ask.

Regards,
Dimitar
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
PageView
Asked by
Christopher
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
Share this question
or