ActivityDesigner.TextRectangle Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets the value of the text rectangle in logical coordinates.
protected:
virtual property System::Drawing::Rectangle TextRectangle { System::Drawing::Rectangle get(); };
protected virtual System.Drawing.Rectangle TextRectangle { get; }
member this.TextRectangle : System.Drawing.Rectangle
Protected Overridable ReadOnly Property TextRectangle As Rectangle
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.
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);
}
}
Protected Overrides ReadOnly Property TextRectangle() As Rectangle
Get
Return New Rectangle( _
Me.Bounds.Left + 2, _
Me.ImageRectangle.Bottom, _
Me.Bounds.Width - 4, _
Me.Bounds.Height - Me.ImageRectangle.Height - 1)
End Get
End Property
Remarks
Use to determine the location on the designer where Text will be displayed.
Applies to
GitHub에서 Microsoft와 공동 작업
이 콘텐츠의 원본은 GitHub에서 찾을 수 있으며, 여기서 문제와 끌어오기 요청을 만들고 검토할 수도 있습니다. 자세한 내용은 참여자 가이드를 참조하세요.
.NET