MVVM explained again!
(Download link: http://www.4shared.com/file/VrKkQQkH/TestWPFApps.html)
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 displays the standard animals and loads other animals from plugin DLL.
For now, you may find the path of plugin DLL hard coded so you would have to change that to match your needs (as per your save location 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
.
If you find any issues running the sample, drop me a comment and I would be happy to help.
Happy coding!!
Post Comment
E3jTHz I think this is a real great blog. Great.
Ppl like you get all the brains. I just get to say thanks for he ansewr.
Gee whiz, and I tuhohgt this would be hard to find out.
Your answer was just what I nedeed. Its made my day!
Smack-dab what I was looikng forty!