SequentialWorkflowHeaderFooter.ImageRectangle 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得與頁首或頁尾關聯之影像的週框。
public:
virtual property System::Drawing::Rectangle ImageRectangle { System::Drawing::Rectangle get(); };
public virtual System.Drawing.Rectangle ImageRectangle { get; }
member this.ImageRectangle : System.Drawing.Rectangle
Public Overridable ReadOnly Property ImageRectangle As Rectangle
屬性值
,定義與 關聯之 的週框。
範例
下列範例將示範如何覆寫 ImageRectangle 屬性。 在此範例中,會使用 的界限來計算 以繪製頁首/頁尾左上角的影像。
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