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 elements

Control templates provide a powerful and complete way to change the control's appearance. But that's just appearance—the control still behaves in the same way. If a new functionality is required, templates are not enough, and a new class should be created. This is where custom elements come in.

There are several ways of authoring custom elements in WinRT, we'll take a look at the two most frequently used controls—user controls and custom controls. Then, we'll briefly discuss how to create custom panels and custom shapes.

User controls

A user control is typically used to group related elements and controls together, for the purpose of re-use. Appropriate properties and events are exposed from this control, providing easy access to ...

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