views:

78

answers:

3

I'm wondering if anyone is familiar with designing UIs to be scalable to any resolution. Are there any libraries or functionalities of .NET that make this easy? We also have Infragistics controls as a resource.

+2  A: 

Use a TableLayoutPanel. You can then lay out a grid that is scalable (you can use a mix of fixed width/height and variable based on percentages), and then dock/anchor the UI components to the table cells.

TableLayoutPanel Members (System.Windows.Forms)

Justin Niessner
+5  A: 

With Windows Forms, the best option is to use the dynamically generated layout controls, and make sure to use the Anchor/Dock properties of controls for placement, instead of positioning and sizing explicitly.

The layout panels, such as TableLayoutPanel, also help tremendously, since they do dynamic resizing at runtime.

That being said, this is one place where WPF has a huge advantage over Windows Forms. In WPF, all sizing and layout is done with a "pixel" being a virtualized, resolution indepdent "pixel" which corresponds to 1/96th inch. This means your UI will just work on any resolution, provided you don't explicitly mess it up.

Reed Copsey
I think most companies set a standard size, but I tend to resize my forms to make sure they are at least usable at common sizes. I think anything smaller then 1024x768 is just too small.
eschneider
@eschneider: That's not a very reasonable thing to do if you've got users who use netbooks, though. Many netbooks have very odd resolutions, sometimes lower than 1024x768...
Reed Copsey
I agree, that's something I have not had to deal with yet (netbooks). But designing for the smallest screen can also hinder a ideal design.
eschneider
A small format client may be an option, developers could reuse some portions of the full sized client.
eschneider
A: 

FWIW, you should always bear in mind that the user can switch the size of their default font in Display Settings from Control Panel. There are still some controls that don't properly handle this sizing issue, so you should be careful of assumptions you make regarding expected size.

cdkMoose