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

AnnRichTextDrawDesigner Class

Example 





Members 
This class extends the AnnRectangleDrawDesigner class to provide functionality for drawing an AnnRichTextObject on an annotation container. .NET support
Object Model
AnnRichTextDrawDesigner ClassAnnContainer ClassAnnObject ClassAnnObject Class
Syntax
public class AnnRichTextDrawDesigner : AnnRectangleDrawDesigner 
'Declaration
 
Public Class AnnRichTextDrawDesigner 
   Inherits AnnRectangleDrawDesigner
'Usage
 
Dim instance As AnnRichTextDrawDesigner
public sealed class AnnRichTextDrawDesigner : AnnRectangleDrawDesigner 
function Leadtools.Windows.Annotations.AnnRichTextDrawDesigner()
public ref class AnnRichTextDrawDesigner : public AnnRectangleDrawDesigner 
Remarks

Note, in LEADTOOLS for Silverlight, AnnControlDrawDesigner is used instead of this class when drawing new AnnRichTextObject objects.

Example
Copy CodeCopy Code  
Public Function AnnRichTextDrawDesigner_AnnRichTextDrawDesigner(ByVal viewer As ImageViewer, _
  ByVal container As AnnContainer) As AnnRichTextDrawDesigner
   ' start a new rich text draw designer
   Dim richTextDrawDesigner As New AnnRichTextDrawDesigner(container)
   ' set up the object template (the rich text object)
   Dim richTextObject As New AnnRichTextObject()

   ' set up the default text to be used
   ' This is RTF text that is equals to LEADTOOLS in bold red Arial
   richTextDrawDesigner.DefaultRtf = _
      "{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset0 Arial;}" + _
      "{\f1\fnil\fcharset0 Microsoft Sans Serif;}}{\colortbl ;\red255\green0\blue0;}" + _
      "\viewkind4\uc1\pard\cf1\lang9\b\i\fs22 LEADTOOLS\cf0\lang1033\b0\i0\f1\fs17\par}"

   ' initialize the rest of the designer
   richTextDrawDesigner.ObjectTemplate = richTextObject

   Return richTextDrawDesigner
End Function
public AnnRichTextDrawDesigner AnnRichTextDrawDesigner_AnnRichTextDrawDesigner(ImageViewer viewer, AnnContainer container)
{
   // start a new rich text draw designer
   AnnRichTextDrawDesigner richTextDrawDesigner = new AnnRichTextDrawDesigner(container);
   // set up the object template (the rich text object)
   AnnRichTextObject richTextObject = new AnnRichTextObject();

   // set up the default text to be used
   richTextDrawDesigner.DefaultRtf = // This is RTF text that is equals to LEADTOOLS in bold red Arial
      @"{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset0 Arial;}" +
      @"{\f1\fnil\fcharset0 Microsoft Sans Serif;}}{\colortbl ;\red255\green0\blue0;}" +
      @"\viewkind4\uc1\pard\cf1\lang9\b\i\fs22 LEADTOOLS\cf0\lang1033\b0\i0\f1\fs17\par}";

   // initialize the rest of the designer
   richTextDrawDesigner.ObjectTemplate = richTextObject;

   return richTextDrawDesigner;
}
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

AnnRichTextDrawDesigner Members
Leadtools.Windows.Annotations Namespace

 

 


Products | Support | Contact Us | Copyright Notices

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