tags:

views:

22

answers:

2

Hi Experts,

We are designing one form in WPF which will have 5 modes.

Now the question is that should handle these 5 modes in the same form by defining one form enum and manipulating the visibility of the controls. One thing to be noted is that as the mode goes on changing..complexity is going to increase for handling these modes.

Now the second design consideration we got is to go with separate forms for each mode.. which i am not suggesting to my team :-), as this will create maintenance issue.

Please suggest your suggestions.

Thanks and Regards,

Ravi

+1  A: 

It sounds like either way you will end up with a maintenance issue.

I would suggestion one form with a content control that consumed child controls based on the binding of the "mode", that way the form is the same, but the actual contents will vary based on context.

Tom Anderson
Can you explain in more details how this can be achieved using content control.Thanks
ravi
A: 

I'm not sure if that's what you are looking for but the ViewModel sample application of the WPF Application Framework (WAF) shows how to use different UserControls for different modes (see the Wizard implementation).

jbe
I am using prism as a framework, so i WAF will not be helpful to me.
ravi