GeometryGroup
GeometryGroup
composes one or more Geometry
instances together. Like TransformGroup
’s relationship to Transform
, GeometryGroup
derives from Geometry
, so it can be used anywhere that a simpler Geometry
can be used. For example, the previously shown XAML for the overlapping triangles in Figure 7.12 could be rewritten to use two geometries (each with a single PathFigure
) rather than one:
<Path Fill="Orange" Stroke="Black" StrokeThickness="10"> <Path.Data> <GeometryGroup> <!-- Triangle #1 --> <PathGeometry> <PathFigure IsClosed="True"> <LineSegment Point="0,100"/> <LineSegment Point="100,100"/> </PathFigure> </PathGeometry> <!-- Triangle #2 --> ...
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.