开发者

Display ListBox by 2 branches in WPF

I have a listbox to display a datasource. The datasource has only one field ("ClassName"). I want the listbox is displayed by 2 branches.

Example:

Class开发者_JAVA百科Name:

ClassName1

ClassName2

ClassName3

ClassName4

Display: =>

ClassName1 ClassName2

ClassName3 ClassName4

Just tell me how to do that please! thanks!


You'd have to change the Listbox's ItemsPanel to something that supports the display that you want. The WrapPanel would probably work well, but you'd have to use a custom listboxitem style to ensure the width is the same for all items. You could also use a Grid with 2 columns. You'd have to specify the Column each item is in however, which might be tricky.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜