LEADTOOLS Annotations for WPF and Silverlight (Leadtools.Windows.Annotations assembly) Send comments on this topic. | Back to Introduction - All Topics | Help Version 17.0.3.31
Realize Method
See Also 
Leadtools.Windows.Annotations Namespace > AnnAutomation Class : Realize Method



The Realize Method supports WPF/Silverlight.

The Realize Method is available in LEADTOOLS Document and Medical Imaging toolkits.

Draws the annotation objects inside this AnnAutomation. Supported in Silverlight, Windows Phone 7

Syntax

Visual Basic (Declaration) 
Public Overridable Sub Realize() 
Visual Basic (Usage)Copy Code
Dim instance As AnnAutomation
 
instance.Realize()
C# 
public virtual void Realize()
C++/CLI 
public:
virtual void Realize(); 

Example

This example creates a new text object and realize it into the System.Windows.Media.Imaging.BitmapSource.

Visual BasicCopy Code
Private Sub AnnAutomation_Realize(ByVal automation As AnnAutomation)
   ' make sure no objects are selected
   automation.SelectNone()
   ' add a text object and select it
   Dim text As AnnTextObject = New AnnTextObject()
   text.FontFamilyName = "Arial"
   text.FontSize = 20
   text.FontWeight = AnnFontWeight.Bold
   text.Foreground = Colors.Red
   text.Text = "Realize Text Object!"
   text.Rect = New Rect(100, 100, 200, 200)

   automation.Container.Children.Add(text)
   automation.Realize()
End Sub
C#Copy Code
private void AnnAutomation_Realize(AnnAutomation automation)
{
   // make sure no objects are selected
   automation.SelectNone();
   // add a text object and select it
   AnnTextObject text = new AnnTextObject();
   text.FontWeight = AnnFontWeight.Bold;
   text.FontFamilyName = "Arial";
   text.FontSize = 20;
   text.Foreground = Colors.Red;
   text.Rect = new Rect(100, 100, 200, 200);
   text.Text = "Realize Text Object!";

   automation.Container.Children.Add(text);
   automation.Realize();
}
SilverlightCSharpCopy Code
private void AnnAutomation_Realize(AnnAutomation automation)
{
   // make sure no objects are selected
   automation.SelectNone();
   // add a text object and select it
   AnnTextObject text = new AnnTextObject();
   text.FontWeight = AnnFontWeight.Bold;
   text.FontFamilyName = "Arial";
   text.FontSize = 20;
   text.Foreground = Colors.Red;
   text.Rect = new Rect(100, 100, 200, 200);
   text.Text = "Realize Text Object!";

   automation.Container.Children.Add(text);
   automation.Realize();
}
SilverlightVBCopy Code
Private Sub AnnAutomation_Realize(ByVal automation As AnnAutomation)
   ' make sure no objects are selected
   automation.SelectNone()
   ' add a text object and select it
   Dim text As AnnTextObject = New AnnTextObject()
   text.FontWeight = AnnFontWeight.Bold
   text.FontFamilyName = "Arial"
   text.FontSize = 20
   text.Foreground = Colors.Red
   text.Rect = New Rect(100, 100, 200, 200)
   text.Text = "Realize Text Object!"

   automation.Container.Children.Add(text)
   automation.Realize()
End Sub

Remarks

This method will draw the annotation objects inside the Container into the System.Windows.Media.Imaging.BitmapSource currently in the Leadtools.Windows.Controls.ImageViewer.

Only visible objects will be painted on the System.Windows.Media.Imaging.BitmapSource.

This method will draw the objects exactly as they would be painted in the current AnnUserMode, unless the System.Windows.Media.Imaging.BitmapSource.Format is System.Windows.Media.PixelFormats.BlackWhite.

Please note that Undo does not work for this operation.

Requirements

Target Platforms: Silverlight 3.0, Windows XP, Windows Server 2003 family, Windows Server 2008 family, Windows Vista, Windows 7, MAC OS/X (Intel Only)

See Also

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