How To : ListBox Control

Posted by Naimishforu under WPF category on | Points: 40 | Views : 2674
How to show data in ListBox control using two-column format. The ListBox control flows from left to right and from top to bottom.

Use ListBox Item Template and specify Uniform Grid equals to 2.

<ListBox Name="ListBox1">
<ListBox.ItemsPanel> <ItemsPanelTemplate> <UniformGrid Columns="2"/>
</ItemsPanelTemplate> </ListBox.ItemsPanel></ListBox>

Comments or Responses

Login to post response