ShapeElement::OnBoundsFixup Method (BoundsFixupState, Int32, Boolean)

 

Called when the bounds position and size of the parent and children are set or adjusted. Override to modify the size or internal layout.

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 OnBoundsFixup(
	BoundsFixupState fixupState,
	int iteration,
	bool createdDuringViewFixup
)

Parameters

fixupState
Type: Microsoft.VisualStudio.Modeling.Diagrams::BoundsFixupState

Indicates when this is being called.

iteration
Type: System::Int32

The number of times called on this object in this transaction. Used to avoid layout loops caused by conflicting rules. If this number exceeds a small limit, do not make further changes.

createdDuringViewFixup
Type: System::Boolean

true to indicate that a child shape was created when the elements in the view were adjusted; otherwise, false.

public override void OnBoundsFixup(DslDiagrams::BoundsFixupState fixupState, int iteration, bool createdDuringViewFixup)
{
base.OnBoundsFixup(fixupState, iteration, createdDuringViewFixup);

if(iteration == 0)
{
foreach(DslDiagrams::Decorator decorator in this.Decorators)
{
if(decorator.RequiresHost)
{
decorator.RepositionHostShape(decorator.GetHostShape(this));
}
}
}
}
Return to top
Show: