Satisfy Imports on "new'd" objects

Mar 11, 2009 at 7:56 PM
Edited Mar 11, 2009 at 7:58 PM
What I have is a few ViewModels that are used by my WPF UI to display some data that is coming in from the internet:

I have a MainViewModel that is the view for the main window, it contains a ItemsListViewModel that a certain ListBox in my UI binds to, and that contains an ObservableCollection<ItemsViewModel> that the ListBox.ListItems is bound to.  In response to certain events from my data stream the ItemsListViewModel will create and add new ItemsViewModel objects to the collection.

The problem I have is that the ItemsViewModel needs to Import a couple items.

I figure I could make a singleton accessor to the current application's CompositionContainer and use SatisfyImports, but is this the right way?