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

Measures the text content of a LightVisualElement for composite layout.

Definition

Namespace:Telerik.WinControls.UI

Assembly:Telerik.WinControls.UI.dll

Syntax:

C#
public class TextPart : VisualElementLayoutPart, IVisualLayoutPart

Inheritance: objectVisualElementLayoutPartTextPart

Implements: IVisualLayoutPart

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

Constructors

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

C#
public TextPart(LightVisualElement owner)
Parameters:ownerLightVisualElement

The element that provides text, formatting, and measurement behavior.

Methods

Measures the owner's text when text drawing is enabled and clamps the result to the available size.

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

The width and height available to the text part.

Returns:

SizeF

The measured text size, or an empty size when the owner does not draw text.

Overrides: VisualElementLayoutPart.Measure(SizeF)