I have WPF window with ListBox that contains items of TextBlock. Each TextBlock have different font size and text length. When I fill my collection it's include scrollbar for viewing the result.
What is the best way to fit the items size(something like zoom) to fit the ListBox that it will show all the items in the current window without scrolling?
(When ScrollViewer.HorizontalScrollBarVisibility="Disabled" and also ScrollViewer.VerticalScrollBarVisibility="Disabled")
Is there any WPF way or some kind of algorithm to do so?