LEADTOOLS (Leadtools assembly) Send comments on this topic. | Back to Introduction - All Topics | Help Version 17.0.3.29
DisableEvents Method
See Also 
Leadtools Namespace > RasterImage Class : DisableEvents Method



Disables raising the RasterImage.Changed event. Supported in Silverlight, Windows Phone 7

Syntax

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

Example

For an example, refer to RasterImage.Changed.

Remarks

Calling DisableEvents will increment an internal counter. When the internal counter is 0, the RasterImage.Changed events will be raised for changes to the RasterImage.

When the internal counter is != 0, RasterImage.Changed will not be raised. Therefore, for each call to DisableEvents, there should be a corresponding call to EnableEvents in order to restore the raising of events.

You can temporary disable the RasterImage.Changed event when performing multiple operations on a RasterImage object then re-enabling it once the operations are done. This way, any listeners to the RasterImage.Changed event will be notified only once thus optimizing the performance.

Requirements

Target Platforms: Silverlight, Windows XP, Windows Server 2003 family, Windows Server 2008 family, Windows Vista, Windows 7, MAC OS/X (Intel Only), Windows Phone 7

See Also