共用方式為


SequentialWorkflowHeaderFooter.ImageRectangle 屬性

定義

取得與頁首或頁尾關聯之影像的週框。

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

適用於