Sort tabs alphabetically

2 posts, 0 answers
  1. RoxanaC
    RoxanaC avatar
    71 posts
    Member since:
    Dec 2009

    Posted 27 Apr 2010 Link to this post

    I have a tab control generated at runtime, having as ItemsSource an ObservableCollection of objects ( that implements IComparable interface; the tab names are the names of the objects and CompareTo method returns the String.compareTo value of those names ). Is there the possibility to show the tabs arranged in the alphabetical order?

    Thank you!
    Roxana C
  2. Kiril Stanoev
    Kiril Stanoev avatar
    1508 posts

    Posted 30 Apr 2010 Link to this post

    Hello Roxana,

    A better approach in my opinion is to use CollectionViewSource. Bellow are few of examples that show  how to sort, filter and group items in a collection:

    How to: Filter Data in a View

    How to: Sort Data in a View

    How to: Sort and Group Data Using a View in XAML

    I am also attaching a sample project that demonstrates how to sort an items collection that is bound to a TabControl. Have a look at it and let me know if you have any further questions.

    Kiril Stanoev
    the Telerik team

    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 Public Issue Tracking system and vote to affect the priority of the items.
  3. DevCraft R3 2016 release webinar banner
Back to Top