I have a stackpanel with some usercontrols that are added or removed during runtime. These elements have an index that i assign to them when i new them, I need to keep these
if you give each element specific name (which is index). when you remove this control, you can just rename the result controls.
after that all your control will be sorted.