by Laurent Bugnion via Silverlight on 6/16/2009 10:17:42 PM
To make development of WPF and Silverlight applications according to the Model-View-ViewModel pattern easier, I have put together a small toolkit which should speed up the creation of such applications by automating certain tasks.
The toolkit must be installed manually for now. My next task is to prepare an installer, which should allow installing everything automatically, and also checking for upgrades, upgrading automatically and uninstalling the toolkit. For now however, a little manual work must be done.
For more details about the MVVM light toolkit, check this initial blog post.
Also, a web page will be extended over the next few days, and everything will be announced in this blog, so stay tuned.
To install the toolkit manually, please follow the steps.
Check this post.
The procedure in Silverlight is extremely similar to the one in WPF. The goal is to have a process which is as similar as possible, as well as the source code.
If you need a new ViewModel in the MVVM application, follow the steps:
Of course you also need to initialize your ViewModel by entering code in the constructor.
Of course a ViewModel is tightly associated to a View. After adding a ViewModel, you probably want to add a new View too. In the Silverlight version of the application, a new View is a new UserControl. If you need a more finely granulated user interface, you can link the ViewModel to other UI elements. This scenario is not supported by the toolkit, however, and requires some manual work.
Note also that the toolkit does not support navigation out of the box. This is because there are many ways to do navigation in Silverlight. The project can easily be modified to integrate your preferate way to do navigation.
To add a new UserControl-based view in the application, follow the steps:
Finally, you probably want to add bindable properties in your ViewModel. Follow the steps:
Original Post: MVVM light toolkit (Silverlight edition) posted
The content of the postings is owned by the respective author. Silverlight Feeds is not responsible for the contents of the postings. This site is automatically generated and cannot be reviewed for abusive content. If you find abusive content on Silverlight Feeds, please contact us. Designated trademarks and brands are the property of their respective owners. All rights reserved.