Fore
Fore

Reputation: 6126

Adding new dynamically created controls on top of existing control

I have a stackpanel where I have a checkbox and a textblock defined in the xaml, I then add alot of dynamicly created controlls during runtime, and then add these with the stackpanel.children.add(controll) .

The problem is that I want to add all my dynamicly created controlls on top of the ones defined in the xaml. How can I do this in the best way ?

Thanks

Upvotes: 2

Views: 169

Answers (1)

Madeleine
Madeleine

Reputation: 2182

Have you tried using stackPanel.Children.Insert(0, control)

Upvotes: 2

Related Questions