NodeShape.AbsoluteBoundsDomainPropertyId 필드

AbsoluteBounds 도메인 속성을 식별 하는 데 사용 되는 GUID입니다.

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

구문

‘선언
Public Shared ReadOnly AbsoluteBoundsDomainPropertyId As Guid
public static readonly Guid AbsoluteBoundsDomainPropertyId

설명

이를 사용 하는 ChangeRule 절대 범위에서 변경 내용에 응답 하.규칙 변경 규칙, 트리거는 트랜잭션 내부 수행 됩니다 일반적으로 트랜잭션이 끝나기 전에 것입니다.

예제

  // This rule responds to changes in location and size of MyShape, 
  // which is declared in DSL Definition.
  [RuleOn(typeof(MyShape))]
  public sealed class MyShapeMoveRule : ChangeRule
  {
    public override void ElementPropertyChanged(ElementPropertyChangedEventArgs e)
    {
      MyShape shape = e.ModelElement as MyShape;
      if (shape == null) return;
      if (shape.Store.InSerializationTransaction) return;
      if (!shape.IsNestedChild) return;
      if (e.DomainProperty.Id == NodeShape.AbsoluteBoundsDomainPropertyId)
      {
        shape.ParentShape.NestedChildShapes.Move(shape,
          shape.ParentShape.NestedChildShapes.Count - 1);
        // this.Diagram.NeedsRenumber should be set after
        // re-ordering the child shapes. It should also be
        // set after the user invokes Undo or Redo; but 
        // the rule is not called in Undo or Redo. 
        // So instead, we will put the NeedsRenumber call
        // in an override of OnAbsoluteBoundsChanged, which
        // is always called.
      }
    }
  }
  // Register the rule.
  partial class InstanceDiagramsDomainModel
  {
    protected override Type[] GetCustomDomainModelTypes()
    {
      List<Type> types = new List<Type>(base.GetCustomDomainModelTypes());
      types.Add(typeof(MyShapeMoveRule));
      return types.ToArray();
    }
  }

  partial class MyShape // Declared in DSL Definition
  {
    // Called even in Undo or Redo. 
    public override void OnAbsoluteBoundsChanged(AbsoluteBoundsChangedEventArgs e)
    {
      base.OnAbsoluteBoundsChanged(e);
      this.Diagram.NeedsRenumber = true;
    }
  }

.NET Framework 보안

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

참고 항목

참조

NodeShape 클래스

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

기타 리소스

변경 내용에 대한 대응 및 전파