views:

31

answers:

1

Hi,

I'm trying to learn how to design an application which has several different user inferfaces. its an application where a doctor can view patient records, write prescriptions and so on. when designing this one(including the login) I have created seperate user controls for login, prescription writing, medical history browing and set all of their visibility to hidden and then I've put all of them in a single stack panel on the main application window. I'm thinking to display the appropriate usercontrols using the help of code-behind files.

I would like to know is this a valid way of creating wpf applications, or how you would do in desining applications with multiple interfaces (I'm plaining to use some animations on them, such as fade in and hide when closed a user control ).

Thank you.

+1  A: 

For a simple project this is perfectly fine. However as the number of views grow, you might want to design a system for managing this stackpanel.

There is a library designed to handle these kind of situations, you can find it here: http://compositewpf.codeplex.com/ look at the stuff called RegionManager

hkon
thanks for the link. Im reading it right now.. also i found this link when searching Region Manager on google. might be usefulhttp://msdn.microsoft.com/en-us/magazine/cc785479.aspx
Yes that article targets that framework.
hkon