New to Telerik UI for WinForms? Start a free 30-day trial

Measures the image content of a LightVisualElement, using DPI-scaled intrinsic size or fitting the image proportionally when its layout is Zoom.

Definition

Namespace:Telerik.WinControls.UI

Assembly:Telerik.WinControls.UI.dll

Syntax:

C#
public class ImagePart : VisualElementLayoutPart, IVisualLayoutPart

Inheritance: objectVisualElementLayoutPartImagePart

Implements: IVisualLayoutPart

Inherited Members VisualElementLayoutPart.Arrange(RectangleF)VisualElementLayoutPart.MarginVisualElementLayoutPart.PaddingVisualElementLayoutPart.OwnerVisualElementLayoutPart.BoundsVisualElementLayoutPart.DesiredSize...

Constructors

Initializes the image part with the element whose image it measures.

C#
public ImagePart(LightVisualElement owner)
Parameters:ownerLightVisualElement

The element that supplies the raster or SVG image and its layout settings.

Methods

Measures the owner's raster or SVG image and limits the result to the available size.

C#
public override SizeF Measure(SizeF availableSize)
Parameters:availableSizeSizeF

The width and height available to the image part.

Returns:

SizeF

The measured image size, or an empty size when the owner has no image.

Overrides: VisualElementLayoutPart.Measure(SizeF)