开发者

How do you arrange items in a table layout in SilverLight?

开发者 https://www.devze.com 2023-01-21 12:11 出处:网络
I am stumped. I\'ve got a collection of items that I\'m bi开发者_C百科nding to an ItemsControl and would like them arranged as a grid rather than strictly vertically or horizontally. All of the exampl

I am stumped. I've got a collection of items that I'm bi开发者_C百科nding to an ItemsControl and would like them arranged as a grid rather than strictly vertically or horizontally. All of the examples I've used in WPF are not supported in Silverlight like using the ItemContainerStyle or SharedSizeGroup and the Silverlight toolkit WrapPanel does not appear to support data binding.

Is there something I am missing or does it need to be built from scratch in Silverlight?


You need to combine ItemsControl with WrapPanel. Specify the WrapPanel in a ItemsPanelTemplate on the ItemsControl.ItemsPanel property.

0

精彩评论

暂无评论...
验证码 换一张
取 消