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
Syntax
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 Basic | Copy 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);
} |
SilverlightCSharp | 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);
} |
SilverlightVB | Copy 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
Inheritance Hierarchy
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