Version

Bind a DataPresenter Control to a Collection

You can data bind the DataPresenter controls to several different data sources, including a collection that implements the IEnumerable interface. You can use an ObjectDataProvider to expose your collection to the presentation layer of your application. If you have not created an ObjectDataProvider yet, please read and follow the steps in Creating an ObjectDataProvider before proceeding with the example code.

The following example code demonstrates how to bind a DataPresenter control to a collection.

bind xamdatapresenter to a collection

In XAML:

<igDP:XamDataPresenter
    Name="xamDataPresenter1"
    DataSource="{Binding Source={StaticResource CarData}}">
</igDP:XamDataPresenter>