问题
In Visual Studio, the forms are stuck to the top left corner of the IDE working area like they are pinned there. How do you unpin them?
回答1:
They're not "pinned", they're actually being drawn there in that position by the designer.
This is a simulated drawing only. The form does not actually function in the designer the same way that it does at run-time. You cannot move forms around or interact with their non-client area in any way (e.g., you also can't click the minimize or close boxes).
This is simply not supported. And I can't imagine a good reason why it should be.
回答2:
Cody Gray - your follow-up is the correct answer. Here's the procedure:
- Undock the Designer view tab at the top (make it it's own window).
- Resize the Designer view window to the proportions that you prefer.
- Move the Form to the position in the Designer that you prefer.
- Redock.
Also, to answer Mason's question: because Visual Studio has a tendency to put the original Window halfway off the viewing area. Then, the developer is forced to scroll up/down/all over, pain in the a..!
Not sure why it doesn't center itself to begin with, but Cody's solution is a good workaround.
Cheers! Jerry in Charlotte
来源:https://stackoverflow.com/questions/15802473/how-do-you-unpin-and-move-the-form-in-the-visual-studio-designer