Sako73
Sako73

Reputation: 10147

Make Silverlight ListBox always fill 100% of available height

I have a grid in Silverlight 3. The height of the grid row is set to "Auto". I have a ListBox in one of the grid cells. I want this listbox to fill 100% of the available space, even if it does not have enough items to do so. Currently, I have the ListBox height set to "Auto", and it will expand as items are added, and display a scroll bar when it reaches the size of the cell.

Any help is appreciated.

Upvotes: 0

Views: 2058

Answers (1)

Andrew
Andrew

Reputation: 27314

Set the vertical alignment on the Listbox, and remove the grid height being Auto, that is going to restrict the growth to what is absolutely needed.

VerticalAlignment = "Stretch"

Upvotes: 1

Related Questions