XAML in a Nutshell (In a Nutshell (OReilly))

RectangleHierarchy: UIElement FrameworkElement Shape StretchableShape

Type: Shape

<Rectangle Fill="Blue" Height="50" Width="100" RadiusX="20" RadiusY="20" />

<Rectangle .../> draws a rectangle. The Width and Height properties inherited from FrameworkElement are necessary to describe the rectangle's geometry. Figure 9-16 shows the Rectangle defined above when evaluated in XamlPad.

Attributes

RadiusX (optional)

Describes the x-radius of an ellipse used to round the Rectangle's corners

RadiusY (optional)

Describes the y-radius of an ellipse used to round the Rectangle's corners

Figure 9-16. Rectangle

Категории