Controlling Size

Every time layout occurs (such as when a window is resized), child elements tell their parent panel their desired size. Elements tend to size to their content, meaning that they try to be large enough to fit their content and no larger. (Even a WPF Window does this, but only when you explicitly set its SizeToContent property.) This size can be influenced on individual instances of children via several straightforward properties.

Get XAML Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.