views:

52

answers:

1

Given that you're creating a User Control in WPF that will be displayed on different screen resolutions, what's the best way to layout a dense collection of "input form" elements?

For example, labels, textboxes for text, dropdowns, group boxes, etc.

Do you create a master "grid" and use StackPanels and WrapPanels like crazy? What's the cleanest way to do this?

+2  A: 

My way of doing it is like you described - master Grid with tons of StackPanels and Grid.Row="" statements. However you might try looking at this question and the top answer. The DockPanel looks promising, and I think next time I make a dense input form, I'll try using it.

A really concise tutorial can be found here.

Phil
Most of my UI's use combinations of these panels, nested in a hierarchy. A GridPanel maybe on the outside, with individual cells containing StackPanels or other.
Cheeso