Summary

This chapter digs into the mechanism that child elements and parent panels use, and how they compromise to give great results in a wide variety of situations. Implementing your own custom panels is considered an advanced topic only because it’s rare that you would need to do so. As you’ve seen, custom panels are pretty easy to write. Because of the measure/arrange protocol and all the work automatically handled by the rest of the system, existing controls can be placed inside brand-new custom panels, and they still behave very reasonably.

As with creating a custom control, you should spend a little time determining the appropriate base class for a custom panel. The choices for panels are more straightforward, however. Most of the time, ...

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.