The information you have supplied is simply too broad, so I'll try to cover the basics only.
Yes, WPF does support binding controls to collections. You can bind to any collection that implements IEnumerable
. This means you can bind to most collection types available in .NET including List<T>
.
If you want an active binding, i.e. the control should update itself as you add or remove items from the underlying collection, your collection must implement change notification. You can either implement INotifyPropertyChanged
or simply use ObservableCollection<T>
for this purpose.
At the front-end, you can use ListBox
if you want to be able to select items, or ItemsControl
if you don't.
You must create DataTemplate
s against your underlying data types and assign them to ItemsControl.ItemTemplate
or ListBox.ItemTemplate
for your items to take appropriate look within the control.
Do note that your data type must implement change notification at its own level if you want to update item properties on the fly and want ItemsControl or ListBox to update its items accordingly. You can either implement INotifyPropertyChanged
or derive your class from ObservableObject
(in case you're using MVVM Light) for this purpose.
To change the way items are arranged within ItemsControl
, you can set ItemsControl.ItemsPanel
to one of the panels available in WPF, such as StackPanel
, WrapPanel
or Canvas
etc.
Generally accepted practice is to divide your project into (at least) two layers (or projects in terms of Visual Studio); the underlying ViewModel that handles business logic and abstract storage of data and operations. This ViewModel does not know and is therefore independent of the UI. It is here that you implement change notification on your classes and collections and expose public properties that you want your UI controls to bind to. Then on top of the ViewModel layer, you create a View layer that knows about the ViewModel layer (you add reference of the ViewModel project in the View project) and then set DataContext
of your controls to your ViewModel objects and bind their properties to the exposed properties of your ViewModel objects.
There is enormous amount of details involved in binding that you will discover and need to understand as you learn WPF, but this as I said is the very basic line of action that you should take.