|
|
|
|
|
Polyline class allows you to draw a sequence.
|
|
Author :
Visual Essentials
Version :
Silverlight 2
|
|
|
|
|
|
Polyline
The Polyline class allows you to draw a sequence of connected straight
lines. You simply supply a list of x and y coordinates using the Points
property. Technically, the Points property requires a PointCollection
object, but you fill this collection in XAML using a lean string-based
syntax. You simply need to supply a list of points and add a space or a
comma between each coordinate.
A Polyline can have as few as two points. For example, here’s a Polyline
that duplicates the first line you saw in this section, which stretches from
(5, 100) to (15, 200):
<Polyline Stroke="Blue" Points="5 100 15 200"></Polyline>
For better readability, use commas in between each x and y coordinate:
<Polyline Stroke="Blue" Points="5,100 15,200"></Polyline>
And here’s a more complex Polyline that begins at (10, 150). The points
move steadily to the right, oscillating between higher y values such as (50,
160) and lower ones such as (70, 130):
|
|
|
|
|
|
|
|
|
|
ทดสอบการทำงานของ (VC31TestPage.html)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
>>>
ดาวน์โหลด VC31.xap
|
|
|
|
|
|
|
|
|
ซอร์สโค้ด ของ Page.xaml (initial UI control)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ซอร์สโค้ด ของ Page.xaml.cs (code-behind class)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ภาษา VB >>>
|
|
|
|
|
|
|
|
|
|
|