sorting elements in a stackpanel WPF

后端 未结 4 1015
春和景丽
春和景丽 2020-12-19 06:35

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

4条回答
  •  一生所求
    2020-12-19 06:55

    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.

提交回复
热议问题