-
Notifications
You must be signed in to change notification settings - Fork 711
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Window Maximization Behavior Consistency Issues #9427
Comments
Is anyone working on fixing this issue or at least provide a workaround?
|
An usual workaround in Win32 is to intercept WM_SYSCOMMAND and SC_MAXIMIZE |
Thanks, I had seen that elsewhere but preferred to stay away from hooking into WndProc and so on. This bug affects such a basic functionality that I simply don't understand why it hasn't been given the highest priority. This is the kind of issue that fuels the "WinUI is dead" kind of comment. |
This is the workaround that work for me. Edit 1 Already cleared out the Took me almost 2 days to figured this out. Now double clicking the title bar no longer maximize the window. Idk why the basic things like this haven't implemented yet in WinUI3. Edit 2
For disabling Just Follow the step
You can call the
Example
Tested with x86 and x64 and Window App SDK 1.6.240923002 Tips Notice how I can easily set the window size with just Pardon for my bad English. it is not my native but I will try my best to spoon-fed everyone with the little effort and knowledge that I have. |
Describe the bug
Objective:
Lock the window size and prohibit the user from modifying the window size and maximizing it.
This can be achieved with the following code.
var presenter = (OverlappedPresenter)AppWindow.Presenter;
presenter.IsResizable = false;
presenter.IsMaximizable = false;
But double clicking on the title bar still maximizes it. While I suspect that customizing the title bar would solve this issue, I think that when the developer sets (presenter.IsMaximizable = false;), the ability to maximize the title bar on double click should be disabled.
I don't know if there is a way to disable "double-click titlebar maximization" other than "custom titlebar".
Steps to reproduce the bug
Expected behavior
No response
Screenshots
No response
NuGet package version
WinUI 3 - Windows App SDK 1.5.0: 1.5.240227000
Windows version
Windows 11 (22H2): Build 22621
Additional context
No response
The text was updated successfully, but these errors were encountered: