-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Resize fails on Windows if done during minimization #3291
Comments
it seems it happen if an element is expanded while the windows is minimized. It seems the auto resize is broken then. (or in general, any resize that happen during minimized state) |
The problem happens even if The root of the problem is that when the window is restored, Avalonia seems to set the |
I think the problem here is that there's no way of telling whether a resize was caused by an auto-resize, a user resize or a minimize/restore. A user resize always results in auto-resizing being turned off, but we need a way to tell where the resize event came from. I'm not sure there is any of way of knowing that? |
I tried to solve this here #2383 but gave up... The description only mentions X11, but this was also an attempt to fix auto-resizing on other platforms too. Unfortunately I think my solution was flawed. Probably need to revisit this soon. @jmacato I don't think this can be fixed for 0.9, it's not a simple problem. |
@grokys got it, i included it to 0.9 for posterity; removing milestones now |
@NicolasDorier when you say that "it happens even if SizeToContent="Manual"" - what happens? The problem is "Not sizing to content anymore", right? If Sorry, I'm probably thick here ;) |
@grokys so here it what happen precisely, whichever the value of
What I noticed was that after step My workaround is to have a DispatcherTimer which look my viewmodel every second and resize to a fixed hardcoded size. Not pretty... but good enough for me. :p |
What is the content of your StackPanel? Does it have a fixed size? SizeToContent only works if your content has a fixed size (DesiredSize != infinity) |
@Gillibald here is my windows: https://github.com/btcpayserver/BTCPayServer.Vault/blob/master/BTCPayServer.Vault/MainWindow.xaml The problematic stackpanel is
|
0.9.0-preview7
The text was updated successfully, but these errors were encountered: