Geometries

A Geometry is not a visual element like Shape, but rather the simplest possible abstract representation of a shape or path.

Geometry has a number of subclasses:

RectangleGeometry—Has a Rect property for defining its dimensions.

EllipseGeometry—Has RadiusX and RadiusY properties, plus a Center property.

LineGeometry—Has StartPoint and EndPoint properties to define a line segment.

PathGeometry—Contains a collection of PathFigure objects in its Figures content property; a general-purpose Geometry.

GeometryGroup—Contains a collection of geometries.

These should look familiar, because they mirror the Shape classes. So what’s the point of having these separate Geometry classes? You can build up and combine arbitrary geometries ...

Get Universal Windows® Apps with XAML and C# 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.