Leadtools.Windows.Annotations Requires Document/Medical license. | Send comments on this topic. | Back to Introduction - All Topics | Help Version 16.5.9.25
AnnTextRollupObject Class
See Also  Members   Example 
Leadtools.Windows.Annotations Namespace : AnnTextRollupObject Class





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

Object Model



Syntax

Visual Basic (Declaration) 
<SerializableAttribute()>
Public Class AnnTextRollupObject 
   Inherits AnnNoteObject
   Implements IAnnTextObject 
Visual Basic (Usage)Copy Code
Dim instance As AnnTextRollupObject
C# 
[SerializableAttribute()]
public class AnnTextRollupObject : AnnNoteObject, IAnnTextObject  
C++/CLI 
[SerializableAttribute()]
public ref class AnnTextRollupObject : public AnnNoteObject, IAnnTextObject  
XAML Object Element Usage 

<AnnTextRollupObject .../>

XAML Object Element Usage 

<AnnTextRollupObject .../>

Example

This example creates a new text rollup object.

Visual BasicCopy Code
Private Sub AnnTextRollupObject_AnnTextRollupObject(ByVal viewer As BitmapSourceViewer, ByVal container As AnnContainer)
  Dim textRollup As AnnTextRollupObject = New AnnTextRollupObject()
  textRollup.Text = "My TextRollup object"
  textRollup.FontFamily = New FontFamily("Arial")
  textRollup.FontSize = 10
  textRollup.FontStyle = FontStyles.Normal
  textRollup.TextEdgeMargin = 0.0
  textRollup.ShadowBorderWidth = 6.0
    textRollup.TextHorizontalAlignment = AnnTextAlignment.Center
    textRollup.TextVerticalAlignment = AnnTextAlignment.Center
  textRollup.Left = 100
  textRollup.Top = 200
  textRollup.Width = 400
  textRollup.Height = 600
  container.Children.Add(textRollup)

  textRollup.IsExpanded = False

  MessageBox.Show("Not expanded")

  textRollup.IsExpanded = True

  MessageBox.Show("expanded")
End Sub
C#Copy Code
private void AnnTextRollupObject_AnnTextRollupObject(BitmapSourceViewer viewer, AnnContainer container) 

   AnnTextRollupObject textRollup = new AnnTextRollupObject(); 
   textRollup.Text = "My TextRollup object"; 
   textRollup.FontFamily = new FontFamily("Arial"); 
   textRollup.FontSize = 10; 
   textRollup.FontStyle = FontStyles.Normal; 
   textRollup.TextEdgeMargin = 0.0; 
   textRollup.ShadowBorderWidth = 6.0; 
   textRollup.TextHorizontalAlignment = AnnTextAlignment.Center; 
   textRollup.TextVerticalAlignment = AnnTextAlignment.Center; 
   textRollup.Left = 100; 
   textRollup.Top = 200; 
   textRollup.Width = 400; 
   textRollup.Height = 600; 
   container.Children.Add(textRollup); 
 
   textRollup.IsExpanded = false; 
 
   MessageBox.Show("Not expanded"); 
 
   textRollup.IsExpanded = true; 
 
   MessageBox.Show("expanded"); 
}
XAMLCopy Code
<Window x:Class="WPFSamples.AnnTextRollupObject" Title="Leadtools.Windows.Annotations" Height="600" Width="800" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:Leadtools_Windows_Annotations="clr-namespace:Leadtools.Windows.Annotations;assembly=Leadtools.Windows.Annotations"> 
  <Leadtools_Windows_Annotations:AnnTextRollupObject Left="100" Top="100" Width="200" Height="100" Header="TextRollup Object" Text="TextRollup Text" Fill="Blue" IsExpanded="False" /> 
</Window>

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.

Inheritance Hierarchy

System.Object
   System.Windows.Threading.DispatcherObject
      System.Windows.DependencyObject
         System.Windows.Media.Visual
            System.Windows.UIElement
               System.Windows.FrameworkElement
                  Leadtools.Windows.Annotations.AnnObjectBase
                     Leadtools.Windows.Annotations.AnnRectangleObject
                        Leadtools.Windows.Annotations.AnnTextObject
                           Leadtools.Windows.Annotations.AnnNoteObject
                              Leadtools.Windows.Annotations.AnnTextRollupObject

Requirements

Target Platforms: Microsoft .NET Framework 3.0, Windows XP, Windows Vista, and Windows Server 2003 family

See Also

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