I am aware that Window
has a SizeToContent
property that when set to SizeToContent.WidthAndHeight
keeps the window as small as it can to fit it’s contents.
What I want to implement is a way to set a window’s minimum size to this size. I investigated the code that uses the SizeToContent
property to measure the window: Window.cs#L994 and saw that, to get this size I would need access to PlatformImpl.MaxAutoSizeHint
, but that property is internal.
Is there another way to get this value? Or more generally, could I obtain the minimum size a UserControl
would need to fit its contents?