Occurs before an AnnObject is about to be changed.
public event EventHandler<AnnBeforeObjectChangedEventArgs> BeforeObjectChangedPublic Event BeforeObjectChanged As EventHandler(Of AnnBeforeObjectChangedEventArgs)public:event EventHandler<AnnBeforeObjectChangedEventArgs^>^ BeforeObjectChanged
The event handler receives an argument of type AnnBeforeObjectChangedEventArgs containing data related to this event. The following AnnBeforeObjectChangedEventArgs properties provide information specific to this event.
| Property | Description |
|---|---|
| Cancel | Gets or sets a value indicating whether the change should be canceled. |
| ChangeType | Gets the type of change. |
| Designer | Gets the designer responsible for the change. |
| Objects | Gets the objects that have been changed. |
This event will be fired before an AnnObject is about to be modified by this AnnAutomation.
This example will prevent changing the stroke of all annotation objects.
Imports Leadtools.Windows.ControlsImports Leadtools.Windows.AnnotationsPrivate Sub AnnAutomation_BeforeObjectChanged(ByVal manager As AnnAutomationManager)' subscribe to the BeforeObjectChanged of all automationsFor Each automation As AnnAutomation In manager.AutomationsAddHandler automation.BeforeObjectChanged, AddressOf automation_BeforeObjectChangedNext automationEnd SubPrivate Sub automation_BeforeObjectChanged(ByVal sender As Object, ByVal e As AnnBeforeObjectChangedEventArgs)' prevent changing the strokeIf e.ChangeType = AnnObjectChangedType.Stroke Thene.Cancel = TrueEnd IfEnd Sub
using Leadtools.Windows.Controls;using Leadtools.Windows.Annotations;using Leadtools.Demos;using Leadtools.Help;private void AnnAutomation_BeforeObjectChanged(AnnAutomationManager manager){// subscribe to the BeforeObjectChanged of all automationsforeach(AnnAutomation automation in manager.Automations)automation.BeforeObjectChanged += new EventHandler<AnnBeforeObjectChangedEventArgs>(automation_BeforeObjectChanged);}private void automation_BeforeObjectChanged(object sender, AnnBeforeObjectChangedEventArgs e){// prevent changing the strokeif(e.ChangeType == AnnObjectChangedType.Stroke)e.Cancel = true;}
using Leadtools.Windows.Controls;using Leadtools.Windows.Annotations;using Leadtools.Examples;using Leadtools.Silverlight.Demos;private void AnnAutomation_BeforeObjectChanged(AnnAutomationManager manager){// subscribe to the BeforeObjectChanged of all automationsforeach(AnnAutomation automation in manager.Automations)automation.BeforeObjectChanged += new EventHandler<AnnBeforeObjectChangedEventArgs>(automation_BeforeObjectChanged);}private void automation_BeforeObjectChanged(object sender, AnnBeforeObjectChangedEventArgs e){// prevent changing the strokeif(e.ChangeType == AnnObjectChangedType.Stroke)e.Cancel = true;}
Imports Leadtools.Windows.ControlsImports Leadtools.Windows.AnnotationsImports Leadtools.Silverlight.DemosPrivate Sub AnnAutomation_BeforeObjectChanged(ByVal manager As AnnAutomationManager)' subscribe to the BeforeObjectChanged of all automationsFor Each automation As AnnAutomation In manager.AutomationsAddHandler automation.BeforeObjectChanged, AddressOf automation_BeforeObjectChangedNext automationEnd SubPrivate Sub automation_BeforeObjectChanged(ByVal sender As Object, ByVal e As AnnBeforeObjectChangedEventArgs)' prevent changing the strokeIf e.ChangeType = AnnObjectChangedType.Stroke Thene.Cancel = TrueEnd IfEnd Sub
|
Products |
Support |
Feedback: BeforeObjectChanged Event - 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.