Scale window programatically in winUI3 #8687
Replies: 2 comments 2 replies
-
I'm not sure what you're trying to do but you can get the scaling with XamlRoot.RasterizationScale or GetDpiForWindow and you can get notified with XamlRoot.Changed |
Beta Was this translation helpful? Give feedback.
-
A ScrollViewer control may be what you're after. Wrap any content that you want to zoom in the ScrollViewer, then to set the zoom factor call ScrollViewer.ChangeView() from your code behind. There is an example in the WinUI3 Gallery app. (edit: using ZoomToFactor() isn't recommended) |
Beta Was this translation helpful? Give feedback.
-
Hi,
Is there a way to scale the window programatically in winUI3 app, instead of changing scale in system setting?
And how to prevent scale the window automatically if dpt changed in system setting?
Beta Was this translation helpful? Give feedback.
All reactions