This class provides support for creating and managing annotation group objects.
public class AnnGroupObject : IAnnGroup, AnnRectangleObject Public Class AnnGroupObjectInherits Leadtools.Windows.Annotations.AnnRectangleObjectImplements Leadtools.Windows.Annotations.IAnnGroup, Leadtools.Windows.Annotations.IAnnHeader, Leadtools.Windows.Annotations.IAnnObject, Leadtools.Windows.Annotations.IAnnRectangle
The annotation group object contains a collection of annotation objects from any class that is derived from theAnnObject class. This collection of objects can be treated as one while they are in a group. An annotation object can be in either a container or a group but not both at the same time. For more information about grouping and ungrouping, refer to Grouping and Ungrouping WPF Annotation Objects.
This example moves all the objects from a container into a new group object.
using Leadtools.Windows.Annotations;using Leadtools.Windows.Controls;using Leadtools.Demos;using Leadtools.Help;private void AnnGroupObject_AnnGroupObject(AnnContainer container){AnnGroupObject group = new AnnGroupObject();// move the objects to the groupwhile (container.Children.Count > 0){AnnObject obj = container.Children[0] as AnnObject;container.Children.RemoveAt(0);group.Children.Add(obj);}// add the group to the containercontainer.Children.Add(group);}
Imports Leadtools.Windows.AnnotationsImports Leadtools.Windows.ControlsPrivate Sub AnnGroupObject_AnnGroupObject(ByVal container As AnnContainer)Dim group As AnnGroupObject = New AnnGroupObject()' move the objects to the groupDo While container.Children.Count > 0Dim obj As AnnObject = DirectCast(container.Children(0), AnnObject)container.Children.RemoveAt(0)group.Children.Add(obj)Loop' add the group to the containercontainer.Children.Add(group)End Sub
using Leadtools.Windows.Annotations;using Leadtools.Windows.Controls;using Leadtools.Examples;//using Leadtools.Help;private void AnnGroupObject_AnnGroupObject(AnnContainer container){AnnGroupObject group = new AnnGroupObject();// move the objects to the groupwhile (container.Children.Count > 0){AnnObject obj = container.Children[0] as AnnObject;container.Children.RemoveAt(0);group.Children.Add(obj);}// add the group to the containercontainer.Children.Add(group);}
Imports Leadtools.Windows.AnnotationsImports Leadtools.Windows.ControlsPrivate Sub AnnGroupObject_AnnGroupObject(ByVal container As AnnContainer)Dim group As AnnGroupObject = New AnnGroupObject()' move the objects to the groupDo While container.Children.Count > 0Dim obj As AnnObject = TryCast(container.Children(0), AnnObject)container.Children.RemoveAt(0)group.Children.Add(obj)Loop' add the group to the containercontainer.Children.Add(group)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
