This project has moved and is read-only. For the latest updates, please go here.

Dynamic inyection of UserControl in a MainWindow

Apr 23, 2010 at 10:17 PM

Dear Laurent,

I continue learning how to properly manage the MVVM pattern. I am trying to develop a MainWindow (say a Grid as main Container) which should dynamically inyect a UserControl in the Grid (both inserting and removing diferent instances of the UserControl in the Grid as the app runs).

Most of the examples about MVVM inyect a set of data by Binding using a ListView, ListBox,... with the ItemSource property. But, what about if I want to inyect a new Children directly to the Grid. How I should do the Binding?

Thank you very much in advance.