This class provides support for creating and managing Text annotation objects
public class AnnTextObject : Leadtools.Windows.Annotations.AnnRectangleObject, Leadtools.Windows.Annotations.IAnnFont, Leadtools.Windows.Annotations.IAnnHeader, Leadtools.Windows.Annotations.IAnnObject, Leadtools.Windows.Annotations.IAnnRectangle, Leadtools.Windows.Annotations.IAnnTextPublic Class AnnTextObjectInherits Leadtools.Windows.Annotations.AnnRectangleObjectImplements Leadtools.Windows.Annotations.IAnnFont, Leadtools.Windows.Annotations.IAnnHeader, Leadtools.Windows.Annotations.IAnnObject, Leadtools.Windows.Annotations.IAnnRectangle, Leadtools.Windows.Annotations.IAnnText
The text annotation object is a text string within a bounding rectangle. This class supports a stroke and fill, that may be used on the bounding rectangle, if needed. For more information, refer to Using Text in WPF Annotation Objects. For more information about the text annotation object refer to AnnTextObject for WPF. For more information about the automated text annotation object, refer to WPF Annotation Objects - Automated Features.
For XAML example, refer to AnnGroupObject.
This example creates a new text object.
Imports Leadtools.Windows.ControlsImports Leadtools.Windows.AnnotationsPrivate Sub AnnTextObject_AnnTextObject(ByVal container As AnnContainer, ByVal textString As String)Dim text As AnnTextObject = New AnnTextObject()text.Stroke = Colors.Redtext.StrokeThickness = 3.0text.Text = textStringtext.Fill = Nothingtext.FontFamilyName = "Arial"text.FontSize = 10.0text.FontStretch = AnnFontStretches.Normaltext.FontStyle = AnnFontStyle.Normaltext.FontWeight = AnnFontWeight.Boldtext.Foreground = Colors.Yellowtext.FontDecoration = New TextDecorationCollection()text.FontDecoration.Add(TextDecorations.Underline)text.TextEdgeMargin = 0.0text.TextHorizontalAlignment = AnnTextAlignment.Centertext.TextVerticalAlignment = AnnTextAlignment.Centertext.TextRotate = AnnTextRotate.Rotate0text.Rect = New Rect(100, 100, 100, 100)container.Children.Add(text)End Sub
using Leadtools.Windows.Controls;using Leadtools.Windows.Annotations;using Leadtools.Demos;using Leadtools.Help;private void AnnTextObject_AnnTextObject(AnnContainer container, string textString){AnnTextObject text = new AnnTextObject();text.Stroke = Colors.Red;text.FontFamilyName = "Arial";text.Fill = Colors.Transparent;text.FontStretch = AnnFontStretches.Normal;text.FontStyle = AnnFontStyle.Normal;text.FontWeight = AnnFontWeight.Bold;text.Foreground = Colors.Yellow;text.FontDecoration = new TextDecorationCollection();text.FontDecoration.Add(TextDecorations.Underline);text.Rect = new Rect(100, 100, 100, 100);text.StrokeThickness = 3.0;text.Text = textString;text.FontSize = 10.0;text.TextEdgeMargin = 0.0;text.TextHorizontalAlignment = AnnTextAlignment.Center;text.TextVerticalAlignment = AnnTextAlignment.Center;text.TextRotate = AnnTextRotate.Rotate0;container.Children.Add(text);}
using Leadtools.Windows.Controls;using Leadtools.Windows.Annotations;using Leadtools.Examples;private void AnnTextObject_AnnTextObject(AnnContainer container, string textString){AnnTextObject text = new AnnTextObject();text.Stroke = Colors.Red;text.FontFamilyName = "Arial";text.Fill = Colors.Transparent;text.FontStretch = AnnFontStretches.Normal;text.FontStyle = AnnFontStyle.Normal;text.FontWeight = AnnFontWeight.Bold;text.Foreground = Colors.Yellow;text.Rect = new Rect(100, 100, 100, 100);text.StrokeThickness = 3.0;text.Text = textString;text.FontSize = 10.0;text.TextHorizontalAlignment = AnnTextAlignment.Center;container.Children.Add(text);}
Imports Leadtools.Windows.ControlsImports Leadtools.Windows.AnnotationsPrivate Sub AnnTextObject_AnnTextObject(ByVal container As AnnContainer, ByVal textString As String)Dim text As AnnTextObject = New AnnTextObject()text.Stroke = Colors.Redtext.FontFamilyName = "Arial"text.Fill = Colors.Transparenttext.FontStretch = AnnFontStretches.Normaltext.FontStyle = AnnFontStyle.Normaltext.FontWeight = AnnFontWeight.Boldtext.Foreground = Colors.Yellowtext.Rect = New Rect(100, 100, 100, 100)text.StrokeThickness = 3.0text.Text = textStringtext.FontSize = 10.0text.TextHorizontalAlignment = AnnTextAlignment.Centercontainer.Children.Add(text)End Sub
|
Products |
Support |
Feedback: AnnTextObject Class - Leadtools.Windows.Annotations |
Introduction |
Help Version 19.0.2017.3.22
|

Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET
Your email has been sent to support! Someone should be in touch! If your matter is urgent please come back into chat.
Chat Hours:
Monday - Friday, 8:30am to 6pm ET
Thank you for your feedback!
Please fill out the form again to start a new chat.
All agents are currently offline.
Chat Hours:
Monday - Friday
8:30AM - 6PM EST
To contact us please fill out this form and we will contact you via email.