I don't think you can do exactly what you are trying to achieve. But your requirements seem strange to me : you can perfectly visually swap two controls in a form without any constraint on their respective index in their parent's ControlCollection
.
The closest you could get would be to store your controls in a Panel
:
- You'd have
PanelA
andPanelB
. - At first,
PanelA
would containAlice
andPanelB
would containBob
. - When swapping, store
Bob
intoPanelA
andAlice
intoPanelB
.
Alice
and Bob
would not appear directly in the ControlCollection
though, only the Panel
s would.