Change stack index in wpf

I want to know how I can change the index of children in a StackPanel in C # code .

For example, I want the first child to be displayed, which is currently the second. I need animation when changing the index.

I use StackPanel because I need the Orientation property to stack all the elements and keep them grouped together. If you have an idea to use another control, I am open to this.

+3
source share
1 answer

StackPanel.Children is a UIElementCollection that easily allows you to reorder items, such as its Insert and RemoveAt methods.

+5
source

All Articles