I have a window control that contains four user controls (screens) in a wizard style environment. (i.e. only one user control will be viewable at all times) The window control has a series of buttons that act as the primary navigation between all the user controls.
----------------------------------
| |
| SCREEN x of 4 |
| |
----------------------------------
| |
| Back Next Cancel |
----------------------------------
The wizard will build a profile of information as the user completes each screen. I have defined a Profile type that implements INotifyPropertyChanged that will contain the information the user provides. So far, so good.
My question is: When the first user control (Screen 1 of 4) modifies the Profile type, how do I alert the Window? I'm trying to use MVVM and not use code-behind.
I tried setting up an event on the first user control. The window would be the subscriber to that event, but that's not working.
Is there a better approach for a user control to alert the main window that something has happened?