18.5. Custom Panels

So far, you've seen how to develop two custom controls from scratch, with a custom ColorPicker and FlipPanel. In the following sections, you'll consider two more specialized options: deriving a custom Panel and building a custom-drawn control.

Creating a custom panel is a specific but relatively common subset of custom control development. As you learned in Chapter 3, panels host one or more children and implement specific layout logic to arrange them appropriately. Custom panels are an essential ingredient if you want to build your own system for tear-off toolbars or dockable windows. Custom panels are often useful when creating composite controls that need a specific nonstandard layout, like fancy docking toolbars.

You're ...

Get Pro WPF in C# 2010: Windows Presentation Foundation in .NET 4 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.