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
AnnTextPointerObject Class
See Also  Members  
Leadtools.Windows.Annotations Namespace : AnnTextPointerObject Class



The AnnTextPointerObject Class supports WPF/Silverlight.

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

This class provides support for creating and managing text pointer objects. Supported in Silverlight, Windows Phone 7

Object Model

AnnTextPointerObject Class

Syntax

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

Example

For XAML example, refer to AnnGroupObject.

This example creates a new text pointer object.

Visual BasicCopy Code
Private Sub AnnTextPointerObject_AnnTextPointerObject(ByVal container As AnnContainer, ByVal textString As String)
   Dim textPointer As AnnTextPointerObject = New AnnTextPointerObject()
   textPointer.Text = textString
   textPointer.Stroke = Colors.Green
   textPointer.StrokeThickness = 5.0
   textPointer.Fill = Colors.White
   textPointer.FontFamilyName = "Arial"
   textPointer.FontSize = 10.0
   textPointer.FontStyle = AnnFontStyle.Normal
   textPointer.TextEdgeMargin = 0.0
   textPointer.TextHorizontalAlignment = AnnTextAlignment.Center
   textPointer.TextVerticalAlignment = AnnTextAlignment.Center
   textPointer.Rect = New Rect(100, 200, 400, 600)
   textPointer.PointerPosition = New System.Windows.Point(800, 800)
   textPointer.IsFixedPointer = True
   container.Children.Add(textPointer)
End Sub
C#Copy Code
private void AnnTextPointerObject_AnnTextPointerObject(AnnContainer container, string textString)
{
   AnnTextPointerObject textPointer = new AnnTextPointerObject();
   textPointer.Text = textString;
   textPointer.StrokeThickness = 5.0;
   textPointer.FontFamilyName = "Arial";
   textPointer.FontSize = 10.0;
   textPointer.TextEdgeMargin = 0.0;
   textPointer.TextHorizontalAlignment = AnnTextAlignment.Center;
   textPointer.TextVerticalAlignment = AnnTextAlignment.Center;
   textPointer.Stroke = Colors.Green;
   textPointer.Fill = Colors.White;
   textPointer.FontStyle = AnnFontStyle.Normal;
   textPointer.Rect = new Rect(100, 200, 400, 600);

   textPointer.PointerPosition = new Point(800, 800);
   textPointer.IsFixedPointer = true;
   container.Children.Add(textPointer);
}
SilverlightCSharpCopy Code
private void AnnTextPointerObject_AnnTextPointerObject(AnnContainer container, string textString)
{
   AnnTextPointerObject textPointer = new AnnTextPointerObject();
   textPointer.Text = textString;
   textPointer.StrokeThickness = 5.0;
   textPointer.FontFamilyName = "Arial";
   textPointer.FontSize = 10.0;
   textPointer.TextHorizontalAlignment = AnnTextAlignment.Center;
   textPointer.Stroke = Colors.Green;
   textPointer.Fill = Colors.White;
   textPointer.FontStyle = AnnFontStyle.Normal;
   textPointer.Rect = new Rect(100, 200, 400, 600);

   textPointer.PointerPosition = new Point(800, 800);
   textPointer.IsFixedPointer = true;
   container.Children.Add(textPointer);
}
SilverlightVBCopy Code
Private Sub AnnTextPointerObject_AnnTextPointerObject(ByVal container As AnnContainer, ByVal textString As String)
   Dim textPointer As AnnTextPointerObject = New AnnTextPointerObject()
   textPointer.Text = textString
   textPointer.StrokeThickness = 5.0
   textPointer.FontFamilyName = "Arial"
   textPointer.FontSize = 10.0
   textPointer.TextHorizontalAlignment = AnnTextAlignment.Center
   textPointer.Stroke = Colors.Green
   textPointer.Fill = Colors.White
   textPointer.FontStyle = AnnFontStyle.Normal
   textPointer.Rect = New Rect(100, 200, 400, 600)

   textPointer.PointerPosition = New Point(800, 800)
   textPointer.IsFixedPointer = True
   container.Children.Add(textPointer)
End Sub

Remarks

The text pointer annotation object extends the AnnTextObject class by providing an extra line that starts from one of the four corners of the bounding rectangle, around the text. The other endpoint of the line can be moved to point to anything on the underlying image. This extra endpoint may or may not be fixed, depending on the IsFixedPointer value. For more information, refer to Using Text in WPF Annotation Objects. For more information about the text pointer annotation object refer to AnnTextPointerObject for WPF. For more information about the automated text pointer 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.AnnRectangleObject
               Leadtools.Windows.Annotations.AnnTextObject
                  Leadtools.Windows.Annotations.AnnTextPointerObject

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

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