Shapes

A Shape is a 2D vector-based drawing that can be placed anywhere that any other element can be placed. For example, Chapter 1, “What Is XAML?” shows how easy it is to embed a square in a Button by using Rectangle (which derives from Shape):

<Button>  <Rectangle Height="10" Width="10" Fill="White"/></Button>

Six classes derive from Shape:

Image Rectangle

Image Ellipse

Image Line

Polyline

Polygon

Path

Although Shape itself can’t ...

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.