CompositeActivityDesigner.ImageRectangle 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 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
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기