ShapeElement.OnBoundsFixup Method
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.10.0 (in Microsoft.VisualStudio.Modeling.Sdk.Diagrams.10.0.dll)
Syntax
'宣言
Public Overridable Sub OnBoundsFixup ( _
fixupState As BoundsFixupState, _
iteration As Integer, _
createdDuringViewFixup As Boolean _
)
public virtual void OnBoundsFixup(
BoundsFixupState fixupState,
int iteration,
bool createdDuringViewFixup
)
public:
virtual void OnBoundsFixup(
BoundsFixupState fixupState,
int iteration,
bool createdDuringViewFixup
)
abstract OnBoundsFixup :
fixupState:BoundsFixupState *
iteration:int *
createdDuringViewFixup:bool -> unit
override OnBoundsFixup :
fixupState:BoundsFixupState *
iteration:int *
createdDuringViewFixup:bool -> unit
public function OnBoundsFixup(
fixupState : BoundsFixupState,
iteration : int,
createdDuringViewFixup : boolean
)
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.
Examples
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));
}
}
}
}
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.