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
Describe the bug
I'm always fighting the Auto SizeToContent system, and need to apply dirty hacks for the content to really adjust and be visible.
I do tool windows with SizeToContent="WidthAndHeight" and then i limit the MaxHeight to be the screen resolution less a margin, so the windows can constrain to the screen and never go out. So far so good, then i just put a ScrollViewer for content and expect it to work, the problem is it will never work as expected after Height hit MaxHeight and scroll is required.
Note the cut content and scroll viewport not properly calculated:
I think i'm not doing something that outrageous/complex on this window, but everytime i use SizeToContent and try to play with Auto and Fills things never go right when MaxWidth/Height is set. I think this need a serious review as this bug is here from long term...
However if you able to resize the window, even 1px less will auto fix the viewport and get the all content to show within the scrollviewer. But it should work without allow CanResin and user have to colapse and expand the window to content to adapt.
Not only this but there are other elements that break things, for example TabControl, when switch tabs on a system that is not Windows, the window will not auto resize. #4896
Also there are more problems, if you have a control.IsVisible = false when window spawn, setting it to true after will not make scroll to adapt. But this may be related with my main problem.
Describe the bug
I'm always fighting the Auto SizeToContent system, and need to apply dirty hacks for the content to really adjust and be visible.
I do tool windows with
SizeToContent="WidthAndHeight"
and then i limit theMaxHeight
to be the screen resolution less a margin, so the windows can constrain to the screen and never go out. So far so good, then i just put a ScrollViewer for content and expect it to work, the problem is it will never work as expected after Height hit MaxHeight and scroll is required.Note the cut content and scroll viewport not properly calculated:
I think i'm not doing something that outrageous/complex on this window, but everytime i use SizeToContent and try to play with Auto and Fills things never go right when MaxWidth/Height is set. I think this need a serious review as this bug is here from long term...
However if you able to resize the window, even 1px less will auto fix the viewport and get the all content to show within the scrollviewer. But it should work without allow CanResin and user have to colapse and expand the window to content to adapt.
Not only this but there are other elements that break things, for example TabControl, when switch tabs on a system that is not Windows, the window will not auto resize. #4896
Also there are more problems, if you have a control.IsVisible = false when window spawn, setting it to true after will not make scroll to adapt. But this may be related with my main problem.
To Reproduce
Expected behavior
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: