O'Reilly logo

Mastering Windows 8 C++ App Development by Pavel Yosifovich

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Custom panels

WinRT provides the standard panels deriving from Panel. It's possible to create new panels that arrange their children in unique ways, such as a radial panel, whose children are arranged along the circumference of an ellipse.

The layout process is a two-step process—measure and arrange. This is modelled precisely by the methods of Panel to override two methods for this exact purpose, MeasureOverride and ArrangeOverride.

MeasureOverride asks the panel (or any element that overrides it for that matter) what size it requires. For a panel, the main concern is the requirements of its child elements. The panel should call UIElement::Measure for each child element, causing its own MeasureOverride to be called (and this may go on if that ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required