Defines an annotation rectangle object.
public class AnnRectangleObject : IAnnRectangle, AnnObject Public Class AnnRectangleObjectInherits Leadtools.Windows.Annotations.AnnObjectImplements Leadtools.Windows.Annotations.IAnnHeader, Leadtools.Windows.Annotations.IAnnObject, Leadtools.Windows.Annotations.IAnnRectangle
public ref class AnnRectangleObject : public Leadtools.Windows.Annotations.AnnObject, Leadtools.Windows.Annotations.IAnnHeader, Leadtools.Windows.Annotations.IAnnObject, Leadtools.Windows.Annotations.IAnnRectangle 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.
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.
using Leadtools.Windows.Controls;using Leadtools.Windows.Annotations;using Leadtools.Demos;using Leadtools.Help;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);}
Imports Leadtools.Windows.ControlsImports Leadtools.Windows.AnnotationsPrivate Sub AnnRectangleObject_AnnRectangleObject(ByVal container As AnnContainer)Dim rect As AnnRectangleObject = New AnnRectangleObject()rect.Stroke = Colors.Redrect.StrokeThickness = 1.0rect.Fill = Colors.Whiterect.Rect = New Rect(100, 200, 400, 600)container.Children.Add(rect)End Sub
using Leadtools.Windows.Controls;using Leadtools.Windows.Annotations;using Leadtools.Examples;//using Leadtools.Help;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);}
Imports Leadtools.Windows.ControlsImports Leadtools.Windows.AnnotationsPrivate Sub AnnRectangleObject_AnnRectangleObject(ByVal container As AnnContainer)Dim rect As AnnRectangleObject = New AnnRectangleObject()rect.Stroke = Colors.Redrect.Fill = Colors.Whiterect.Rect = New Rect(100, 200, 400, 600)rect.StrokeThickness = 1.0container.Children.Add(rect)End Sub
Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET
