tags:

views:

22

answers:

2

Hey. I've got a list of 3 resolutions I need to target with a WPF application. However, I've never used WPF before and was wondering what the best way of targetting these would be.

1024x600, 1600,768 and 1024x576 are the main resolutions.

The application does not run full screen, so should I simply target the lowest one (1024 x 576) or is there a better way of handling this in WPF? Thanks

+1  A: 

One of the advantages of WPF/Silverlight layout controls is that you don't need to know the target resolution.

It's possible to design your interface to be fully dynamic. You should be able to design it in a way that it looks good on any resolution.

I just wouldn't set any constraints such as MinWidth or MinHeight that would cause it to not fit in the smallest resolution you want to target.

Mike
Do I ned to manually change settings to achieve this, or simply set height and width as auto? thanks
SSL
The behavior is different based on what kind of layout controls you use
Mike
If you are new to WPF, I would suggest getting a good book to teach you how to design the UI or spend some time reading articles at CodeProject. WPF layout is a different world compared to WinForms layout.I used Matthew McDonald's Pro WPF in C# book to learn WPF and I learned a lot pretty quick.
Mike
I'm familiar with Silverlight (i.e. XAML), but not sure if any of that knowledge transfers over to WPF's handling of controls but thanks for the book recommendation, will take a look.
SSL
WPF and Silverlight are very similar. Silverlight has some different controls, but the ones that exist in both, behave the same as far as UI layout is concerned. If you know Silverlight, WPF should be a fairly easy transition.
Mike
Cool, thanks for helping.
SSL
+1  A: 

It depends.

  • If your program is a simple collection of non-resizable controls, you should design your form for the smallest resolution and be non-resizable.

  • If your program has resizable controls (eg, a grid or multi-line textbox), you should make a resizable form that can fit the smallest resolution, but can be resized to take advantage of larger screens.

SLaks