question

JanSeri-1090 avatar image
0 Votes"
JanSeri-1090 asked DaisyTian-1203 answered

How to set default WPF designer location topleft and zoom 100%?

Hello.
I have been a developer in Windows Forms for some time.
I have gone exploring WPF in .NET 5.
I have Visual Studio 16.9.6.
Now when I open any XAML designer, the application Window or UserControl in designer always zooms out to like 40% and moves somewhere so that I can see only a part of the Window/UserControl if it is big enough

How could I please set default location to topleft (coordinates x 0, y 0) in designer and set default zoom to 100% as in Windows Forms designer?

100337-visual-studio.png

Thank you!


windows-wpf
visual-studio.png (312.1 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

DaisyTian-1203 avatar image
0 Votes"
DaisyTian-1203 answered

You can't get the toplet (coordinates x 0, y 0) Point in the XAML Design, you could check it by keeping pressing UpRepeatButton or LeftRepeatButton as below picture shown:
100390-3.png
Design will keep moving until you release the mouse.

You could put the Window/UseControl/Pagn in the center of the Design by steps: Choose a Control in your XAML> choose Fit selection first , then choose Fit all in the Zoom.

Use "Fit All" for the XAML designer. When a XAML document is closed and reopened, then the last set value will persist for that session but for different sessions "Fit All" will be used by default.

By the way , the XAML Designer options page and Create a UI by using XAML Designer giving many setting infos may give you a better understanding of XAML Designer.


If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.



3.png (91.6 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.