How do I make ListBoxItems inside ListBox to have the same height?
<ListBox
HorizontalContentAlignment="Stretch"
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
>
<ListBoxItem><TextBlock TextWrapping="Wrap">Long text that would wrap and increase height of single ListBoxItem</TextBlock></ListBoxItem>
<ListBoxItem><TextBlock TextWrapping="Wrap">Short text</TextBlock></ListBoxItem>
<ListBoxItem><TextBlock TextWrapping="Wrap">Short text</TextBlock></ListBoxItem>
</ListBox>
I want the items with “Short text” to be of equal height as the first item (which will typically have more lines due to wrapping).
I am cheating a bit here, but try this: