LEADTOOLS Annotations for WPF and Silverlight (Leadtools.Windows.Annotations assembly)
LEAD Technologies, Inc

AnnTextRollupObject Class

Example 





Members 
This class provides support for creating and managing text rollup annotation objects. .NET support
Object Model
AnnTextRollupObject ClassAnnBrush ClassAnnBrush Class
Syntax
public class AnnTextRollupObject : AnnNoteObject, IAnnFontIAnnHeaderIAnnObjectIAnnRectangleIAnnText  
'Declaration
 
Public Class AnnTextRollupObject 
   Inherits AnnNoteObject
   Implements IAnnFontIAnnHeaderIAnnObjectIAnnRectangleIAnnText 
'Usage
 
Dim instance As AnnTextRollupObject
public sealed class AnnTextRollupObject : IAnnFontIAnnHeaderIAnnObjectIAnnRectangleIAnnText  
function Leadtools.Windows.Annotations.AnnTextRollupObject()
public ref class AnnTextRollupObject : public AnnNoteObject, IAnnFontIAnnHeaderIAnnObjectIAnnRectangleIAnnText  
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
Copy CodeCopy Code  
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
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");
}
<Window x:Class="WPFSamples.AnnTextRollupObject"
     xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
     Title="Leadtools.Windows.Annotations" Height="600" Width="800"
     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>
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

AnnTextRollupObject Members
Leadtools.Windows.Annotations Namespace

 

 


Products | Support | Contact Us | Copyright Notices

© 2006-2012 All Rights Reserved. LEAD Technologies, Inc.