Szerkesztés

Megosztás a következőn keresztül:


Label.CalcImageRenderBounds(Image, Rectangle, ContentAlignment) Method

Definition

Determines the size and location of an image drawn within the Label control based on the alignment of the control.

protected:
 System::Drawing::Rectangle CalcImageRenderBounds(System::Drawing::Image ^ image, System::Drawing::Rectangle r, System::Drawing::ContentAlignment align);
protected System.Drawing.Rectangle CalcImageRenderBounds (System.Drawing.Image image, System.Drawing.Rectangle r, System.Drawing.ContentAlignment align);
member this.CalcImageRenderBounds : System.Drawing.Image * System.Drawing.Rectangle * System.Drawing.ContentAlignment -> System.Drawing.Rectangle
Protected Function CalcImageRenderBounds (image As Image, r As Rectangle, align As ContentAlignment) As Rectangle

Parameters

image
Image

The Image used to determine size and location when drawn within the control.

r
Rectangle

A Rectangle that represents the area to draw the image in.

align
ContentAlignment

The alignment of content within the control.

Returns

A Rectangle that represents the size and location of the specified image within the control.

Remarks

You can use this method within a derived class of Label, to determine the size and location of an image to draw within the Label control based on its location within the control. The location of the image is based on the value of the control's ImageAlign property.

Applies to

See also