CRK
CRK

Reputation: 607

WPF tabControl re-order tabs

I want to reorder WPF tab control in using C#

Upvotes: 2

Views: 2461

Answers (1)

Jackson Pope
Jackson Pope

Reputation: 14660

The TabControl has an ItemsCollection that it inherits from ItemsControl. You can remove items from that list and re-add them using Add() and Remove() or RemoveAt():

Object tabToMove = Items[3];
Items.RemoveAt(3);
Items.Insert(1, tabToMove);

Upvotes: 6

Related Questions