Label.CalcImageRenderBounds(Image, Rectangle, ContentAlignment) Method
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.
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
- align
- ContentAlignment
The alignment of content within the control.
A Rectangle that represents the size and location of the specified image within the control.
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.
Product | Versions |
---|---|
.NET Framework | 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
Windows Desktop | 3.0, 3.1, 5, 6, 7, 8, 9, 10 |
.NET feedback
.NET is an open source project. Select a link to provide feedback: