Thanks all
My requirements are as follows:
In a form, there is a control that can dynamically set its position, similar to absolute positioning in HTML
First of all, what I don’t quite understand is where this control should be placed. The AI’s answer to me is like this, and I always feel a bit strange
<code><Canvas>
<Button Content="Move Me" Canvas. Left="0" Canvas.Top="0"/>
</Canvas>
</code>
<code><Canvas>
<Button Content="Move Me" Canvas. Left="0" Canvas.Top="0"/>
</Canvas>
</code>
<Canvas>
<Button Content="Move Me" Canvas. Left="0" Canvas.Top="0"/>
</Canvas>
Secondly, I want to set the position of the control through code, but I found that the position related properties are read-only. I know it’s possible to do it through binding, but isn’t it possible to control it directly through code without binding?