Edit

Share via


SequentialWorkflowRootDesigner.ImageRectangle Property

Definition

Gets the value for the enclosing bounds of the image associated with the designer in logical coordinates.

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

Property Value

A Rectangle that encloses the Image displayed for the CompositeActivityDesigner.

Examples

The following example shows how to override the ImageRectangle property. In this example, the ImageRectangle is calculated using the Bounds of the CompositeActivityDesigner.

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

Remarks

Use the ImageRectangle to retrieve the coordinates for the rectangle that encloses the image associated with the designer. You can use these coordinates for drawing connectors or overlaying graphics.

Applies to