Is there a way to only allow one way resizibility? (Desktop) #2101
Answered
by
castorix
EmrecanKaracayir
asked this question in
General
-
AppWindow has "IsResizible" method but it disables resizing all together. MainWindow has "SizeChanged" event but it reacts AFTER the resizing happens. So I can not interfere with how the resizing applies. Is there a way to only allow vertical/horizontal resizing of the MainWindow? |
Beta Was this translation helpful? Give feedback.
Answered by
castorix
Feb 13, 2022
Replies: 1 comment 2 replies
-
You can subclass the main window with SetWindowSubclass and handle WM_SIZING or WM_GETMINMAXINFO |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
BenJKuhn
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can subclass the main window with SetWindowSubclass and handle WM_SIZING or WM_GETMINMAXINFO
(main window handle = WinRT.Interop.WindowNative.GetWindowHandle(this))