Mac Catalyst does not support resizing or repositioning windows programmatically
See original GitHub issueDescription
Setting a windows width/height or setting window X/Y does not actually update the window’s frame.
This appears to be a limitation in the Mac Catalyst approved APIs.
See also #4942
Steps to Reproduce
- Set
Window.Width = 400
- Observe nothing happens
Version with bug
Unknown/Other (please specify)
Last version that worked well
Unknown/Other
Affected platforms
macOS
Affected platform versions
Mac Catalyst
Did you find any workaround?
There may be a potential workaround by setting the Min/Max coordinates and then reverting it. Not perfect, but seems to work OK.
Window.MinimumWidth = 700;
Window.MaximumWidth = 700;
Window.MinimumHeight = 500;
Window.MaximumHeight = 500;
// dispatcher is used to give the window time to actually resize
Dispatcher.Dispatch(() =>
{
Window.MinimumWidth = 0;
Window.MaximumWidth = double.PositiveInfinity;
Window.MinimumHeight = 0;
Window.MaximumHeight = double.PositiveInfinity;
});
Relevant log output
No response
Issue Analytics
- State:
- Created a year ago
- Comments:12 (3 by maintainers)
Top Results From Across the Web
Mac Catalyst - control window resize
On Mac, I want to control window resizing, in order to allow only some sizes and aspects. It goes beyond simple minimal height...
Read more >How do you set an OSX app's window size and detect ...
In a non document based App, I had issues with window resize and reposition: I wanted the window to be displayed with size...
Read more >NET MAUI windows
Mac Catalyst doesn't support resizing or repositioning windows programmatically by setting the X , Y , Width , and Height properties.
Read more >Windows Sizing & Positioning in .NET MAUI
In this article you will learn how to do it very quickly! ... ➖Mac Catalyst does not support resizing or repositioning windows using...
Read more >Mac OS X: How to resize a window by dragging from the ...
I am back to using Mac OS X but it is driving me nuts how you can only change the size of the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I’m using .NET 7 and this is not working for me. I’ve placed it in the app.xaml.cs file with no luck. Has anyone had success with this?
Verified this issue with Visual Studio for Mac 17.6.2 (build 414). Can repro on macOS platform.