(Leadtools.Annotations.Rendering)

AddObject Method

Show in webframe




The annotation object being added.
Called by the state annotation rendering engine to add the element for this object.
Syntax
public virtual void AddObject( 
   AnnObject annObject
)
public virtual void AddObject( 
   AnnObject annObject
)

            
void addObject(AnnObject annObject);
 function Leadtools.Annotations.Rendering.AnnObjectRenderer.AddObject( 
   annObject 
)

Parameters

annObject
The annotation object being added.
Remarks

This method should be implemented by state renderers to add the equivalant element for the annotation object.

The rendering engine will call AddObject when the annotation object is first rendered to a container. The object renderer should create the equiavalant state element (such as an SVG or XAML element) for the object at this point. It is recommended to use AnnObject.StateId to store the state (or element) ID at this point inside the object.

The engine will then call Render everytime the object is changed. The object renderer can obtain the equivalant element using Leadtools.Annotations.Core.AnnObject.StateId and update it at this point.

When an annotation object is removed from the container, the rendering engine will call RemoveObject. The object renderer must then remove the object state (element) using Leadtools.Annotations.Core.AnnObject.StateId.

Implement this method only when you have a state rendering engine, such as SVG or XAML renderers. In stateless rendering engines, such as GDI+, you should implement this method but leave it empty.

Example

For an example, refer to Implementing XAML-based AnnObjectRenderer in WinRT (Windows Store).

Requirements

Target Platforms

See Also

Reference

AnnObjectRenderer Class
AnnObjectRenderer Members

 

 


Products | Support | Contact Us | Copyright Notices
© 2006-2014 All Rights Reserved. LEAD Technologies, Inc.