views:

57

answers:

2

I'm starting with .NET CF WinForm application and I have some experience with .NET WinForm.

What is better for UI, form for each dialog or one form and changing user controls on that form? I'm asking for that, because screen on mobile devices are very small and I designed more then ten different screens for my application.

A: 

I'm asking for that, because screen on mobile devices are very small and I designed more then ten different screens for my application.

I do not understand how having one or multiple forms would make a difference given the reason you have quoted.

danish
+1  A: 

There is really no right answer to this. Whether you use a separate Form for each screen, or some other UI element like a Panel or UserControl it's going to use pretty much the same resources. That means it's not going to have much impact on load speed, memory pressure, etc (assuming you demand-load those resources).

Personally I usually use a single Form containing one of more Workspaces. I then create a UserControl for each View (you are separating View code from the Model, right?) and I use the OpenNETCF IoC framework to display those Views inside the appropriate Form's workspace. I actually use the same framework and methodology for desktop apps.

This certainly isn't the only way to do things, but it's worked well for us on several large-scale applications as well as small stuff (meaning the methodology is both extensible and scalable).

ctacke