KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
There must be an elegant solution to this problem, but I can't find anything online. I have a grid that has one column and row with width/height *, containing a ListBox. I have my Window SizeToContents set to WidthAndHeight to allow the window to resize to the proper size for each set of UI widgets/fonts. When I add items to the ListBox, it resizes, causing the window to grow. I want the ListBox to resize if I change the size of the window, but if I add content that is longer than the width of the ListBox, I want the scrollbar to appear and not for it to grow, causing the Window to grow. If I set explicit sizes for the Window and set SizeToContent to Manual (the default), it works as I intend. Is there any way to size the window to the contents at startup and continue to have the ListBox grow with the window size, but not with its content?
Tags (comma-separated)
Save Edits
Cancel