Polyline Class
.NET Framework 3.0
Draws a series of connected straight lines. This class cannot be inherited.
Namespace: System.Windows.Shapes
Assembly: PresentationFramework (in presentationframework.dll)
XML Namespace: http://schemas.microsoft.com/winfx/2006/xaml/presentation
Assembly: PresentationFramework (in presentationframework.dll)
XML Namespace: http://schemas.microsoft.com/winfx/2006/xaml/presentation
This object is similar to the Polygon object, except that this object does not need to be a closed shape.
The following example shows how to create a Polyline element and set its properties by using code. For the complete sample, see Create Shape Elements Using Code Sample.
' Add a Polyline Element Dim myPolyline As New Polyline() myPolyline.Stroke = Brushes.SlateGray myPolyline.StrokeThickness = 2 myPolyline.FillRule = FillRule.EvenOdd Dim Point4 As New System.Windows.Point(1, 50) Dim Point5 As New System.Windows.Point(10, 80) Dim Point6 As New System.Windows.Point(20, 40) Dim myPointCollection2 As New PointCollection() myPointCollection2.Add(Point4) myPointCollection2.Add(Point5) myPointCollection2.Add(Point6) myPolyline.Points = myPointCollection2 myGrid.Children.Add(myPolyline)
More Code
| How to: Draw a Polyline by Using the Polyline Element | This example shows how to draw a polyline, which is a series of connected lines, by using the Polyline element. |
Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.Community Additions
ADD
Show: