Sdílet prostřednictvím


SequentialWorkflowHeaderFooter.ImageRectangle Vlastnost

Definice

Získá ohraničující obdélník obrázku přidruženého k záhlaví nebo zápatí.

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

Hodnota vlastnosti

Rectangle

Ten Rectangle definuje hranice pro přidruženou Image k sadě SequentialWorkflowHeaderFooter.

Příklady

Následující příklad ukazuje, jak přepsat ImageRectangle vlastnost. V tomto příkladu ImageRectangle se vypočítá pomocí ohraničení SequentialWorkflowHeaderFooter obrázku v levém horním rohu záhlaví nebo zápatí.

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

Platí pro