void ReorderItemClick()
{
if (TabItems.Count > 0)
{
TabData item = TabItems[TabItems.Count - 1];
TabItems.Insert(1, item);
TabItems.RemoveAt(TabItems.Count - 1);
} } |
Your not really reordering the Tabs though are you - your sample is actually just relabelling the existing tab header and content based on the values in your class. You are not picking up the last tab and putting it in second spot. Is there a way to physically reorder the tabs?
For example - if i had a series of orders on a grid (say 3) - each on its own tab and labelled accordingly in the header
Tab 1 - Order 2, Tab 2 - Order 4, Tab3 - Order 8.
I then select to Add Order 6.
I want Order 6 to appear in numerical order - so moved tab and all to position 3 ,and Order 8 moved to position 4.
Right now no matter what i do - Order 6 will end up as the last Tab.
Is there a way to do this properly and not as per your example - just relabelling and not really moving it.
Regards
Steve
i want to be able to order them programmatically? is this not possible?