Leadtools.CF Send comments on this topic. | Back to Introduction - All Topics | Help Version 17.0.6.15
DisableEvents Method
See Also 
Leadtools Namespace > RasterImage Class : DisableEvents Method



Called to disable raising the RasterImage.Changed event.

Syntax

Visual Basic (Declaration) 
Public Overridable Sub DisableEvents() 
Visual Basic (Usage)Copy Code
Dim instance As RasterImage
 
instance.DisableEvents()
C# 
public virtual void DisableEvents()
C++/CLI 
public:
virtual void DisableEvents(); 

Example

For an example, refer to RasterImage.Changed.

Remarks

The RasterImage maintains an internal count for change events. When the count is 0, the RasterImage.Changed event will be raised whenever the image changes. Calling DisableEvents will increment this internal counter and thus preventing the RasterImage.Changed from being raised.

Each call to DisableEvent should have a corresponding call to EnableEvents in order to restore the raising of events.

If you have multiple operations that change this RasterImage, it is recommended that you surround them with a pair of DisableEvents%M:Leadtools.RasterImage.EnableEvents call and then just call M:Leadtools.RasterImage.OnChanged(Leadtools.RasterImageChangedEventArgs)% once after you are done.

Requirements

Target Platforms: Microsoft .NET CF Framework 2.0, Windows Mobile 5 PocketPC, Windows Mobile 5 Smartphone, Windows Mobile 6

See Also