smatter
smatter

Reputation: 29248

Silverlight: Determine number of items based on ListBox width

There is a horizontal ListBox (of Images) in my application. At application startup, I need to add some Images to the ListBox so that it fills the window width (no scroll is allowed). These images serve as position marker thumbnails of a huge set of Images. The problem occurs when I use different monitors. In low resolution monitors, the thumbnails overflow the window width (scroll bars appear) and in high resolution monitors empty spaces appear at the end of the ListBox. What is the best way to solve this.

I can add more thumnails if the ListBox width can be determined.
Since teh ListBox width is set to "Auto", I am not sure how get the actual rendered size.

Upvotes: 0

Views: 176

Answers (1)

Chen Kinnrot
Chen Kinnrot

Reputation: 21015

It exists in wpf, not sure about silverlight, try the ActualWidth property.

Upvotes: 1

Related Questions