You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm currently calling the following method at the end of some of my window constructors (just the ones I don't want resizable) to work-around the bug of Avalonia windows being always resizable in Linux:
public static void PreventResizing(Window window)
{
// prevent resizing of window - Avalonia Linux target allows resizing even if "CanResize" is false
if (Environment.OSVersion.Platform == PlatformID.Unix)
{
window.MaxHeight = window.Height;
window.MaxWidth = window.Width;
window.MinHeight = window.Height;
window.MinWidth = window.Width;
}
else
window.CanResize = false;
}
Why doesn't the Avalonia property "CanResize" take care of this? Why doesn't "CanResize" work on Linux?
Describe the bug
Some windows shouldn't be resized - this works fine on Windows, but has no effect on Linux (testing on Ubuntu).
To Reproduce
Create a window for cross-platforms application with CanResize="False".
You'll see that the window can indeed be resized on Linux.
Expected behavior
No response
Avalonia version
11.2.0
OS
Linux
Additional context
No response
The text was updated successfully, but these errors were encountered: