Draws a series of connected lines and curves. The line and curve dimensions are declared through the Data property, and can be specified either with a Path-specific mini-language, or with an object model.
| XAML | <Path .../> |
| Scripting | To create an object using scripting, see CreateFromXAML. |
Properties
Canvas.Left,
Canvas.Top,
Canvas.ZIndex,
Clip,
Cursor,
Data,
Fill,
Height,
Name,
Opacity,
OpacityMask,
RenderTransform,
RenderTransformOrigin,
Resources,
Stretch,
Stroke,
StrokeDashArray,
StrokeDashCap,
StrokeDashOffset,
StrokeEndLineCap,
StrokeLineJoin,
StrokeMiterLimit,
StrokeStartLineCap,
StrokeThickness,
Tag,
Triggers,
Width
Methods
AddEventListener,
CaptureMouse,
Equals,
FindName,
GetHost,
GetParent,
GetValue,
ReleaseMouseCapture,
RemoveEventListener,
SetValue
Events
Loaded,
MouseEnter,
MouseLeave,
MouseLeftButtonDown,
MouseLeftButtonUp,
MouseMove
Examples
The following example uses a Path to draw an ellipse.
An EllipseGeometry drawn at (50,50)
| XAML |
<Canvas
xmlns="http://schemas.microsoft.com/client/2007"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Path Fill="Gold" Stroke="Black" StrokeThickness="1">
<Path.Data>
<EllipseGeometry Center="50,50" RadiusX="50" RadiusY="50" />
</Path.Data>
</Path>
</Canvas>
|
See Also
Path Markup Syntax
Shapes Overview
Silverlight Geometries Overview
Shape
Stretch