The AnnPolyRulerObject Class supports WPF/Silverlight.
The AnnPolyRulerObject Class is available in LEADTOOLS Document and Medical Imaging toolkits.
Defines an annotation polyruler object.
Supported in Silverlight, Windows Phone 7
Object Model
Syntax
Example
This example creates a new polyruler.
Visual Basic | Copy Code |
---|
'''<!--This example creates a new polyruler.-->
Private Sub AnnPolyRulerObject_AnnPolyRulerObject(ByVal container As AnnContainer)
Dim polyruler As AnnPolyRulerObject = New AnnPolyRulerObject()
polyruler.MeasurementUnit = AnnUnit.SmartEnglish
polyruler.TickMarksLength = DirectCast(New LengthConverter().ConvertFrom("0.5in"), Double)
polyruler.ShowTickMarks = True
polyruler.GaugeLength = DirectCast(New LengthConverter().ConvertFrom("1.0in"), Double)
polyruler.ShowGauge = True
polyruler.ShowLength = True
polyruler.Precision = 2
polyruler.Points.Add(New System.Windows.Point(100, 100))
polyruler.Points.Add(New System.Windows.Point(200, 100))
polyruler.Points.Add(New System.Windows.Point(200, 200))
polyruler.Points.Add(New System.Windows.Point(100, 300))
polyruler.Stroke = Colors.Red
polyruler.StrokeThickness = 1.0
container.Children.Add(polyruler)
End Sub |
C# | Copy Code |
---|
private void AnnPolyRulerObject_AnnPolyRulerObject(AnnContainer container)
{
AnnPolyRulerObject polyruler = new AnnPolyRulerObject();
polyruler.MeasurementUnit = AnnUnit.SmartEnglish;
polyruler.TickMarksLength = (double)new LengthConverter().ConvertFrom("0.5in");
polyruler.ShowTickMarks = true;
polyruler.GaugeLength = (double)new LengthConverter().ConvertFrom("1.0in");
polyruler.ShowGauge = true;
polyruler.ShowLength = true;
polyruler.Precision = 2;
polyruler.Points.Add(new Point(100, 100));
polyruler.Points.Add(new Point(200, 100));
polyruler.Points.Add(new Point(200, 200));
polyruler.Points.Add(new Point(100, 300));
polyruler.Stroke = Colors.Red;
polyruler.StrokeThickness = 1.0;
container.Children.Add(polyruler);
} |
SilverlightCSharp | Copy Code |
---|
private void AnnPolyRulerObject_AnnPolyRulerObject(AnnContainer container)
{
AnnPolyRulerObject polyruler = new AnnPolyRulerObject();
polyruler.MeasurementUnit = AnnUnit.Pixel;
polyruler.TickMarksLength = 37;
polyruler.ShowTickMarks = true;
polyruler.GaugeLength = 75;
polyruler.ShowGauge = true;
polyruler.ShowLength = true;
polyruler.Precision = 2;
polyruler.Points.Add(new Point(100, 100));
polyruler.Points.Add(new Point(200, 100));
polyruler.Points.Add(new Point(200, 200));
polyruler.Points.Add(new Point(100, 300));
polyruler.Stroke = Colors.Red;
polyruler.StrokeThickness = 1.0;
container.Children.Add(polyruler);
} |
SilverlightVB | Copy Code |
---|
Private Sub AnnPolyRulerObject_AnnPolyRulerObject(ByVal container As AnnContainer)
Dim polyruler As AnnPolyRulerObject = New AnnPolyRulerObject()
polyruler.MeasurementUnit = AnnUnit.Pixel
polyruler.TickMarksLength = 37
polyruler.ShowTickMarks = True
polyruler.GaugeLength = 75
polyruler.ShowGauge = True
polyruler.ShowLength = True
polyruler.Precision = 2
polyruler.Points.Add(New Point(100, 100))
polyruler.Points.Add(New Point(200, 100))
polyruler.Points.Add(New Point(200, 200))
polyruler.Points.Add(New Point(100, 300))
polyruler.Stroke = Colors.Red
polyruler.StrokeThickness = 1.0
container.Children.Add(polyruler)
End Sub |
Remarks
Inheritance Hierarchy
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