MVVM explained again!

I just started to work on WPF after quite a long break (8 month). And I wanted to recap my WPF knowledge and use MVVM in a plugin like scenario.

Download from here...
(Download link:

I have prepared a very basic plugin like app which makes use of MVVM with Commands, DataBindings and DataTemplates.

The AnimalsLibrary is a Plugin base which is referenced by every plugin.

The OuterUserAnimals is a Plugin which creates a new animal type. It also defines its own way of displaying its animals using a data template.

The TestListBoxTemplate is our main app which displayes the standard animals and loads other animals from plugin dll.

For now you may finc the path od plugin dll hard coded so you would have to change that to match your needs (as per you save loaction of the zip).

This example shows how to create a ViewModel which can be bound to a view. How to create and load DataTemplates from a referenced Dll (animals lib). And how to create & load DataTemplates in a plugin lib which is usually loaded using reflection.

This example also shows how to use ICommand in a DataTemplate.

Any issues running the sample drop me a comment and i would be happy to help.

Happy coding!!


Popular posts from this blog

आप से मिल के

अदला बदली

इश्क़ मेँ कुछ ऐसा हो जाता है