New to Telerik UI for WinFormsStart a free 30-day trial

Represents a primitive element that renders text content with advanced formatting, layout, and styling capabilities.

Definition

Namespace:Telerik.WinControls.Primitives

Assembly:Telerik.WinControls.dll

Syntax:

C#
public class TextPrimitive : BasePrimitive, IDisposable, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IStylableNode, IPrimitive, ITextProvider, ITextPrimitive

Inheritance: objectDisposableObjectRadObjectRadElementVisualElementBasePrimitiveTextPrimitive...

Derived Classes: TitleBarTextPrimitive

Implements: ICustomTypeDescriptorIDisposableINotifyPropertyChangedIPrimitiveIStylableNodeISupportSystemSkinITextPrimitiveITextProvider...

Inherited Members BasePrimitive.BoxCategoryBasePrimitive.PaintElement(IGraphics, float, SizeF)VisualElement.DefaultSizePropertyVisualElement.ForeColorPropertyVisualElement.BackColorPropertyVisualElement.FontPropertyVisualElement.SmoothingModePropertyVisualElement.OpacityPropertyVisualElement.CustomFontPropertyVisualElement.CustomFontSizePropertyVisualElement.CustomFontStylePropertyVisualElement.OnFontChanged(EventArgs)VisualElement.OnPropertyChanging(RadPropertyChangingEventArgs)VisualElement.PaintChildren(IGraphics, Rectangle, float, SizeF, bool)VisualElement.PrePaintElement(IGraphics)VisualElement.PostPaintElement(IGraphics)VisualElement.GetScaledFont(float)VisualElement.GetScaledFont(float, Font)VisualElement.DefaultSizeVisualElement.ForeColorVisualElement.BackColorVisualElement.FontVisualElement.CustomFontVisualElement.CustomFontSizeVisualElement.CustomFontStyleVisualElement.SmoothingModeVisualElement.OpacityVisualElement.FontChangedRadElement.BoundsPropertyRadElement.BorderThicknessPropertyRadElement.PaddingPropertyRadElement.MarginPropertyRadElement.AlignmentPropertyRadElement.AutoSizeModePropertyRadElement.FitToSizeModePropertyRadElement.MinSizePropertyRadElement.EnabledPropertyRadElement.CanFocusPropertyRadElement.IsItemFocusedPropertyRadElement.IsFocusedPropertyRadElement.IsMouseOverPropertyRadElement.IsMouseOverElementPropertyRadElement.IsMouseDownPropertyRadElement.ShouldPaintPropertyRadElement.VisibilityPropertyRadElement.NamePropertyRadElement.ClassPropertyRadElement.ClipDrawingPropertyRadElement.ShapePropertyRadElement.MouseClickedEventRadElement.MouseDoubleClickedEventRadElement.MouseDownEventRadElement.MouseUpEventRadElement.MouseWheelEventRadElement.ChildElementAddedEventRadElement.ParentChangedEventRadElement.BoundsChangedEventRadElement.VisibilityChangingEventRadElement.EnabledChangedEventRadElement.ControlChangedEventRadElement.BackgroundShapePropertyRadElement.BackgroundShapePaintModePropertyRadElement.ContainsFocusPropertyRadElement.ContainsMousePropertyRadElement.MaxSizePropertyRadElement.RightToLeftPropertyRadElement.AutoSizePropertyRadElement.ZIndexPropertyRadElement.AngleTransformPropertyRadElement.ScaleTransformPropertyRadElement.PositionOffsetPropertyRadElement.TagPropertyRadElement.StretchHorizontallyPropertyRadElement.StretchVerticallyPropertyRadElement.UseCompatibleTextRenderingPropertyRadElement.ClickModePropertyRadElement.styleVersionRadElement.paintSystemSkinRadElement.SetPropertyValueCommandRadElement.GetPropertyValueCommandRadElement.StylePropertyRadElement.CallCreateChildElements()RadElement.SuspendReferenceUpdate()RadElement.ResumeReferenceUpdate()RadElement.CreateChildElements()RadElement.OnLoad(bool)RadElement.LoadCore()RadElement.OnLoaded()RadElement.OnUnload(ComponentThemableElementTree, bool)RadElement.UnloadCore(ComponentThemableElementTree)RadElement.OnUnloaded(ComponentThemableElementTree)RadElement.OnElementTreeChanged(ComponentThemableElementTree)RadElement.OnBeginDispose()RadElement.SetParent(RadElement)RadElement.OnParentChanged(RadElement)RadElement.UpdateReferences(ComponentThemableElementTree, bool, bool)RadElement.ResetLayout(bool)RadElement.HasInvisibleAncestor()RadElement.ResetLayoutCore()RadElement.InvalidateArrange()RadElement.InvalidateArrange(bool)RadElement.InvalidateMeasure()RadElement.InvalidateMeasure(bool)RadElement.UpdateLayout()RadElement.SuspendLayout()RadElement.SuspendLayout(bool)RadElement.ResumeLayout(bool)RadElement.ResumeLayout(bool, bool)RadElement.Arrange(RectangleF)RadElement.Measure(SizeF)RadElement.SetBounds(Rectangle)RadElement.SetBounds(int, int, int, int)RadElement.GetBoundingRectangle(Size)RadElement.GetBoundingRectangle(Rectangle)RadElement.GetDesiredSize(bool)RadElement.PointToScreen(Point)RadElement.PointFromScreen(Point)RadElement.PointToControl(Point)RadElement.PointFromControl(Point)RadElement.LocationToControl()RadElement.RectangleToScreen(Rectangle)RadElement.HitTest(Point)RadElement.OnRenderSizeChanged(SizeChangedInfo)RadElement.OnChildDesiredSizeChanged(RadElement)RadElement.OnLayoutPropertyChanged(RadPropertyChangedEventArgs)RadElement.MeasureCore(SizeF)RadElement.ShouldArrangeChild(RadElement)RadElement.ShouldMeasureChild(RadElement)RadElement.MeasureChildren(SizeF)RadElement.GetArrangeRect(RectangleF)RadElement.CanExecuteLayoutOperation()RadElement.CalcLayoutOffset(PointF)RadElement.LockBounds()RadElement.UnlockBounds()RadElement.SetBoundsCore(Rectangle)RadElement.IsInValidState(bool)RadElement.Invalidate()RadElement.Invalidate(bool)RadElement.GetInvalidateBounds()RadElement.NotifyInvalidate(RadElement)RadElement.OnTransformationInvalidated()RadElement.PerformLayoutTransformation(ref RadMatrix)RadElement.PerformPaintTransformation(ref RadMatrix)RadElement.IsInGetAsBitmap()RadElement.PaintElementSkin(IGraphics)RadElement.PaintOverride(IGraphics, Rectangle, float, SizeF, bool)RadElement.PaintBackgroundShape(IGraphics)RadElement.PostPaintChildren(IGraphics, Rectangle, float, SizeF)RadElement.PaintChild(RadElement, IGraphics, Rectangle, float, SizeF, bool)RadElement.PaintShadow(RadElement, IGraphics)RadElement.PaintShadowCore(Graphics, Rectangle, RadItem)RadElement.GetShadowRect(ref Rectangle, int)RadElement.PaintFocusCues(IGraphics, Rectangle)RadElement.GetAsBitmap(IGraphics, Brush, float, SizeF)RadElement.GetAsTransformedBitmap(IGraphics, Brush, float, SizeF)RadElement.GetAsTransformedBitmap(Brush, float, SizeF)RadElement.GetAsTransformedBitmap(Rectangle, Brush, float, SizeF)RadElement.GetAsBitmapEx(Color, float, SizeF)RadElement.GetAsBitmapEx(Brush, float, SizeF)RadElement.GetAsBitmap(Brush, float, SizeF)RadElement.IsInVisibleClipBounds(Rectangle)RadElement.SetClipping(Graphics)RadElement.GetClipRect()RadElement.ShouldPaintChild(RadElement)RadElement.GetFocusRect()RadElement.GetCurrentShape()RadElement.GetPaintRectangle(float, float, SizeF)RadElement.GetPatchedRect(RectangleF, float, SizeF)RadElement.GetXPVisualStyle()RadElement.GetVistaVisualStyle()RadElement.InitializeSystemSkinPaint()RadElement.UnitializeSystemSkinPaint()RadElement.GetSystemSkinPaintBounds()RadElement.OnUseSystemSkinChanged(EventArgs)RadElement.ShouldPaintSystemSkin()RadElement.ComposeShouldPaintSystemSkin()RadElement.ResetStyleSettings(bool)RadElement.ResetStyleSettings(bool, RadProperty)RadElement.ProcessBehaviors(RadPropertyChangedEventArgs)RadElement.AddBehavior(PropertyChangeBehavior)RadElement.GetBehaviors()RadElement.RemoveBehavior(PropertyChangeBehavior)RadElement.ClearBehaviors()RadElement.AddRangeBehavior(PropertyChangeBehaviorCollection)RadElement.SetThemeApplied(bool)RadElement.OnStyleChanged(RadPropertyChangedEventArgs)RadElement.UnapplyStyle()RadElement.RemoveRangeBehaviors(PropertyChangeBehaviorCollection)RadElement.RemoveBehaviors(PropertyChangeBehavior)RadElement.RemoveRangeRoutedEventBehaviors(RoutedEventBehaviorCollection)RadElement.GetThemeEffectiveType()RadElement.GetChildrenByType(Type)RadElement.GetChildrenByBaseType(Type)RadElement.FindAncestorByThemeEffectiveType(Type)RadElement.FindAncestor<T>()RadElement.IsAncestorOf(RadElement)RadElement.FindDescendant<T>()RadElement.FindDescendant(Predicate<RadElement>)RadElement.FindDescendant(Type)RadElement.EnumDescendants(TreeTraversalMode)RadElement.EnumDescendants(Predicate<RadElement>, TreeTraversalMode)RadElement.EnumDescendants(Filter, TreeTraversalMode)RadElement.GetDescendants(Predicate<RadElement>, TreeTraversalMode)RadElement.GetDescendants(Filter, TreeTraversalMode)RadElement.GetAncestors(Filter)RadElement.GetAncestors(Predicate<RadElement>)RadElement.RaiseRoutedEvent(RadElement, RoutedEventArgs)RadElement.RaiseTunnelEvent(RadElement, RoutedEventArgs)RadElement.RaiseBubbleEvent(RadElement, RoutedEventArgs)RadElement.OnTunnelEvent(RadElement, RoutedEventArgs)RadElement.OnBubbleEvent(RadElement, RoutedEventArgs)RadElement.IsEventInProcess(RaisedRoutedEvent)RadElement.RegisterRoutedEvent(string, Type)RadElement.GetRegisterRoutedEvent(string, Type)RadElement.GetRegisterRoutedEvent(string, string)RadElement.GetRegisterRoutedEvent(string)RadElement.OnChildrenChanged(RadElement, ItemsChangeOperation)RadElement.GetChildren(ChildrenListOptions)RadElement.SendToBack()RadElement.BringToFront()RadElement.IsChildOf(RadElement)RadElement.Focus()RadElement.Focus(bool)RadElement.SetFocusPropertySafe(bool)RadElement.KillFocus()RadElement.OnCLREventsRise(RoutedEventArgs)RadElement.OnMouseHover(EventArgs)RadElement.OnEnabledChanged(RadPropertyChangedEventArgs)RadElement.OnParentEnabledChanged(RadPropertyChangedEventArgs)RadElement.OnMouseDown(MouseEventArgs)RadElement.OnMouseUp(MouseEventArgs)RadElement.OnLostMouseCapture(MouseEventArgs)RadElement.OnClick(EventArgs)RadElement.OnDoubleClick(EventArgs)RadElement.OnMouseEnter(EventArgs)RadElement.OnMouseLeave(EventArgs)RadElement.PerformClick()RadElement.OnMouseWheel(MouseEventArgs)RadElement.DoMouseWheel(MouseEventArgs)RadElement.DoClick(EventArgs)RadElement.DoDoubleClick(EventArgs)RadElement.IsInputKey(InputKeyEventArgs)RadElement.MouseEventArgsFromControl(MouseEventArgs)RadElement.DoMouseDown(MouseEventArgs)RadElement.DoMouseUp(MouseEventArgs)RadElement.DoMouseMove(MouseEventArgs)RadElement.ShowScreenTip(ScreenTipNeededEventArgs)RadElement.HideScreenTip()RadElement.DoMouseHover(EventArgs)RadElement.OnShowScreenTip(ComponentInputBehavior)RadElement.RaiseClick(EventArgs)RadElement.RaiseDoubleClick(EventArgs)RadElement.RaiseMouseWheel(MouseEventArgs)RadElement.UpdateContainsFocus(bool)RadElement.DoMouseEnter(EventArgs)RadElement.DoMouseLeave(EventArgs)RadElement.GetValue(RadProperty)RadElement.AddStylePropertySetting(IPropertySetting)RadElement.SetValueCore(RadPropertyValue, object, object, ValueSource)RadElement.NotifyChildren(RadPropertyChangedEventArgs)RadElement.OnBoundsChanged(RadPropertyChangedEventArgs)RadElement.OnLocationChanged(RadPropertyChangedEventArgs)RadElement.OnDisplayPropertyChanged(RadPropertyChangedEventArgs)RadElement.CanRaisePropertyChangeNotifications(RadPropertyValue)RadElement.IsPropertyCancelable(RadPropertyMetadata)RadElement.OnParentPropertyChanged(RadPropertyChangedEventArgs)RadElement.ReplaceDefaultDescriptors(PropertyDescriptorCollection)RadElement.DisposeManagedResources()RadElement.PerformDispose(bool)RadElement.DisposeChildren()RadElement.GetStylableChildrenHierarchy()RadElement.GetStylableChildren()RadElement.GetClientRectangle(SizeF)RadElement.GetBorderThickness(BorderPrimitive)RadElement.DpiScaleChanged(SizeF)RadElement.ElementStateRadElement.DesiredSizeRadElement.IsLayoutSuspendedRadElement.BoundingRectangleRadElement.ControlBoundingRectangleRadElement.BypassLayoutPoliciesRadElement.IsArrangeValidRadElement.IsMeasureValidRadElement.TreeLevelRadElement.TransformRadElement.TotalTransformRadElement.ShouldPaintUsingParentShapeRadElement.UseSystemSkinRadElement.CanHaveOwnStyleRadElement.PropagateStyleToChildrenRadElement.ThemeEffectiveTypeRadElement.ElementTreeRadElement.ChildrenRadElement.ChildrenHierarchyRadElement.ParentRadElement.RoutedEventBehaviorsRadElement.LayoutableChildrenCountRadElement.ContainsFocusRadElement.ShouldHandleMouseInputRadElement.NotifyParentOnMouseInputRadElement.IsAbleToRespondToMouseEventsRadElement.AutoSizeRadElement.BoundsRadElement.LocationRadElement.SizeRadElement.BorderThicknessRadElement.PaddingRadElement.MarginRadElement.AlignmentRadElement.AutoSizeModeRadElement.FitToSizeModeRadElement.EnabledRadElement.CanFocusRadElement.IsFocusedRadElement.IsMouseOverRadElement.IsMouseOverElementRadElement.IsMouseDownRadElement.InvalidateChildrenOnChildChangedRadElement.ShouldPaintRadElement.VisibilityRadElement.IsElementVisibleRadElement.NameRadElement.ClassRadElement.ClipDrawingRadElement.ShapeRadElement.MinSizeRadElement.MaxSizeRadElement.ZIndexRadElement.RightToLeftRadElement.UseCompatibleTextRenderingRadElement.BackgroundShapeRadElement.BackgroundShapePaintModeRadElement.ContainsMouseRadElement.CaptureRadElement.ScaleTransformRadElement.AngleTransformRadElement.PositionOffsetRadElement.SerializePropertiesRadElement.SerializeElementRadElement.SerializeChildrenRadElement.RenderingMaxFramerateRadElement.IsThemeAppliedRadElement.ShouldApplyThemeRadElement.UseCenteredAngleTransformRadElement.TagRadElement.ClickModeRadElement.DoubleClickEnabledRadElement.CaptureOnMouseDownRadElement.IsItemHoveredRadElement.StyleRadElement.ToolTipTextRadElement.AutoToolTipRadElement.ScreenTipRadElement.AutoNumberKeyTipRadElement.DpiScaleFactorRadElement.LayoutUpdatedRadElement.MouseHoverRadElement.MouseMoveRadElement.MouseDownRadElement.MouseUpRadElement.ClickRadElement.DoubleClickRadElement.MouseEnterRadElement.MouseWheelRadElement.EnabledChangedRadElement.MouseLeaveRadElement.ChildrenChangedRadElement.LostMouseCaptureRadObject.BindingContextPropertyRadObject.RadTypeRadObject.ClearPropertyStore()RadObject.SuspendPropertyNotifications()RadObject.ResumePropertyNotifications()RadObject.GetPropertyValue(RadProperty)RadObject.SetDefaultValueOverride(RadProperty, object)RadObject.SetValue(RadProperty, object)RadObject.ResetValue(RadProperty)RadObject.ResetLocalValue(RadProperty)RadObject.ResetValue(RadProperty, ValueResetFlags)RadObject.UpdateValue(RadProperty)RadObject.GetValueSource(RadProperty)RadObject.GetRegisteredRadProperty(string)RadObject.UpdateValueCore(RadPropertyValue)RadObject.ResetValueCore(RadPropertyValue, ValueResetFlags)RadObject.GetDefaultValue(RadPropertyValue, object)RadObject.CoerceValue(RadPropertyValue, object)RadObject.ShouldSerializeProperty(RadProperty)RadObject.BindProperty(RadProperty, RadObject, RadProperty, PropertyBindingOptions)RadObject.UnbindProperty(RadProperty)RadObject.GetInheritedValue(RadProperty)RadObject.OnNotifyPropertyChanged(string)RadObject.OnNotifyPropertyChanged(PropertyChangedEventArgs)RadObject.OnShouldSerializeProperty(ShouldSerializePropertyEventArgs)RadObject.PropertyValuesRadObject.PropertyFilterRadObject.RadObjectTypeRadObject.BindingContextRadObject.PropertyChangedRadObject.RadPropertyChangedRadObject.RadPropertyChangingDisposableObject.GetBitState(long)DisposableObject.SetBitState(long, bool)DisposableObject.OnBitStateChanged(long, bool, bool)DisposableObject.Dispose()DisposableObject.Dispose(bool)DisposableObject.DisposeUnmanagedResources()DisposableObject.BitStateDisposableObject.EventsDisposableObject.IsDisposingDisposableObject.IsDisposedDisposableObject.DisposedDisposableObject.Disposing...

Constructors

C#
public TextPrimitive()

Fields

C#
public static RadProperty AutoEllipsisProperty
C#
public static RadProperty DisabledTextRenderingHintProperty
C#
public static RadProperty FlipTextProperty
C#
public static RadProperty LineLimitProperty
C#
public static RadProperty MeasureTrailingSpacesProperty
C#
public static RadProperty ShadowProperty
C#
public static RadProperty ShowKeyboardCuesProperty
C#
public static RadProperty TextAlignmentProperty
C#
public static RadProperty TextOrientationProperty
C#
public static RadProperty TextProperty
C#
public static RadProperty TextRenderingHintProperty
C#
public static RadProperty TextWrapProperty
C#
public static RadProperty UseMnemonicProperty

Properties

Gets or sets a value indicating whether the additional label text is to be indicated by an ellipsis.

C#
public bool AutoEllipsis { get; set; }
Property Value:

true if the additional label text is to be indicated by an ellipsis otherwise, false. Default value is true.

Implements: ITextProvider.AutoEllipsis

C#
[Browsable(false)]
public Color CachedForeColor { get; set; }

Gets or sets the text rendering hint used when this primitive is disabled.

C#
public virtual TextRenderingHint DisabledTextRenderingHint { get; set; }
Property Value:

A TextRenderingHint value that specifies the text rendering quality for disabled state. The default value is AntiAliasGridFit.

Remarks:

This property allows for different text rendering quality when the primitive is disabled, often providing a softer appearance that visually indicates the disabled state.

C#
public bool DisableHTMLRendering { get; set; }

Gets or sets a value indicating whether the text should be flipped (mirrored) during rendering.

C#
public bool FlipText { get; set; }
Property Value:

true if the text should be flipped; otherwise, false. The default value is false.

Implements: ITextProvider.FlipText

Remarks:

Text flipping creates a mirror image of the text, which can be useful for special visual effects or when implementing right-to-left language support with custom rendering requirements. This property works in conjunction with TextOrientation for advanced text transformations.

Gets a value indicating whether this primitive contains any displayable content.

C#
public override bool IsEmpty { get; }
Property Value:

true if the Text property is null or empty; otherwise, false.

Overrides: BasePrimitive.IsEmpty

Remarks:

This property is used by the layout system and rendering engine to optimize operations by skipping empty text primitives during layout calculations and paint operations.

Gets or sets a value indicating whether text rendering is limited to a specific number of lines.

C#
public bool LineLimit { get; set; }
Property Value:

true if line limiting is enabled; otherwise, false.

Remarks:

When enabled, this property works in conjunction with other text formatting options to control the maximum number of lines displayed, providing better control over text layout in constrained spaces.

Gets or sets a value indicating whether trailing spaces at the end of each line are included in text measurement calculations.

C#
public bool MeasureTrailingSpaces { get; set; }
Property Value:

true to include trailing spaces in text measurement; otherwise, false. The default value is true.

Implements: ITextProvider.MeasureTrailingSpaces

Remarks:

By default, the boundary rectangle returned by text measurement methods excludes trailing spaces at the end of each line. Setting this property to true includes that space in measurement, which can be important for precise layout calculations and text alignment scenarios.

This property is particularly useful when working with text that needs to maintain exact spacing or when implementing custom text layout algorithms.

Gets or sets the shadow settings.

C#
[TypeConverter("Telerik.WinControls.UI.Design.ShadowSettingsConverter, Telerik.WinControls.UI.Design, Version=2026.2.702.48, Culture=neutral, PublicKeyToken=5bb2a467cbec794e")]
public ShadowSettings Shadow { get; set; }

Implements: ITextProvider.Shadow

Gets or sets a value indicating whether if the keyboard accelerators are visible.

C#
public bool ShowKeyboardCues { get; set; }
Property Value:

true if if the keyboard accelerators are visible otherwise, false.

Implements: ITextProvider.ShowKeyboardCues

Gets or sets a value indicating whether this primitive stretches horizontally within its parent layout.

C#
public override bool StretchHorizontally { get; set; }
Property Value:

true if the primitive should stretch horizontally; otherwise, false. The default value is false.

Overrides: RadElement.StretchHorizontally

Remarks:

For text primitives, horizontal stretching is typically disabled to maintain text layout integrity and prevent unwanted text spacing or alignment issues.

Gets or sets a value indicating whether this primitive stretches vertically within its parent layout.

C#
public override bool StretchVertically { get; set; }
Property Value:

true if the primitive should stretch vertically; otherwise, false. The default value is false.

Overrides: RadElement.StretchVertically

Remarks:

For text primitives, vertical stretching is typically disabled to maintain proper text positioning and prevent text from being improperly aligned within the available vertical space.

Gets or sets the text content displayed by this primitive.

C#
public string Text { get; set; }
Property Value:

A string containing the text to display. Returns an empty string if the value is null.

Implements: ITextProvider.Text

Remarks:

The text property supports various formatting features including mnemonics (ampersand characters), HTML rendering capabilities, and automatic layout adjustments based on the available space.

Setting this property automatically triggers layout invalidation and may enable HTML rendering if the text contains HTML markup and HTML rendering is not explicitly disabled.

Gets or sets the text alignment within the primitive's bounds.

C#
public ContentAlignment TextAlignment { get; set; }
Property Value:

A ContentAlignment value that specifies how text is aligned within the available space. The default value is MiddleLeft.

Implements: ITextProvider.TextAlignment

Remarks:

This property controls both horizontal and vertical text alignment. Common values include TopLeft, MiddleCenter, and BottomRight among others, providing flexible text positioning within the primitive's layout bounds.

Gets or sets the text orientation for rendering.

C#
public Orientation TextOrientation { get; set; }
Property Value:

An Orientation value that specifies whether text is rendered horizontally or vertically. The default value is Horizontal.

Implements: ITextProvider.TextOrientation

Remarks:

When set to Vertical, the text is rotated 90 degrees counterclockwise. This property is useful for creating vertical labels, headers, or other UI elements that require rotated text display.

Gets or sets the text rendering hint that controls the quality and appearance of text rendering.

C#
public virtual TextRenderingHint TextRenderingHint { get; set; }
Property Value:

A TextRenderingHint value that specifies the text rendering quality. The default value is SystemDefault.

Remarks:

This property determines the quality of text rendering, affecting anti-aliasing, hinting, and overall text appearance. Use AntiAlias for smooth text rendering or ClearTypeGridFit for optimal LCD display quality.

Gets or sets a value indicating whether the text should wrapped to the available layout rectangle.

C#
public bool TextWrap { get; set; }
Property Value:

true if the text should wrapped to the available layout rectangle otherwise, false.

Implements: ITextProvider.TextWrap

Gets or sets a value indicating whether the control interprets an ampersand character (&) in the control's Text property to be an access key prefix character.

C#
public bool UseMnemonic { get; set; }
Property Value:

true if the label doesn't display the ampersand character and underlines the character after the ampersand in its displayed text and treats the underlined character as an access key; otherwise, false if the ampersand character is displayed in the text of the control. The default is true.

Implements: ITextProvider.UseMnemonic

Methods

C#
public bool AllowHTMLRendering()
Returns:

bool

Performs the core arrangement logic for the element within the specified final rectangle.

C#
protected override void ArrangeCore(RectangleF finalRect)
Parameters:finalRectRectangleF

The final rectangular area allocated for this element.

Overrides: RadElement.ArrangeCore(RectangleF)

Arranges the RadElement to its final location. The element must call the Arrange method of each of its children.

C#
protected override SizeF ArrangeOverride(SizeF finalSize)
Parameters:finalSizeSizeF

The size that is available for element.

Returns:

SizeF

The rectangle occupied by the element. Usually finalSize. Should you return different size, the Layout system will restart measuring and rearranging the items. That could lead to infinite recursion.

Overrides: RadElement.ArrangeOverride(SizeF)

Remarks:

In this method call to the Arrange method of each child must be made.

C#
public StringFormat CreateStringFormat()
Returns:

StringFormat

C#
protected virtual TextParams CreateTextParams()
Returns:

TextParams

C#
public RectangleF GetFaceRectangle()
Returns:

RectangleF

Implements: ITextProvider.GetFaceRectangle()

Gets the IFilter instance that may be used to filter the properties, treated as Stylable for this element.

C#
public override Filter GetStylablePropertiesFilter()
Returns:

Filter

Overrides: RadElement.GetStylablePropertiesFilter()

C#
public SizeF GetTextSize()
Returns:

SizeF

C#
public SizeF GetTextSize(SizeF proposedSize, TextParams textParams)
Parameters:proposedSizeSizeFtextParamsTextParamsReturns:

SizeF

Implements: ITextPrimitive.GetTextSize(SizeF, TextParams)

C#
public SizeF GetTextSize(SizeF proposedSize)
Parameters:proposedSizeSizeFReturns:

SizeF

C#
public SizeF GetTextSize(TextParams textParams)
Parameters:textParamsTextParamsReturns:

SizeF

Implements: ITextPrimitive.GetTextSize(TextParams)

Initializes member fields to their default values. This method is called prior the CreateChildItems one and allows for initialization of members on which child elements depend.

C#
protected override void InitializeFields()

Overrides: BasePrimitive.InitializeFields()

C#
public SizeF MeasureOverride(SizeF availableSize, TextParams textParams)
Parameters:availableSizeSizeFtextParamsTextParamsReturns:

SizeF

Implements: ITextPrimitive.MeasureOverride(SizeF, TextParams)

Measures the space required by the RadElement

Used by the layout system.

C#
protected override SizeF MeasureOverride(SizeF availableSize)
Parameters:availableSizeSizeF

The size that is available to the RadElement. The available size can be infinity (to take the full size of the element)

Returns:

SizeF

The minimum size required by the element to be completely visible. Cannot be infinity.

Overrides: RadElement.MeasureOverride(SizeF)

Remarks:

In this method call to the Measure method of each child must be made.

C#
protected override void OnMouseMove(MouseEventArgs e)
Parameters:eMouseEventArgs

Overrides: RadElement.OnMouseMove(MouseEventArgs)

C#
public void OnMouseMove(object sender, MouseEventArgs e)
Parameters:senderobjecteMouseEventArgs

Implements: ITextPrimitive.OnMouseMove(object, MouseEventArgs)

Called when a property value has changed, allowing for custom response to property changes.

C#
protected override void OnPropertyChanged(RadPropertyChangedEventArgs e)
Parameters:eRadPropertyChangedEventArgs

The property changed event arguments.

Overrides: VisualElement.OnPropertyChanged(RadPropertyChangedEventArgs)

C#
public void PaintPrimitive(IGraphics graphics, float angle, SizeF scale, TextParams textParams)
Parameters:graphicsIGraphicsanglefloatscaleSizeFtextParamsTextParams

Implements: ITextPrimitive.PaintPrimitive(IGraphics, float, SizeF, TextParams)

Draws the primitive on the screen.

C#
public override void PaintPrimitive(IGraphics graphics, float angle, SizeF scale)
Parameters:graphicsIGraphicsanglefloatscaleSizeF

Overrides: BasePrimitive.PaintPrimitive(IGraphics, float, SizeF)

C#
public void PaintPrimitive(IGraphics graphics, TextParams textParams)
Parameters:graphicsIGraphicstextParamsTextParams

Implements: ITextPrimitive.PaintPrimitive(IGraphics, TextParams)

C#
public void ToggleHTML(string text)
Parameters:textstring

Returns the text as a string.

C#
public override string ToString()
Returns:

string

Overrides: RadElement.ToString()