Sizing One of Many Tabs

2 posts, 0 answers
  1. Christopher
    Christopher avatar
    1 posts
    Member since:
    May 2015

    Posted 22 Sep 2015 Link to this post

    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?
  2. Dimitar
    Dimitar avatar
    2951 posts

    Posted 23 Sep 2015 Link to this post

    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.

    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
Back to Top