LEADTOOLS Annotations for WPF and Silverlight (Leadtools.Windows.Annotations assembly) Send comments on this topic. | Back to Introduction - All Topics | Help Version 17.0.3.31
AnnPolylineObject Class
See Also  Members  
Leadtools.Windows.Annotations Namespace : AnnPolylineObject Class



The AnnPolylineObject Class supports WPF/Silverlight.

The AnnPolylineObject Class is available in LEADTOOLS Document and Medical Imaging toolkits.

Defines an annotation polyline object. Supported in Silverlight, Windows Phone 7

Object Model

AnnPolylineObject Class

Syntax

Visual Basic (Declaration) 
Public Class AnnPolylineObject 
   Inherits AnnObject
   Implements IAnnHeaderIAnnObjectIAnnPolyline 
Visual Basic (Usage)Copy Code
Dim instance As AnnPolylineObject
C# 
public class AnnPolylineObject : AnnObject, IAnnHeaderIAnnObjectIAnnPolyline  
C++/CLI 
public ref class AnnPolylineObject : public AnnObject, IAnnHeaderIAnnObjectIAnnPolyline  

Example

For XAML example, refer to AnnPolygonObject.

This example creates a new polyline object with 4 points.

Visual BasicCopy Code
Private Sub AnnPolylineObject_AnnPolylineObject(ByVal container As AnnContainer)
  Dim polyline As AnnPolylineObject = New AnnPolylineObject()
    polyline.Points.Add(New System.Windows.Point(100, 100))
    polyline.Points.Add(New System.Windows.Point(200, 100))
    polyline.Points.Add(New System.Windows.Point(200, 200))
    polyline.Points.Add(New System.Windows.Point(100, 300))
  polyline.Stroke = Colors.Red
  polyline.StrokeThickness = 1.0
  container.Children.Add(polyline)
End Sub
C#Copy Code
private void AnnPolylineObject_AnnPolylineObject(AnnContainer container)
{
   AnnPolylineObject polyline = new AnnPolylineObject();
   polyline.Points.Add(new Point(100, 100));
   polyline.Points.Add(new Point(200, 100));
   polyline.Points.Add(new Point(200, 200));
   polyline.Points.Add(new Point(100, 300));
   polyline.Stroke = Colors.Red;

   polyline.StrokeThickness = 1.0;

   container.Children.Add(polyline);
}
SilverlightCSharpCopy Code
private void AnnPolylineObject_AnnPolylineObject(AnnContainer container)
{
   AnnPolylineObject polyline = new AnnPolylineObject();
   polyline.Points.Add(new Point(100, 100));
   polyline.Points.Add(new Point(200, 100));
   polyline.Points.Add(new Point(200, 200));
   polyline.Points.Add(new Point(100, 300));
   polyline.Stroke = Colors.Red;

   polyline.StrokeThickness = 1.0;

   container.Children.Add(polyline);
}
SilverlightVBCopy Code
Private Sub AnnPolylineObject_AnnPolylineObject(ByVal container As AnnContainer)
   Dim polyline As AnnPolylineObject = New AnnPolylineObject()
   polyline.Points.Add(New Point(100, 100))
   polyline.Points.Add(New Point(200, 100))
   polyline.Points.Add(New Point(200, 200))
   polyline.Points.Add(New Point(100, 300))
   polyline.Stroke = Colors.Red

   polyline.StrokeThickness = 1.0

   container.Children.Add(polyline)
End Sub

Remarks

The polyline object is a simple polyline that contains a collection of System.Windows.Point points and a stroke. For more information about the polyline annotation object refer to AnnPolylineObject for WPF. For more information about the automated polyline annotation object, refer to WPF Annotation Objects - Automated Features.

Inheritance Hierarchy

System.Object
   System.Windows.Threading.DispatcherObject
      System.Windows.DependencyObject
         Leadtools.Windows.Annotations.AnnObject
            Leadtools.Windows.Annotations.AnnPolylineObject
               Leadtools.Windows.Annotations.AnnCurveObject
               Leadtools.Windows.Annotations.AnnPolygonObject
               Leadtools.Windows.Annotations.AnnPolyRulerObject

Requirements

Target Platforms: Silverlight 3.0, Windows XP, Windows Server 2003 family, Windows Server 2008 family, Windows Vista, Windows 7, MAC OS/X (Intel Only)

See Also

AnnPolylineObject requires a Document/Medical product license and unlock key. For more information, refer to: Imaging Pro/Document/Medical Features and Unlocking Special LEAD Features.