views:

196

answers:

2

Is there a good, concise guide to the various behaviors of the controls that inherit from System.Windows.Controls.Panel? Or just a WPF layout guide in general?

In particular, I'm interested in how the panels handle child objects that have width or height set to "Auto" and Horizontal or Vertical Alignment set to "Stretch". Some layouts cause the objects to fill the size of their container, others just cause them to size based on their own content.

+3  A: 

See http://msdn.microsoft.com/en-us/library/ms754152.aspx for a start... it sounds like you may be particularly interested in the table in the "User Interface Panels" section.

kvb
Very similar to Volte's answer, but this is first, and the table you mentioned was definitely part of what I was looking for. Thanks.
John Noonan
+1  A: 

I would recommend looking at the MSDN entry about panels and this example in particular first. The methods MeasureOverride and ArrangeOverride handle all layout related logic.

Volte