Change the location of an object programmatically

前端 未结 6 881
南笙
南笙 2020-12-01 12:19

I\'ve tried the following code:

 this.balancePanel.Location.X = this.optionsPanel.Location.X;

to change the location of a panel that I mad

6条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-01 12:28

    You need to pass the whole point to location

    var point = new Point(50, 100);
    this.balancePanel.Location = point;
    

提交回复
热议问题