开发者

Displaying ObservableCollection in a side-by-side format

In a WPF application, I am attempting to display the elements from an ObservableCollection in a side-by-side fashion. For example, if the collection was of letters, the basic format would be:

Letters
A    D    G    J
B    E    H    K
C    F    I    L  etc..

I am considering making each a separate ListView and then breaking each ViewModel down 开发者_StackOverflow中文版into smaller pieces, but creating separate collections (when logically it should only be one) seems like it should be a last resort. Let me know if anyone has any ideas. Thanks.


You should check out <WrapPanel> here is a decent article on the WrapPanel. A WrapPanel is used to arrange child controls to arrange vertically or horizontally, and will wrap the contents accordingly, based on the size of the items and the size of it's containing parent.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜