다음을 통해 공유


ShapeElement.OnBoundsFixup 메서드

부모 및 자식의 크기와 범위 위치가 설정되거나 조정되면 호출됩니다. 크기나 내부 레이아웃을 수정하도록 재정의합니다.

네임스페이스:  Microsoft.VisualStudio.Modeling.Diagrams
어셈블리:  Microsoft.VisualStudio.Modeling.Sdk.Diagrams.12.0(Microsoft.VisualStudio.Modeling.Sdk.Diagrams.12.0.dll)

구문

‘선언
Public Overridable Sub OnBoundsFixup ( _
    fixupState As BoundsFixupState, _
    iteration As Integer, _
    createdDuringViewFixup As Boolean _
)
public virtual void OnBoundsFixup(
    BoundsFixupState fixupState,
    int iteration,
    bool createdDuringViewFixup
)

매개 변수

  • iteration
    형식: System.Int32
    이 트랜잭션의 이 개체에서 호출되는 횟수입니다.충돌하는 규칙으로 인한 레이아웃 루프를 방지하기 위해 사용됩니다.이 숫자가 작게 초과될 경우 추가 변경 사항을 지정하지 마십시오.
  • createdDuringViewFixup
    형식: System.Boolean
    뷰의 요소가 조정되었을 때 자식 모양을 만들어진 것으로 지정하려면 true이고, 그렇지 않으면 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));
}
}
}
}

.NET Framework 보안

  • 직접 실행 호출자의 경우 완전히 신뢰합니다. 이 멤버는 부분적으로 신뢰할 수 있는 코드에서 사용할 수 없습니다. 자세한 내용은 부분 신뢰 코드에서 라이브러리 사용을 참조하십시오.

참고 항목

참조

ShapeElement 클래스

Microsoft.VisualStudio.Modeling.Diagrams 네임스페이스