开发者

Moving graphical components with the mouse in Visual Studio

开发者 https://www.devze.com 2022-12-24 17:54 出处:网络
I have just installed Visual Studio.NET. In the Design area I have added some graphical components (button, textbox) but I can\'t move these within the specified area, as their position remains unchan

I have just installed Visual Studio.NET. In the Design area I have added some graphical components (button, textbox) but I can't move these within the specified area, as their position remains unchanged. I would like to move these graphical components with the mouse cursor, I know it's p开发者_运维技巧ossible, does anyone know how?


It sounds like you have created a WPF project. WPF works a lot differently than WinForms which you are probably used to. So try creating a WinForms project, or get yourself acquainted with WPF.


I came here looking for the answer to the same question. OP is probably no longer interested and it was quite easy to Google it up, but in case somebody comes here as I did, here is the solution:

In WPF, place a Grid component on your form (or in your container, like Tab), and reset it (set both Height and Width to auto). Then you can place other controls and position them with your mouse normally.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号