Appendix D. System.Windows.Shapes Reference
System.Windows.Shapes
Classes
The System.Windows.Shapes
namespace contains the basic drawing elements that make up most of the rendered content in the player. The Ellipse, Line, Path, Polygon, Polyline
, and Rectangle
classes render vector-based resolution-independent lines and shape, so they can be resized appropriately no matter what size the shape is being rendered in. In this appendix, we'll go into detail on the classes in this namespace and cover how you can use the classes.
The following classes are in the System.Windows.Shapes
namespace:
Shape
Ellipse
Line
Path
Polygon
Polyline
Rectangle
We'll cover each in the next sections.
Shape
Class
The Shape
class is the base class for the Ellipse, Line, Path, Polygon, Polyline
, and Rectangle
classes. The following sections describe the properties of the Shape
class that are not inherited from UIElement
or FrameworkElement.
Fill
Fill
gets or sets the color (Brush
object in System.Windows.Media
) that specifies how to paint the interior of the shape. Figure D-1 demonstrates the full color table for the Brush
object.
Figure D.1. Figure D-1
The Brush
object can be one of the following five types:
SolidColorBrush
— Paints an area with a solid color.LinearGradientBrush
— Paints an area with a linear gradient.RadialGradientBrush
— Paints an area with a radial gradient.ImageBrush
— Paints an area with an image.VideoBrush ...
Get Silverlight™ 3 Programmer's Reference 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.