ActivityDesigner.ImageRectangle 속성

정의

디자이너와 연결된 이미지를 둘러싸는 경계의 값을 논리적 좌표로 가져옵니다.

protected:
 virtual property System::Drawing::Rectangle ImageRectangle { System::Drawing::Rectangle get(); };
protected virtual System.Drawing.Rectangle ImageRectangle { get; }
member this.ImageRectangle : System.Drawing.Rectangle
Protected Overridable ReadOnly Property ImageRectangle As Rectangle

속성 값

Rectangle 이미지입니다.

예제

다음 예제에서는 ImageRectangle 속성을 재정의하는 방법을 보여 줍니다. 이 예제에서 ImageRectangleActivityDesigner의 경계를 사용하여 계산됩니다.

protected override Rectangle ImageRectangle
{
    get
    {
        Rectangle bounds = this.Bounds;
        Size sz = new Size(24, 24);

        Rectangle imageRect = new Rectangle();
        imageRect.X = bounds.Left + ((bounds.Width - sz.Width) / 2);
        imageRect.Y = bounds.Top + 4;
        imageRect.Size = sz;

        return imageRect;
    }
}
Protected Overrides ReadOnly Property ImageRectangle() As Rectangle

    Get
        Dim Bounds As Rectangle = Me.Bounds
        Dim sz As New Size(24, 24)

        Dim imageRect As New Rectangle()
        imageRect.X = Bounds.Left + ((Bounds.Width - sz.Width) / 2)
        imageRect.Y = Bounds.Top + 4
        imageRect.Size = sz

        Return imageRect
    End Get
End Property

설명

디자이너와 연결된 이미지를 둘러싸는 사각형의 좌표를 검색하려면 ImageRectangle을 사용합니다. 커넥터를 그리거나 그래픽을 중첩시킬 때 이 좌표를 사용할 수 있습니다.

적용 대상