Is this page helpful?
Enables or disables whether the pointer is drawn first followed by the text or whether the text is drawn first followed by the pointer.
public bool DrawPointerFirst { get; set; }
When true the pointer of the object is drawn first followed by the text. This is the new default behavior. When false the text is drawn first followed by the pointer. This is the legacy default behavior.
To use a value other than the default, derive a class from the draw designer and set the value in the constructor of the object. Next, pass your type to the AnnAutomationObject for the AnnTextPointerObject.
using Leadtools.Annotations.Automation;
using Leadtools.Annotations.Engine;
using Leadtools.Annotations.Designers;
// Steps:
// - Create a derived class from AnnTextPointerDrawDesigner
// - In the constructor set the DrawPointerFirst property to "false"
// - Update the DrawDesignerType property for the AnnAutomationObject corresponding to the AnnTextPointerObject.
public class MyAnnTextPointerDrawDesigner : AnnTextPointerDrawDesigner
{
public MyAnnTextPointerDrawDesigner(Leadtools.Annotations.Engine.IAnnAutomationControl automationControl,
Leadtools.Annotations.Engine.AnnContainer container,
Leadtools.Annotations.Engine.AnnTextPointerObject annTextPointerObject) :
base(automationControl, container, annTextPointerObject)
{
this.DrawPointerFirst = false; //false is the Legacy default
}
}
public void DrawPointerFirst()
{
AnnAutomationManager _automationManager = new AnnAutomationManager();
_automationManager.CreateDefaultObjects();
AnnAutomationObject textPointerAutomationObject = _automationManager.FindObjectById(AnnObject.TextPointerObjectId);
textPointerAutomationObject.DrawDesignerType = typeof(MyAnnTextPointerDrawDesigner);
}