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

Sort tabs alphabetically

1 Answer 152 Views
TabControl
This is a migrated thread and some comments may be shown as answers.
RoxanaC
Top achievements
Rank 1
RoxanaC asked on 27 Apr 2010, 08:37 AM
Hello!
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

1 Answer, 1 is accepted

Sort by
0
Kiril Stanoev
Telerik team
answered on 30 Apr 2010, 09:48 AM
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.

Greetings,
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.
Tags
TabControl
Asked by
RoxanaC
Top achievements
Rank 1
Answers by
Kiril Stanoev
Telerik team
Share this question
or