ActivityDesigner.Bounds 속성

정의

디자이너를 둘러싸는 사각형에 대한 값이 논리적 좌표로 들어 있는 Rectangle을 가져옵니다.

public:
 property System::Drawing::Rectangle Bounds { System::Drawing::Rectangle get(); };
public System.Drawing.Rectangle Bounds { get; }
member this.Bounds : System.Drawing.Rectangle
Public ReadOnly Property Bounds As Rectangle

속성 값

디자이너를 둘러싸는 Rectangle입니다.

예제

다음 코드 예제에서는 Bounds 속성을 사용하여 ActivityDesigner에 표시된 문자 모양의 새 경계 사각형을 결정하는 방법을 보여 줍니다.

이 코드 예제는 DesignerGlyphProvider.cs 파일에 있는 Workflow Monitor SDK 샘플의 일부입니다. 자세한 내용은 워크플로 모니터합니다.

public override Rectangle GetBounds(ActivityDesigner designer, bool activated)
{
    Rectangle imageBounds = Rectangle.Empty;
    Image image = Resources.Executing;
    if (image != null)
    {
        Size glyphSize = WorkflowTheme.CurrentTheme.AmbientTheme.GlyphSize;
        imageBounds.Location = new Point(designer.Bounds.Right - glyphSize.Width / 2, designer.Bounds.Top - glyphSize.Height / 2);
        imageBounds.Size = glyphSize;
    }
    return imageBounds;
}
Public Overrides Function GetBounds(ByVal designer As System.Workflow.ComponentModel.Design.ActivityDesigner, ByVal activated As Boolean) As System.Drawing.Rectangle
    Dim imageBounds As Rectangle = Rectangle.Empty
    Dim image As Image = AppResources.Executing
    If Not image Is Nothing Then
        Dim glyphSize As Size = WorkflowTheme.CurrentTheme.AmbientTheme.GlyphSize
        imageBounds.Location = New Point(designer.Bounds.Right - glyphSize.Width / 2, designer.Bounds.Top - glyphSize.Height / 2)
        imageBounds.Size = glyphSize
    End If
    Return imageBounds
End Function

설명

bounds 메서드로부터 반환된 사각형을 사용하여 디자이너와 선택 영역으로 둘러싸인 영역을 결정할 수 있습니다.

적용 대상

추가 정보