I have a ListBox in a PopupControl. Problem is that while scrolling, Popup resizes
to fit the actual widest element.
How can I avoid this resizing and adjust automatically to the widest element in the whole list?
I tried to put it in a Grid but without success.
If you want to keep virtualizing on, you can set the
Popup.Widthto a constant.Of course, to pick the right constant, you’ll have to calculate (or at least guess) how wide each
ListBoxItemwill be, and pick the max. … Usually it’s not too hard to get a rough guess, based on your content.