ActivityDesigner.TextRectangle Property

Definition

Gets the value of the text rectangle in logical coordinates.

C#
protected virtual System.Drawing.Rectangle TextRectangle { get; }

Property Value

A Rectangle that contains the text associated with the designer.

Examples

The following example shows how to override the TextRectangle property. In this example, the TextRectangle is calculated using the Bounds of the ActivityDesigner as well as the location and size of the ImageRectangle.

C#
protected override Rectangle TextRectangle
{
    get
    {
        return new Rectangle(
            this.Bounds.Left + 2,
            this.ImageRectangle.Bottom,
            this.Bounds.Width - 4,
            this.Bounds.Height - this.ImageRectangle.Height - 1);
    }
}

Remarks

Use to determine the location on the designer where Text will be displayed.

Applies to

Product Versions
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1