SizeToContent not sizing correctly
See original GitHub issueI have made a message box for one of my programs but it is not sizing as it should
I have got SizeToContent="WidthAndHeight"
in the xaml file
Happens on Windows and Linux (Can’t test macOS because I don’t have a mac/macOS VM)
repo with code: https://github.com/AzyIsCool/HATE
Issue Analytics
- State:
- Created 4 years ago
- Comments:13 (6 by maintainers)
Top Results From Across the Web
WPF SizeToContent not working when WindowStyle="None"
When WindowStyle="None" the width is too wide, it's about 200. However when I set WindowStyle="ToolWindow" both width and height are correct.
Read more >Window.SizeToContent Property (System.Windows)
Gets or sets a value that indicates whether a window will automatically size itself to fit the size of its content.
Read more >Sizing Controls when Main Window resizes
I am struggling with a WPF project where I am trying to keep a grid maximized within a ThemedWindow both when the window...
Read more >Widget component "Size Box" does not resize properly
I have made a simple UI widget consisting of not much more then a vertical box filled with two text components and a...
Read more >WPF Re-Size your Main Window from your UserControls
Size-to-content just doesn't give you the window sizes you want for each usercontrol.
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 FreeTop 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
Top GitHub Comments
Will have a look shortly
We know that the Grid has issues and plan to adopt the Wpf implementation when the source code is made available. I guess the StackPanel tells the TextBlock there is infinite space so you have to use a DockPanel instead.