ASP.NET Pack Programmer's Guide
CancelEventArgs.cancel Property
See Also
 





Gets or sets a value indicating whether to allow the current operation.

Namespace: MindFusion.Mapping
Package: Events.js

 Syntax

JavaScript  Copy Code

Object.defineProperty(CancelEventArgs.prototype, "cancel", { value: Boolean });

 Property Value

Boolean. true to cancel the operation; otherwise, false.

 Example

The following code handles the collectionChanging event of the decorations property of a DecorationLayer. The handler receives an argument of type NotifyCollectionChangingEventArgs, which derives from CancelEventArgs:

JavaScript  Copy Code

var m = MindFusion.Mapping;

markers.decorations.collectionChanging.addEventListener(handleCollectionChanging);


function (handleCollectionChanging) (sender, args )
{
     if(args.action == m.NotifyCollectionChangedAction.Add)
     {
          args.cancel = true;
     }
}

 See Also

CancelEventArgs Members
CancelEventArgs Class
MindFusion.Mapping Namespace