I have XML code like this:
<rectangle />
<textbox />
<button Name="PositionChanger" />
If the button with name PositionChanger is clicked, the rectangle should move in front of the TextBox and the TextBox behind the rectangle.
Please help me to create it programically using C#.
You can use
Zindexproperty to achieve this.Inside button click event do this
now rectangle would be on top and textbox would be behind rectangle