NodeShapeOnAbsoluteBoundsChanged Method

Called when the size or location of the shape have changed.

Namespace:   Microsoft.VisualStudio.Modeling.Diagrams
Assembly:  Microsoft.VisualStudio.Modeling.Sdk.Diagrams.12.0 (in Microsoft.VisualStudio.Modeling.Sdk.Diagrams.12.0.dll)

public virtual void OnAbsoluteBoundsChanged(
	AbsoluteBoundsChangedEventArgs e
virtual void OnAbsoluteBoundsChanged(
	AbsoluteBoundsChangedEventArgs^ e
abstract OnAbsoluteBoundsChanged : 
        e:AbsoluteBoundsChangedEventArgs -> unit
override OnAbsoluteBoundsChanged : 
        e:AbsoluteBoundsChangedEventArgs -> unit
Public Overridable Sub OnAbsoluteBoundsChanged (
	e As AbsoluteBoundsChangedEventArgs



An object that specifies the old and new absolute bounds.

Override this method in your shape class, to respond to a change of shape or location. This method will be called only if the old and new values are different. Make sure that you call OnAbsoluteBoundsChanged.

  • Use this method when you want to update values that are not in the Store – that is, they are not properties of the model or diagram elements. This method is always called after the bounding box changes, even when the user invokes the Undo command.

  • If you want to respond to the change by making another change inside the model or diagram – for example to adjust the position of neighboring shapes - create a ChangeRule to observe the domain property in your shape class. In an Undo, all the in-store properties are reset by the Undo handler, and the change rule is not called. For more information, see the example in AbsoluteBoundsDomainPropertyId.

  • If you want to constrain the size or location of a shape, use .

Return to top