O'Reilly logo

Microsoft® Silverlight® Edition: Programming Windows® Phone 7 by Charles Petzold

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The Path Markup Syntax

Silverlight supports a type of “mini-language” that allows you to encode an entire PathGeometry in a string. The language consists of letters (such as M for Move, L for Line, A for Arc, and C for Cubic Bézier) that take the place of PathFigure and PathSegment objects. Each new PathFigure begins with a Move command. The syntax is described in the Graphics section of the online Silverlight documentation.

Here’s an example:

<Grid Background="LightCyan"> <Path Stroke="Maroon" StrokeThickness="4" Data="M 160 140 L 150 50 220 103 M 320 140 L 330 50 260 103 M 215 230 L 40 200 M 215 240 L 40 240 M 215 250 L 40 280 M 265 230 L 440 200 M 265 240 L 440 240 M 265 250 L 440 280 M 240 100 A 100 100 0 0 1 240 300 A 100 100 0 0 1 240 100 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required