Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

List of user controls in similar to WPF ItemsControl

I have two lists of data. To represent an "item" I have a custom UserControl (as the item has multiple fields and I want to lay it out correctly on the UserControl).

I would like the list to be populated on some type of ListBox by these user controls instead of strings.

I have seen people do this in WPF using ItemsControl or some repeater. Do you know if there is any way to do this in WinForms?

I want to ensure that I get the proper vertical scrolling if the number of user controls is bigger than the container.

like image 538
leora Avatar asked Apr 20 '09 03:04

leora


2 Answers

FlowLayoutPanel seems to do the job

like image 167
leora Avatar answered Oct 21 '22 22:10

leora


In .NET 3.5 SP1 the DataRepeater component was added to the framework as part of WinForms (rather than as part of the VB PowerPack downloadable add-on). If you're running on that version of the framework then it might do what you need.

like image 40
Matt Hamilton Avatar answered Oct 21 '22 21:10

Matt Hamilton