←Select platform

AnnTextRollupObject Class

Summary

This class provides support for creating and managing text rollup annotation objects.

Remarks

The text rollup annotation object extends AnnNoteObject by adding an IsExpanded property. When this property is set to false, the text rollup object looks and behaves like a normal note. When IsExpanded is set to false, the text rollup object will shrink to show only one line of text. This saves space on the container surface. For more information, refer to Using Text in WPF Annotation Objects. For more information about the text rollup annotation object refer to WPF AnnTextRollupObject. For more information about the automated text rollup annotation object, refer to WPF Annotation Objects - Automated Features.

Example

This example creates a new text rollup object.

C#
VB
using Leadtools.Windows.Controls; 
using Leadtools.Windows.Annotations; 
using Leadtools.Demos; 
using Leadtools.Help; 
 
private void AnnTextRollupObject_AnnTextRollupObject(ImageViewer viewer, AnnContainer container) 
{ 
   AnnTextRollupObject textRollup = new AnnTextRollupObject(); 
   textRollup.Text = "My TextRollup object"; 
 
   textRollup.FontSize = 10; 
   textRollup.TextEdgeMargin = 0.0; 
   textRollup.ShadowBorderWidth = 6.0; 
   textRollup.TextHorizontalAlignment = AnnTextAlignment.Center; 
   textRollup.TextVerticalAlignment = AnnTextAlignment.Center; 
 
   textRollup.FontFamilyName = "Arial"; 
   textRollup.FontStyle = AnnFontStyle.Normal; 
   textRollup.Rect = new Rect(100, 200, 400, 600); 
 
   container.Children.Add(textRollup); 
 
   textRollup.IsExpanded = false; 
 
   MessageBox.Show("Not expanded"); 
 
   textRollup.IsExpanded = true; 
 
   MessageBox.Show("expanded"); 
} 
Imports Leadtools.Windows.Controls 
Imports Leadtools.Windows.Annotations 
 
Private Sub AnnTextRollupObject_AnnTextRollupObject(ByVal viewer As ImageViewer, ByVal container As AnnContainer) 
   Dim textRollup As AnnTextRollupObject = New AnnTextRollupObject() 
   textRollup.Text = "My TextRollup object" 
   textRollup.FontFamilyName = "Arial" 
   textRollup.FontSize = 10 
   textRollup.FontStyle = AnnFontStyle.Normal 
   textRollup.TextEdgeMargin = 0.0 
   textRollup.ShadowBorderWidth = 6.0 
   textRollup.TextHorizontalAlignment = AnnTextAlignment.Center 
   textRollup.TextVerticalAlignment = AnnTextAlignment.Center 
   textRollup.Rect = New Rect(100, 200, 400, 600) 
 
   container.Children.Add(textRollup) 
 
   textRollup.IsExpanded = False 
 
   MessageBox.Show("Not expanded") 
 
   textRollup.IsExpanded = True 
 
   MessageBox.Show("expanded") 
End Sub 

Requirements

Target Platforms

Help Version 19.0.2017.10.27
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Windows.Annotations Assembly