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

Provides stored layout state and default measurement and arrangement behavior for a LightVisualElement content part.

Definition

Namespace:Telerik.WinControls.UI

Assembly:Telerik.WinControls.UI.dll

Syntax:

C#
public class VisualElementLayoutPart : IVisualLayoutPart

Inheritance: objectVisualElementLayoutPart

Derived Classes: ImagePartLayoutManagerPartTextPart

Implements: IVisualLayoutPart

Constructors

Initializes the layout part with the visual element whose content it represents.

C#
public VisualElementLayoutPart(LightVisualElement owner)
Parameters:ownerLightVisualElement

The element that supplies the content and layout settings for this part.

Properties

Gets the bounds last assigned by Arrange(RectangleF).

C#
public RectangleF Bounds { get; }

Implements: IVisualLayoutPart.Bounds

Gets or sets the desired size recorded by the layout part's measurement.

C#
public SizeF DesiredSize { get; set; }

Implements: IVisualLayoutPart.DesiredSize

Gets or sets the outer spacing used when a composite layout places this part.

C#
public Padding Margin { get; set; }

Implements: IVisualLayoutPart.Margin

Gets the visual element that owns this layout part.

C#
public LightVisualElement Owner { get; }

Gets or sets padding associated with the part. The built-in LayoutManagerPart does not apply this value; it uses Margin to space its image and text parts.

C#
public Padding Padding { get; set; }

Implements: IVisualLayoutPart.Padding

Methods

Stores the assigned bounds and reports their size.

C#
public virtual SizeF Arrange(RectangleF bounds)
Parameters:boundsRectangleF

The rectangle allocated to the part by its layout.

Returns:

SizeF

The size of bounds.

Implements: IVisualLayoutPart.Arrange(RectangleF)

Measures the part. The base implementation reports Empty; content-bearing subclasses override this method and update DesiredSize.

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

The width and height available to the part.

Returns:

SizeF

The desired size; empty in the base implementation.

Implements: IVisualLayoutPart.Measure(SizeF)