The first panel we’ll create is a simplified version of
SimpleCanvas behaves exactly like
Canvas, except that it only respects
Top attached properties on its children rather than
Bottom in WPF).
SimpleCanvas (or any other custom panel) consists of the following four steps:
1. Create a class that derives from
2. Define any properties that would be useful for customizing layout, potentially including attached properties for the children.
MeasureOverride and measure each child.
ArrangeOverride and arrange each child.
Listing 20.1 contains the entire implementation of
SimpleCanvas in the context of a Windows ...