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
AnnRectangleObject Class
See Also  Members  
Leadtools.Windows.Annotations Namespace : AnnRectangleObject Class



The AnnRectangleObject Class supports WPF/Silverlight.

The AnnRectangleObject Class is available in LEADTOOLS Document and Medical Imaging toolkits.

Defines an annotation rectangle object. Supported in Silverlight, Windows Phone 7

Object Model

AnnRectangleObject Class

Syntax

Visual Basic (Declaration) 
Public Class AnnRectangleObject 
   Inherits AnnObject
   Implements IAnnHeaderIAnnObjectIAnnRectangle 
Visual Basic (Usage)Copy Code
Dim instance As AnnRectangleObject
C# 
public class AnnRectangleObject : AnnObject, IAnnHeaderIAnnObjectIAnnRectangle  
C++/CLI 
public ref class AnnRectangleObject : public AnnObject, IAnnHeaderIAnnObjectIAnnRectangle  

Example

For XAML example, refer to AnnGroupObject.

This example creates a new rectangle object with top, left at 100, 200, width, height of 400, 600 pixels, a red stroke and a white brush and then adds it to a container.

Visual BasicCopy Code
Private Sub AnnRectangleObject_AnnRectangleObject(ByVal container As AnnContainer)
   Dim rect As AnnRectangleObject = New AnnRectangleObject()
   rect.Stroke = Colors.Red
   rect.StrokeThickness = 1.0
   rect.Fill = Colors.White
   rect.Rect = New Rect(100, 200, 400, 600)
   container.Children.Add(rect)
End Sub
C#Copy Code
private void AnnRectangleObject_AnnRectangleObject(AnnContainer container)
{
   AnnRectangleObject rect = new AnnRectangleObject();
   rect.Stroke = Colors.Red;
   rect.Fill = Colors.White;
   rect.Rect = new Rect(100, 200, 400, 600);
   rect.StrokeThickness = 1.0;
   container.Children.Add(rect);
}
SilverlightCSharpCopy Code
private void AnnRectangleObject_AnnRectangleObject(AnnContainer container)
{
   AnnRectangleObject rect = new AnnRectangleObject();
   rect.Stroke = Colors.Red;
   rect.Fill = Colors.White;
   rect.Rect = new Rect(100, 200, 400, 600);
   rect.StrokeThickness = 1.0;
   container.Children.Add(rect);
}
SilverlightVBCopy Code
Private Sub AnnRectangleObject_AnnRectangleObject(ByVal container As AnnContainer)
   Dim rect As AnnRectangleObject = New AnnRectangleObject()
   rect.Stroke = Colors.Red
   rect.Fill = Colors.White
   rect.Rect = New Rect(100, 200, 400, 600)
   rect.StrokeThickness = 1.0
   container.Children.Add(rect)
End Sub

Remarks

The rectangle annotation object is a simple rectangle, a stroke and a fill. For more information about the rectangle annotation object refer to WPF AnnRectangleObject. For more information about the automated rectangle annotation object, refer to WPF Annotation Objects - Automated Features.

Inheritance Hierarchy

System.Object
   System.Windows.Threading.DispatcherObject
      System.Windows.DependencyObject
         Leadtools.Windows.Annotations.AnnObject
            Leadtools.Windows.Annotations.AnnRectangleObject
               Leadtools.Windows.Annotations.AnnEllipseObject
               Leadtools.Windows.Annotations.AnnEncryptObject
               Leadtools.Windows.Annotations.AnnGroupObject
               Leadtools.Windows.Annotations.AnnHiliteObject
               Leadtools.Windows.Annotations.AnnImageObject
               Leadtools.Windows.Annotations.AnnRedactionObject
               Leadtools.Windows.Annotations.AnnRichTextObject
               Leadtools.Windows.Annotations.AnnRubberStampObject
               Leadtools.Windows.Annotations.AnnSelectObject
               Leadtools.Windows.Annotations.AnnTextObject

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

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