V5: Node Event API changes

In my existing V4 based application the following methods are overridden so that specialized node types can perform application specific actions when nodes are moved/resized etc:
protected override void OnBoundsChanged( BoundsEventArgs e )
protected override void OnMove( MoveEventArgs e )
protected override void OnScale( ScaleEventArgs e )

These methods and the associated event arg classes no longer exist to my knowledge. How should I implement similar such functionality using the V5 diagramming API?

1 Reply

J. J.Nagarajan Syncfusion Team April 9, 2007 09:57 AM UTC

Hi Apolon,

Sorry for the delay in getting back to you .

The OnBoundsChanged(), OnMove() and OnScale() methods are no longer valid in v.5. You can use EventSink.NodeCollectionChanged() and EventSink.SizeChanged instead. Please refer to the following code

this.diagram.Controller.Model.EventSink.Start();
this.diagram.Controller.Model.EventSink.PinPointChanged += new PinPointChangedEventHandler(EventSink_PinPointChanged);
this.diagram.Controller.Model.EventSink.SizeChanged += new SizeChangedEventHandler(EventSink_SizeChanged);

void EventSink_PinPointChanged(PinPointChangedEventArgs evtArgs)
{
Console.WriteLine(evtArgs.NodeAffected.Name);
}

void EventSink_PinPointChanged(PinPointChangedEventArgs evtArgs)
{
Console.WriteLine(evtArgs.NodeAffected.Name);
}

Please let me know if you have any questions

Regards,
Nagaraj

Loader.
Up arrow icon