LEADTOOLS WinRT (Leadtools.Annotations.Automation)
LEAD Technologies, Inc

CurrentEditObject Property

Example 

Gets the current AnnObject being edited. WinRT support
Syntax
public AnnObject CurrentEditObject {get;}
 get_CurrentEditObject(); 

Property Value

The current AnnObject being edited; null if no objects are currently being edited.
Remarks

The current object being edited is the AnnObject currently "selected" where its AnnEditDesigner is currently active.

This is the object that will be processed when calling any of the object processing methods of this AnnAutomation.

You can change the CurrentEditObject by calling SelectObject or SelectObjects.

Example
 
[TestMethod]
public void AnnAutomation_CurrentEditObject()
{
   // check if an object is currently "selected"
   AnnObject currentEditObject = _automation.CurrentEditObject;
   if (currentEditObject != null)
   {
      // check if this object supports a stroke
      if (currentEditObject.SupportsStroke)
      {
         // change its stroke
         _automation.BeginUndo();
         currentEditObject.Stroke = AnnStroke.Create(AnnSolidColorBrush.Create("Blue"), LeadLengthDHelper.Create(2));
         _automation.EndUndo();
         _automation.Invalidate(LeadRectDHelper.Empty);
      }
      else
      {
         Debug.WriteLine("This object does not support stroke, select another object");
      }
   }
   else
   {
      Debug.WriteLine("Select an object first");
   }
}
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

AnnAutomation Class
AnnAutomation Members

 

 


Products | Support | Contact Us | Copyright Notices

© 2006-2012 All Rights Reserved. LEAD Technologies, Inc.