Cancels the operation currently being performed in this AnnAutomation
public virtual void Cancel()Public Overridable Sub Cancel()public:virtual void Cancel();
Cancels any operations currently being performed in this AnnAutomation. An operation can be:
This example cancels the drawing of new objects when the mouse is over a certain area on the viewer.
Imports Leadtools.Windows.ControlsImports Leadtools.Windows.AnnotationsPrivate Sub AnnAutomation_Cancel()' subclass to the viewer mouse move event' _automation is an AnnAutomation objectAddHandler _automation.Container.MouseMove, AddressOf Container_MouseMoveEnd SubPrivate Sub Container_MouseMove(ByVal sender As Object, ByVal e As MouseEventArgs)' check if we have a draw designer currently selectedIf Not _automation.CurrentDesigner Is Nothing AndAlso TypeOf _automation.CurrentDesigner Is AnnDrawDesigner Then' check if we are over the rectangle 100,100 to 200,200Dim rc As Rect = New Rect(100, 100, 100, 100)If rc.Contains(e.GetPosition(_automation.Container)) Then_automation.Cancel()End IfEnd IfEnd Sub
using Leadtools.Windows.Controls;using Leadtools.Windows.Annotations;using Leadtools.Demos;using Leadtools.Help;private void AnnAutomation_Cancel(){// subclass to the viewer mouse move event// _automation is an AnnAutomation object_automation.Container.MouseMove += new MouseEventHandler(Container_MouseMove);}private void Container_MouseMove(object sender, MouseEventArgs e){// check if we have a draw designer currently selectedif(_automation.CurrentDesigner != null && _automation.CurrentDesigner is AnnDrawDesigner){// check if we are over the rectangle 100,100 to 200,200Rect rc = new Rect(100, 100, 100, 100);if(rc.Contains(e.GetPosition(_automation.Container)))_automation.Cancel();}}
using Leadtools.Windows.Controls;using Leadtools.Windows.Annotations;using Leadtools.Examples;using Leadtools.Silverlight.Demos;private void AnnAutomation_Cancel(){// subclass to the viewer mouse move event// _automation is an AnnAutomation object_automation.Container.MouseMove += new MouseEventHandler(Container_MouseMove);}private void Container_MouseMove(object sender, MouseEventArgs e){// check if we have a draw designer currently selectedif(_automation.CurrentDesigner != null && _automation.CurrentDesigner is AnnDrawDesigner){// check if we are over the rectangle 100,100 to 200,200Rect rc = new Rect(100, 100, 100, 100);if(rc.Contains(e.GetPosition(_automation.Container)))_automation.Cancel();}}
Imports Leadtools.Windows.ControlsImports Leadtools.Windows.AnnotationsImports Leadtools.Silverlight.DemosPrivate Sub AnnAutomation_Cancel()' subclass to the viewer mouse move event' _automation is an AnnAutomation objectAddHandler _automation.Container.MouseMove, AddressOf Container_MouseMoveEnd SubPrivate Sub Container_MouseMove(ByVal sender As Object, ByVal e As MouseEventArgs)' check if we have a draw designer currently selectedIf Not _automation.CurrentDesigner Is Nothing AndAlso TypeOf _automation.CurrentDesigner Is AnnDrawDesigner Then' check if we are over the rectangle 100,100 to 200,200Dim rc As Rect = New Rect(100, 100, 100, 100)If rc.Contains(e.GetPosition(_automation.Container)) Then_automation.Cancel()End IfEnd IfEnd Sub
|
Products |
Support |
Feedback: Cancel Method (AnnAutomation) - Leadtools.Windows.Annotations |
Introduction |
Help Version 19.0.2017.3.22
|

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
Your email has been sent to support! Someone should be in touch! If your matter is urgent please come back into chat.
Chat Hours:
Monday - Friday, 8:30am to 6pm ET
Thank you for your feedback!
Please fill out the form again to start a new chat.
All agents are currently offline.
Chat Hours:
Monday - Friday
8:30AM - 6PM EST
To contact us please fill out this form and we will contact you via email.