views:

30

answers:

1

I have a Silverlight 4 Application using the Prism Pattern. I have 3 Views, a main menu, navigation and the form view.

If I click on a navigation item I would like to be able to validate the model in my form view.

Is there a way to create some sort of central validation so that if I wanted to validate the form view upon clicking or making a change in the navigation or menu views it would be done?

Right now if I make changes in the form view, I get validation but the other two views are blind to the form view in a sense, so I could create an erroneous state unless I can some how centralize some validation. This way I can ensure no matter what view I alter, the form view always gets validated.

Any suggestions, thoughts, questions, or ideas?

A: 

Having validation occur in the form feels right, but there is no reason your form can't subscribe to other app-wide generic events.

How about creating a ViewChanging or a PageChanging event, generated by the Navigation view and subscribed to by the form?

Enough already