How best to access an Exported Property from an MEF Component at run-time?

Aug 22, 2013 at 5:07 PM
I have a WPF application that uses an extensive set of MEF components, some of which have user interface elements or that need to provide data for use in xaml controls. My problem is how best to load data at run-time and use an Export property (or Method) to provide the dynamic data for use on a user interface element such as a ComboBox or DataGrid. There are two scenarios I must satisfy:
1.Populating a control, such as a ComboBox, at the point when the MEF component is instantiated and loaded, using data from either a configuration file or from a database query.
2.Populating a control, such as a DataGrid, with data resulting from a database query filtered by user input, such as the selection of a single item from the ComboBox loaded in #1.

Any pointers would be helpful.

Thanks,

Jim