Paulo
Paulo

Reputation: 619

WPF StackPanel controls order

Is there a way to change the order of the controls inside a StackPanel at runtime?

Many thanks,
Paulo

Upvotes: 4

Views: 4504

Answers (1)

Thomas Levesque
Thomas Levesque

Reputation: 292705

stackPanel1.Children.Remove(item);
stackPanel1.Children.Insert(newIndex, item);

Upvotes: 15

Related Questions