concept measure in category silverlight

appears as: measure, Measure, The measure
Silverlight 4 in Action: Silverlight 4, MVVM, and WCF RIA Services

This is an excerpt from Manning's book Silverlight 4 in Action: Silverlight 4, MVVM, and WCF RIA Services.

Layout in Silverlight and WPF involves two primary passes: the measure pass and the arrange pass. In the measure pass, the layout system asks each element to provide its dimensions given a provided available size. In the arrange step, the layout system tells each element its final size and requests that it lay itself out and also lay out its child elements. A full run of measuring and arranging is called a layout pass.

In this section, we’ll build this panel, starting with project creation, including the addition of a library project specifically made for this panel and for the custom control we’ll build later in the chapter. We’ll create a dependency property as well as an attached property, both because they’re useful and because creating them is a necessary skill for panel and control builders. From there, we’ll spend most of the time looking at how to perform the measure and arrange steps described in chapter 6 to layout the control. We’ll wrap up this section with a guide for some potential enhancements should you desire to take the panel further on your own.