rc
A LeadRectD that represents the region to invalidate. If this value is LeadRectD.Empty, then the entire control area must be invalidated.
This is a helper method that calls IAnnAutomationControl.AutomationInvalidate passing rc.
using Leadtools.Annotations.Automation;using Leadtools.Annotations.Engine;using Leadtools.Codecs;using Leadtools.Controls;using Leadtools.Annotations.Rendering;using Leadtools.Annotations.WinForms;public void AnnAutomation_BeginUndo(){// first create a new undo node_automation.BeginUndo();try{// add a new rectangle objectAnnRectangleObject rectObj = new AnnRectangleObject();rectObj.Rect = LeadRectD.Create(100, 100, 800, 800);rectObj.Stroke = AnnStroke.Create(AnnSolidColorBrush.Create("Blue"), LeadLengthD.Create(1));rectObj.Fill = AnnSolidColorBrush.Create("Yellow");_automation.Container.Children.Add(rectObj);// Invalidate it_automation.Invalidate(LeadRectD.Empty);// Select this object_automation.SelectObject(rectObj);// commit the undo node_automation.EndUndo();}catch (Exception ex){// in case of errors, cancel the undo node_automation.CancelUndo();Debug.WriteLine(ex.Message);return;}Debug.WriteLine("Object has been added as is now selected. Next will call //Undo// to undo the operation");_automation.Undo();Debug.WriteLine("Operation has been undone. Next will call //Redo// to redo the operation");_automation.Redo();Debug.WriteLine("Object should be back and selected");}