Re-order tabs programmatically

3 posts, 0 answers
  1. Petter
    Petter avatar
    10 posts
    Member since:
    Jan 2014

    Posted 20 Feb 2014 Link to this post

    Hi,

    I need to re-order my tabs programmatically. Is this possible and if so how? If not, is there a workaround?

    I have searched the telerik forums and carefully read the documentation, but haven't found it described anywhere.

    Thanks!
  2. Kiril Vandov
    Admin
    Kiril Vandov avatar
    324 posts

    Posted 25 Feb 2014 Link to this post

    Hello Petter,

    In order to reorder the Items of the RadTabControl you need to use MVVM approach and populate the items through the ItemsSource property. Once you have created the collection holding the business objects representing the TabItems you can reorder them by simply removing the items from the collection and inserting it in a different position in the same collection.

    I have attached a sample project demonstrating the above approach for your convenience.

    I hope this information helps.

    Kind regards,
    Kiril Vandov
    Telerik
  3. UI for WPF is Visual Studio 2017 Ready
  4. Petter
    Petter avatar
    10 posts
    Member since:
    Jan 2014

    Posted 25 Feb 2014 in reply to Kiril Vandov Link to this post

    Hi Kiril,

    Thanks for your response and the sample.

    I finally solved this with another workaround: by creating two overlapping tab controls (one with 1 tab and the second one with 2) and used the Visibility property on the tab control.

    Kind regards
Back to Top