Yesterday I blogged about the Prism-v2 Reference Implementation migrated to Silverlight 3 with Out of Browser Capabilities. You can read that post here.
Today I wanted to compare the validation provided by the RI to the one that comes with Silverlight 3. I came up to the conclusion that the approach provided by p&p is pretty similar to one of the approaches Silverlight 3 allows related to validation. You can watch this video about Silverlight 3 Validation which explains some of the possibilities you have.
After that I decided to replace the RI's validation using Silverlight 3 and was able to do it with some minor changes (you can check the OrdersDetailsView and OrdersDetailsPresentationModel which have most of the changes).
A different approach to reduce code behind through attached behaviors in the views can be used to keep a list of the validation errors. This blog post provides more information about it.
After all the changes were made, the following is the outcome with invalid data input:
Source Code
Disclaimer
This code is provided "AS IS" with no warranties, and confers no rights.
Download
You can get source code here: Prism v2 RI with SL3 Validation.zip .
More info
The following are some other posts related to Prism and Silverlight 3:
- Prism-v2 Reference Implementation migrated to Silverlight 3 Official Release with Out-Of-Browser Capabilities
- Composite Application Guidance (Prism-v2) sample application using Silverlight 3 Child Window
- Putting Prism-v2 extensibility to test. The standalone Silverlight Event Aggregator
- How To: Integrate a Prism v2 application with the Silverlight 3 Navigation Framework
- Commands with Attached Behavior for Silverlight 3 DataForm
Fun validating :)