skip navigation
  • Product Bundles

    DevCraft

    All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:

    • AI Coding Assistants
    • Embedded Reporting
    • Document Processing Libraries
    • SSO Account Sign-in

    Web

    Kendo UI UI for Angular UI for Vue UI for jQuery KendoReact UI for Blazor UI for ASP.NET Core UI for ASP.NET MVC UI for ASP.NET AJAX

    Mobile

    UI for .NET MAUI

    Document Management

    Telerik Document Processing

    Desktop

    UI for .NET MAUI UI for WinUI UI for WinForms UI for WPF

    Reporting

    Telerik Reporting Telerik Report Server

    Testing & Mocking

    Test Studio Telerik JustMock

    CMS

    Sitefinity

    AI Productivity Tools

    AI Coding Assistants

    UI/UX Tools

    ThemeBuilder Design System Kit Templates and Building Blocks

    Debugging

    Fiddler Fiddler Everywhere Fiddler Classic Fiddler Everywhere Reporter FiddlerCore

    Free Tools

    KendoReact Free VB.NET to C# Converter Testing Framework
    View all products
  • Overview
  • Demos
    • What's New
    • Roadmap
    • Release History
  • Support and Learning

    • Support and Learning Hub
    • First Steps
    • Docs
    • Demos
    • Virtual Classroom
    • Forums
    • Videos
    • Blogs
    • Accessibility
    • Submit a Ticket

    Productivity and Design Tools

    • Visual Studio Extensions
    • Visual Studio Templates
    • Embedded Reporting
  • Pricing
  • Shopping cart
    • Account Overview
    • Your Licenses
    • Downloads
    • Support Center
    • Forum Profile
    • Payment Methods
    • Edit Profile
    • Log out
  • Login
  • Contact Us
  • Try now

Class TextPrimitive

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

Inheritance
System.Object
DisposableObject
RadObject
RadElement
VisualElement
BasePrimitive
TextPrimitive
TitleBarTextPrimitive
Inherited Members
BasePrimitive.BoxCategory
BasePrimitive.PaintElement(IGraphics, Single, SizeF)
VisualElement.DefaultSizeProperty
VisualElement.ForeColorProperty
VisualElement.BackColorProperty
VisualElement.FontProperty
VisualElement.SmoothingModeProperty
VisualElement.OpacityProperty
VisualElement.CustomFontProperty
VisualElement.CustomFontSizeProperty
VisualElement.CustomFontStyleProperty
VisualElement.OnFontChanged(EventArgs)
VisualElement.OnPropertyChanging(RadPropertyChangingEventArgs)
VisualElement.PaintChildren(IGraphics, Rectangle, Single, SizeF, Boolean)
VisualElement.PrePaintElement(IGraphics)
VisualElement.PostPaintElement(IGraphics)
VisualElement.GetScaledFont(Single)
VisualElement.GetScaledFont(Single, Font)
VisualElement.DefaultSize
VisualElement.ForeColor
VisualElement.BackColor
VisualElement.Font
VisualElement.CustomFont
VisualElement.CustomFontSize
VisualElement.CustomFontStyle
VisualElement.SmoothingMode
VisualElement.Opacity
VisualElement.FontChanged
RadElement.BoundsProperty
RadElement.BorderThicknessProperty
RadElement.PaddingProperty
RadElement.MarginProperty
RadElement.AlignmentProperty
RadElement.AutoSizeModeProperty
RadElement.FitToSizeModeProperty
RadElement.MinSizeProperty
RadElement.EnabledProperty
RadElement.CanFocusProperty
RadElement.IsItemFocusedProperty
RadElement.IsFocusedProperty
RadElement.IsMouseOverProperty
RadElement.IsMouseOverElementProperty
RadElement.IsMouseDownProperty
RadElement.ShouldPaintProperty
RadElement.VisibilityProperty
RadElement.NameProperty
RadElement.ClassProperty
RadElement.ClipDrawingProperty
RadElement.ShapeProperty
RadElement.MouseClickedEvent
RadElement.MouseDoubleClickedEvent
RadElement.MouseDownEvent
RadElement.MouseUpEvent
RadElement.MouseWheelEvent
RadElement.ChildElementAddedEvent
RadElement.ParentChangedEvent
RadElement.BoundsChangedEvent
RadElement.VisibilityChangingEvent
RadElement.EnabledChangedEvent
RadElement.ControlChangedEvent
RadElement.BackgroundShapeProperty
RadElement.BackgroundShapePaintModeProperty
RadElement.ContainsFocusProperty
RadElement.ContainsMouseProperty
RadElement.IsEditedInSpyProperty
RadElement.MaxSizeProperty
RadElement.RightToLeftProperty
RadElement.AutoSizeProperty
RadElement.ZIndexProperty
RadElement.AngleTransformProperty
RadElement.ScaleTransformProperty
RadElement.PositionOffsetProperty
RadElement.TagProperty
RadElement.StretchHorizontallyProperty
RadElement.StretchVerticallyProperty
RadElement.UseCompatibleTextRenderingProperty
RadElement.ClickModeProperty
RadElement.styleVersion
RadElement.paintSystemSkin
RadElement.TraceInvalidation
RadElement.SetPropertyValueCommand
RadElement.GetPropertyValueCommand
RadElement.RadElementLastStateKey
RadElement.StyleProperty
RadElement.CallCreateChildElements()
RadElement.SuspendReferenceUpdate()
RadElement.ResumeReferenceUpdate()
RadElement.CreateChildElements()
RadElement.OnLoad(Boolean)
RadElement.CallOnLoad(Boolean)
RadElement.LoadCore()
RadElement.OnLoaded()
RadElement.OnUnload(ComponentThemableElementTree, Boolean)
RadElement.UnloadCore(ComponentThemableElementTree)
RadElement.OnUnloaded(ComponentThemableElementTree)
RadElement.OnElementTreeChanged(ComponentThemableElementTree)
RadElement.OnBeginDispose()
RadElement.SetParent(RadElement)
RadElement.OnParentChanged(RadElement)
RadElement.UpdateReferences(ComponentThemableElementTree, Boolean, Boolean)
RadElement.SetIsDesignMode(Boolean, Boolean)
RadElement.ChangeCollection(RadElement, ItemsChangeOperation)
RadElement.ResetLayout(Boolean)
RadElement.HasInvisibleAncestor()
RadElement.ResetLayoutCore()
RadElement.SetAllLocalValuesAsDefault(Boolean)
RadElement.InvalidateArrange()
RadElement.InvalidateArrange(Boolean)
RadElement.InvalidateMeasure()
RadElement.InvalidateMeasure(Boolean)
RadElement.UpdateLayout()
RadElement.SuspendLayout()
RadElement.SuspendLayout(Boolean)
RadElement.ResumeLayout(Boolean)
RadElement.ResumeLayout(Boolean, Boolean)
RadElement.Arrange(RectangleF)
RadElement.Measure(SizeF)
RadElement.SetBounds(Rectangle)
RadElement.SetBounds(Int32, Int32, Int32, Int32)
RadElement.GetBoundingRectangle(Size)
RadElement.GetBoundingRectangle(Rectangle)
RadElement.GetDesiredSize(Boolean)
RadElement.PointToScreen(Point)
RadElement.PointFromScreen(Point)
RadElement.PointToControl(Point)
RadElement.PointFromControl(Point)
RadElement.LocationToControl()
RadElement.RectangleToScreen(Rectangle)
RadElement.HitTest(Point)
RadElement.CallOnRenderSizeChanged(SizeChangedInfo)
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(Boolean)
RadElement.GetScrollingOffset()
RadElement.Invalidate()
RadElement.Invalidate(Boolean)
RadElement.GetInvalidateBounds()
RadElement.NotifyInvalidate(RadElement)
RadElement.OnTransformationInvalidated()
RadElement.InvalidateTransformations()
RadElement.PerformLayoutTransformation(RadMatrix)
RadElement.PerformPaintTransformation(RadMatrix)
RadElement.IsInGetAsBitmap()
RadElement.PaintElementSkin(IGraphics)
RadElement.PaintOverride(IGraphics, Rectangle, Single, SizeF, Boolean)
RadElement.Paint(IGraphics, Rectangle, Single, SizeF, Boolean)
RadElement.PaintBackgroundShape(IGraphics)
RadElement.PostPaintChildren(IGraphics, Rectangle, Single, SizeF)
RadElement.PaintChild(RadElement, IGraphics, Rectangle, Single, SizeF, Boolean)
RadElement.PaintShadow(RadElement, IGraphics)
RadElement.PaintShadowCore(Graphics, Rectangle, RadItem)
RadElement.GetShadowRect(Rectangle, Int32)
RadElement.PaintFocusCues(IGraphics, Rectangle)
RadElement.GetAsBitmap(IGraphics, Brush, Single, SizeF)
RadElement.GetAsTransformedBitmap(IGraphics, Brush, Single, SizeF)
RadElement.GetAsTransformedBitmap(Brush, Single, SizeF)
RadElement.GetAsTransformedBitmap(Rectangle, Brush, Single, SizeF)
RadElement.GetAsBitmapEx(Color, Single, SizeF)
RadElement.GetAsBitmapEx(Brush, Single, SizeF)
RadElement.GetAsBitmap(Brush, Single, SizeF)
RadElement.IsInVisibleClipBounds(Rectangle)
RadElement.SetClipping(Graphics)
RadElement.GetClipRect()
RadElement.ShouldPaintChild(RadElement)
RadElement.GetFocusRect()
RadElement.GetCurrentShape()
RadElement.GetPaintRectangle(Single, Single, SizeF)
RadElement.GetPatchedRect(RectangleF, Single, SizeF)
RadElement.GetXPVisualStyle()
RadElement.GetVistaVisualStyle()
RadElement.InitializeSystemSkinPaint()
RadElement.UnitializeSystemSkinPaint()
RadElement.GetSystemSkinPaintBounds()
RadElement.OnUseSystemSkinChanged(EventArgs)
RadElement.ShouldPaintSystemSkin()
RadElement.ComposeShouldPaintSystemSkin()
RadElement.MapStyleProperty(RadProperty, String)
RadElement.ResetStyleSettings(Boolean)
RadElement.ResetStyleSettings(Boolean, RadProperty)
RadElement.ProcessBehaviors(RadPropertyChangedEventArgs)
RadElement.AddBehavior(PropertyChangeBehavior)
RadElement.GetBehaviors()
RadElement.RemoveBehavior(PropertyChangeBehavior)
RadElement.ClearBehaviors()
RadElement.AddRangeBehavior(PropertyChangeBehaviorCollection)
RadElement.SetThemeApplied(Boolean)
RadElement.OnStyleChanged(RadPropertyChangedEventArgs)
RadElement.SuspendThemeRefresh()
RadElement.ResumeThemeRefresh()
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.GetChildAt(Int32)
RadElement.IsChildOf(RadElement)
RadElement.Focus()
RadElement.Focus(Boolean)
RadElement.SetFocusPropertySafe(Boolean)
RadElement.SetElementFocused(Boolean)
RadElement.KillFocus()
RadElement.SetFocus()
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.CallDoMouseWheel(MouseEventArgs)
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.UpdateContainsMouse()
RadElement.UpdateContainsFocus(Boolean)
RadElement.DoMouseEnter(EventArgs)
RadElement.DoMouseLeave(EventArgs)
RadElement.CallDoMouseDown(MouseEventArgs)
RadElement.CallDoMouseUp(MouseEventArgs)
RadElement.CallDoMouseMove(MouseEventArgs)
RadElement.CallDoMouseHover(EventArgs)
RadElement.CallDoMouseEnter(EventArgs)
RadElement.CallDoMouseLeave(EventArgs)
RadElement.CallDoClick(EventArgs)
RadElement.CallDoDoubleClick(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(Boolean)
RadElement.DisposeChildren()
RadElement.ResetUseCompatibleTextRendering()
RadElement.ShouldSerializeUseCompatibleTextRendering()
RadElement.IStylableNode.GetThemeEffectiveType()
RadElement.IStylableNode.ApplySettings(PropertySettingGroup)
RadElement.GetStylableChildrenHierarchy()
RadElement.GetStylableChildren()
RadElement.ResetStyleVersion()
RadElement.GetClientRectangle(SizeF)
RadElement.GetBorderThickness(BorderPrimitive)
RadElement.DpiScaleChanged(SizeF)
RadElement.ElementState
RadElement.LayoutManager
RadElement.DesiredSize
RadElement.IsLayoutSuspended
RadElement.BoundingRectangle
RadElement.ControlBoundingRectangle
RadElement.BypassLayoutPolicies
RadElement.IsArrangeValid
RadElement.IsMeasureValid
RadElement.PreviousArrangeRect
RadElement.PreviousConstraint
RadElement.TreeLevel
RadElement.Transform
RadElement.TotalTransform
RadElement.ShouldPaintUsingParentShape
RadElement.UseSystemSkin
RadElement.VsbVisible
RadElement.CanHaveOwnStyle
RadElement.PropagateStyleToChildren
RadElement.ThemeEffectiveType
RadElement.ElementTree
RadElement.Children
RadElement.ChildrenHierarchy
RadElement.Parent
RadElement.RoutedEventBehaviors
RadElement.LayoutableChildrenCount
RadElement.ContainsFocus
RadElement.ShouldHandleMouseInput
RadElement.NotifyParentOnMouseInput
RadElement.IsAbleToRespondToMouseEvents
RadElement.AutoSize
RadElement.Bounds
RadElement.Location
RadElement.Size
RadElement.BorderThickness
RadElement.Padding
RadElement.Margin
RadElement.Alignment
RadElement.AutoSizeMode
RadElement.FitToSizeMode
RadElement.Enabled
RadElement.CanFocus
RadElement.IsFocused
RadElement.IsMouseOver
RadElement.IsMouseOverElement
RadElement.IsMouseDown
RadElement.InvalidateChildrenOnChildChanged
RadElement.ShouldPaint
RadElement.Visibility
RadElement.IsElementVisible
RadElement.Name
RadElement.Class
RadElement.ClipDrawing
RadElement.Shape
RadElement.MinSize
RadElement.MaxSize
RadElement.ZIndex
RadElement.RightToLeft
RadElement.UseCompatibleTextRendering
RadElement.BackgroundShape
RadElement.BackgroundShapePaintMode
RadElement.ContainsMouse
RadElement.Capture
RadElement.ScaleTransform
RadElement.AngleTransform
RadElement.PositionOffset
RadElement.SerializeProperties
RadElement.SerializeElement
RadElement.SerializeChildren
RadElement.RenderingMaxFramerate
RadElement.IsThemeApplied
RadElement.ShouldApplyTheme
RadElement.UseCenteredAngleTransform
RadElement.Tag
RadElement.ClickMode
RadElement.DoubleClickEnabled
RadElement.CaptureOnMouseDown
RadElement.IsFocusable
RadElement.IsItemHovered
RadElement.IStylableNode.Parent
RadElement.IStylableNode.ChildrenHierarchy
RadElement.IStylableNode.Children
RadElement.IStylableNode.Class
RadElement.Style
RadElement.ToolTipText
RadElement.AutoToolTip
RadElement.ScreenTip
RadElement.AutoNumberKeyTip
RadElement.MeasureIsDirty
RadElement.ArrangeIsDirty
RadElement.NeverMeasured
RadElement.NeverArranged
RadElement.ArrangeInProgress
RadElement.MeasureInProgress
RadElement.ShouldPaintChildren
RadElement.InvalidateMeasureOnRemove
RadElement.HideFromElementHierarchyEditor
RadElement.DpiScaleFactor
RadElement.LayoutUpdated
RadElement.ElementPainted
RadElement.MouseHover
RadElement.MouseMove
RadElement.MouseDown
RadElement.MouseUp
RadElement.Click
RadElement.DoubleClick
RadElement.MouseEnter
RadElement.MouseWheel
RadElement.EnabledChanged
RadElement.MouseLeave
RadElement.ChildrenChanged
RadElement.LostMouseCapture
RadObject.BindingContextProperty
RadObject.RadType
RadObject.ClearPropertyStore()
RadObject.SuspendPropertyNotifications()
RadObject.ResumePropertyNotifications()
RadObject.GetPropertyValue(RadProperty)
RadObject.SetDefaultValueOverride(RadProperty, Object)
RadObject.SetValueAtDesignTime(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(PropertyDescriptor)
RadObject.ShouldSerializeProperty(RadProperty)
RadObject.BindProperty(RadProperty, RadObject, RadProperty, PropertyBindingOptions)
RadObject.UnbindProperty(RadProperty)
RadObject.RemoveStylePropertySetting(IPropertySetting)
RadObject.RemoveStylePropertySetting(RadProperty)
RadObject.GetInheritedValue(RadProperty)
RadObject.OnNotifyPropertyChanged(String)
RadObject.OnNotifyPropertyChanged(PropertyChangedEventArgs)
RadObject.OnShouldSerializeProperty(ShouldSerializePropertyEventArgs)
RadObject.PropertyValues
RadObject.IsDesignMode
RadObject.PropertyFilter
RadObject.RadObjectType
RadObject.BindingContext
RadObject.PropertyChanged
RadObject.RadPropertyChanged
RadObject.RadPropertyChanging
RadObject.ShouldSerializePropertyHandler
DisposableObject.GetBitState(Int64)
DisposableObject.SetBitState(Int64, Boolean)
DisposableObject.OnBitStateChanged(Int64, Boolean, Boolean)
DisposableObject.Dispose()
DisposableObject.Dispose(Boolean)
DisposableObject.DisposeUnmanagedResources()
DisposableObject.BitState
DisposableObject.Events
DisposableObject.IsDisposing
DisposableObject.IsDisposed
DisposableObject.Disposed
DisposableObject.Disposing
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Telerik.WinControls.Primitives
Assembly: Telerik.WinControls.dll

Syntax

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

TextPrimitive is the primary text rendering component in the Telerik WinControls framework, providing comprehensive text display functionality including word wrapping, text alignment, mnemonics, ellipsis, orientation control, and multiple rendering hints.

The primitive supports various text formatting options such as HTML rendering, shadow effects, keyboard cues, and both horizontal and vertical text orientation. It automatically handles text measurement and layout based on available space and configured properties.

TextPrimitive is widely used throughout Telerik controls for displaying labels, captions, button text, menu items, and other textual content with consistent styling and behavior.

Constructors

TextPrimitive()

Declaration
public TextPrimitive()

Fields

AutoEllipsisProperty

Declaration
public static RadProperty AutoEllipsisProperty
Field Value
RadProperty

DisabledTextRenderingHintProperty

Declaration
public static RadProperty DisabledTextRenderingHintProperty
Field Value
RadProperty

FlipTextProperty

Declaration
public static RadProperty FlipTextProperty
Field Value
RadProperty

LineLimitProperty

Declaration
public static RadProperty LineLimitProperty
Field Value
RadProperty

MeasureTrailingSpacesProperty

Declaration
public static RadProperty MeasureTrailingSpacesProperty
Field Value
RadProperty

ShadowProperty

Declaration
public static RadProperty ShadowProperty
Field Value
RadProperty

ShowKeyboardCuesProperty

Declaration
public static RadProperty ShowKeyboardCuesProperty
Field Value
RadProperty

TextAlignmentProperty

Declaration
public static RadProperty TextAlignmentProperty
Field Value
RadProperty

TextOrientationProperty

Declaration
public static RadProperty TextOrientationProperty
Field Value
RadProperty

TextProperty

Declaration
public static RadProperty TextProperty
Field Value
RadProperty

TextRenderingHintProperty

Declaration
public static RadProperty TextRenderingHintProperty
Field Value
RadProperty

TextWrapProperty

Declaration
public static RadProperty TextWrapProperty
Field Value
RadProperty

UseMnemonicProperty

Declaration
public static RadProperty UseMnemonicProperty
Field Value
RadProperty

Properties

AutoEllipsis

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

Declaration
[RadPropertyDefaultValue("AutoEllipsis", typeof(TextPrimitive))]
public bool AutoEllipsis { get; set; }
Property Value
System.Boolean

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

Implements
ITextProvider.AutoEllipsis

CachedForeColor

Declaration
public Color CachedForeColor { get; set; }
Property Value
System.Drawing.Color

DisabledTextRenderingHint

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

Declaration
[RadPropertyDefaultValue("TextRenderingHint", typeof(VisualElement))]
public virtual TextRenderingHint DisabledTextRenderingHint { get; set; }
Property Value
System.Drawing.Text.TextRenderingHint

A System.Drawing.Text.TextRenderingHint value that specifies the text rendering quality for disabled state. The default value is System.Drawing.Text.TextRenderingHint.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.

DisableHTMLRendering

Declaration
public bool DisableHTMLRendering { get; set; }
Property Value
System.Boolean

FlipText

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

Declaration
[RadPropertyDefaultValue("TextOrientation", typeof(TextPrimitive))]
public bool FlipText { get; set; }
Property Value
System.Boolean

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.

Impl

This property is used internally.

Declaration
public ITextPrimitive Impl { get; }
Property Value
ITextPrimitive

IsEmpty

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

Declaration
public override bool IsEmpty { get; }
Property Value
System.Boolean

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.

LineLimit

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

Declaration
public bool LineLimit { get; set; }
Property Value
System.Boolean

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.

MeasureTrailingSpaces

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

Declaration
public bool MeasureTrailingSpaces { get; set; }
Property Value
System.Boolean

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.

Shadow

Gets or sets the shadow settings.

Declaration
[RadPropertyDefaultValue("Shadow", typeof(TextPrimitive))]
public ShadowSettings Shadow { get; set; }
Property Value
ShadowSettings

Implements
ITextProvider.Shadow

ShowKeyboardCues

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

Declaration
[RadPropertyDefaultValue("ShowKeyboardCues", typeof(TextPrimitive))]
public bool ShowKeyboardCues { get; set; }
Property Value
System.Boolean

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

Implements
ITextProvider.ShowKeyboardCues

StretchHorizontally

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

Declaration
public override bool StretchHorizontally { get; set; }
Property Value
System.Boolean

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.

StretchVertically

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

Declaration
public override bool StretchVertically { get; set; }
Property Value
System.Boolean

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.

Text

Gets or sets the text content displayed by this primitive.

Declaration
[RadPropertyDefaultValue("Text", typeof(TextPrimitive))]
public string Text { get; set; }
Property Value
System.String

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.

TextAlignment

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

Declaration
[RadPropertyDefaultValue("TextAlignment", typeof(TextPrimitive))]
public ContentAlignment TextAlignment { get; set; }
Property Value
System.Drawing.ContentAlignment

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

Implements
ITextProvider.TextAlignment
Remarks

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

TextBlock

Declaration
public virtual FormattedTextBlock TextBlock { get; set; }
Property Value
FormattedTextBlock

TextOrientation

Gets or sets the text orientation for rendering.

Declaration
[RadPropertyDefaultValue("TextOrientation", typeof(TextPrimitive))]
public Orientation TextOrientation { get; set; }
Property Value
System.Windows.Forms.Orientation

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

Implements
ITextProvider.TextOrientation
Remarks

When set to System.Windows.Forms.Orientation.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.

TextParams

Gets an instance of the TextParams structure which contains information on how to render the text in this element

Declaration
public TextParams TextParams { get; }
Property Value
TextParams

TextRenderingHint

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

Declaration
[RadPropertyDefaultValue("TextRenderingHint", typeof(VisualElement))]
public virtual TextRenderingHint TextRenderingHint { get; set; }
Property Value
System.Drawing.Text.TextRenderingHint

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

Remarks

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

TextWrap

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

Declaration
[RadPropertyDefaultValue("TextWrap", typeof(TextPrimitive))]
public bool TextWrap { get; set; }
Property Value
System.Boolean

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

Implements
ITextProvider.TextWrap

UseMnemonic

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.

Declaration
[RadPropertyDefaultValue("UseMnemonic", typeof(TextPrimitive))]
public bool UseMnemonic { get; set; }
Property Value
System.Boolean

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

AllowHTMLRendering()

Declaration
public bool AllowHTMLRendering()
Returns
System.Boolean

ArrangeCore(RectangleF)

Declaration
protected override void ArrangeCore(RectangleF finalRect)
Parameters
System.Drawing.RectangleF finalRect

Overrides
RadElement.ArrangeCore(RectangleF)

ArrangeOverride(SizeF)

Declaration
protected override SizeF ArrangeOverride(SizeF finalSize)
Parameters
System.Drawing.SizeF finalSize

Returns
System.Drawing.SizeF

Overrides
RadElement.ArrangeOverride(SizeF)

CreateStringFormat()

Declaration
public StringFormat CreateStringFormat()
Returns
System.Drawing.StringFormat

CreateTextParams()

Declaration
protected virtual TextParams CreateTextParams()
Returns
TextParams

GetFaceRectangle()

Declaration
public RectangleF GetFaceRectangle()
Returns
System.Drawing.RectangleF

Implements
ITextProvider.GetFaceRectangle()

GetStylablePropertiesFilter()

Declaration
public override Filter GetStylablePropertiesFilter()
Returns
Filter

Overrides
RadElement.GetStylablePropertiesFilter()

GetTextSize()

Declaration
public SizeF GetTextSize()
Returns
System.Drawing.SizeF

GetTextSize(SizeF)

Declaration
public SizeF GetTextSize(SizeF proposedSize)
Parameters
System.Drawing.SizeF proposedSize

Returns
System.Drawing.SizeF

GetTextSize(SizeF, TextParams)

Declaration
public SizeF GetTextSize(SizeF proposedSize, TextParams textParams)
Parameters
System.Drawing.SizeF proposedSize

TextParams textParams

Returns
System.Drawing.SizeF

Implements
ITextPrimitive.GetTextSize(SizeF, TextParams)

GetTextSize(TextParams)

Declaration
public SizeF GetTextSize(TextParams textParams)
Parameters
TextParams textParams

Returns
System.Drawing.SizeF

Implements
ITextPrimitive.GetTextSize(TextParams)

InitializeFields()

Declaration
protected override void InitializeFields()
Overrides
BasePrimitive.InitializeFields()

MeasureOverride(SizeF)

Declaration
protected override SizeF MeasureOverride(SizeF availableSize)
Parameters
System.Drawing.SizeF availableSize

Returns
System.Drawing.SizeF

Overrides
RadElement.MeasureOverride(SizeF)

MeasureOverride(SizeF, TextParams)

Declaration
public SizeF MeasureOverride(SizeF availableSize, TextParams textParams)
Parameters
System.Drawing.SizeF availableSize

TextParams textParams

Returns
System.Drawing.SizeF

Implements
ITextPrimitive.MeasureOverride(SizeF, TextParams)

OnMouseMove(Object, MouseEventArgs)

Declaration
public void OnMouseMove(object sender, MouseEventArgs e)
Parameters
System.Object sender

System.Windows.Forms.MouseEventArgs e

Implements
ITextPrimitive.OnMouseMove(Object, MouseEventArgs)

OnMouseMove(MouseEventArgs)

Declaration
protected override void OnMouseMove(MouseEventArgs e)
Parameters
System.Windows.Forms.MouseEventArgs e

Overrides
RadElement.OnMouseMove(MouseEventArgs)

OnPropertyChanged(RadPropertyChangedEventArgs)

Declaration
protected override void OnPropertyChanged(RadPropertyChangedEventArgs e)
Parameters
RadPropertyChangedEventArgs e

Overrides
VisualElement.OnPropertyChanged(RadPropertyChangedEventArgs)

PaintPrimitive(IGraphics, Single, SizeF)

Draws the primitive on the screen.

Declaration
public override void PaintPrimitive(IGraphics graphics, float angle, SizeF scale)
Parameters
IGraphics graphics

System.Single angle

System.Drawing.SizeF scale

Overrides
BasePrimitive.PaintPrimitive(IGraphics, Single, SizeF)

PaintPrimitive(IGraphics, Single, SizeF, TextParams)

Declaration
public void PaintPrimitive(IGraphics graphics, float angle, SizeF scale, TextParams textParams)
Parameters
IGraphics graphics

System.Single angle

System.Drawing.SizeF scale

TextParams textParams

Implements
ITextPrimitive.PaintPrimitive(IGraphics, Single, SizeF, TextParams)

PaintPrimitive(IGraphics, TextParams)

Declaration
public void PaintPrimitive(IGraphics graphics, TextParams textParams)
Parameters
IGraphics graphics

TextParams textParams

Implements
ITextPrimitive.PaintPrimitive(IGraphics, TextParams)

ToggleHTML(String)

Declaration
public void ToggleHTML(string text)
Parameters
System.String text

ToString()

Returns the text as a string.

Declaration
public override string ToString()
Returns
System.String

Overrides
RadElement.ToString()

Extension Methods

CommonExtensions.ClearIfNoBindingAndSet(RadObject, RadProperty)
DispatcherExtensions.CheckAccess(RadObject)
CommonExtensions.SetIfDifferent(RadObject, RadProperty, Object)
CommonExtensions.ClearIfSet(RadObject, RadProperty)
CommonExtensions.IsLocalValueSet(RadObject, RadProperty)
DispatcherExtensions.CheckAccess(RadObject)
DispatcherExtensions.CheckAccess(RadObject)
DispatcherExtensions.CheckAccess(RadObject)
SvgExtentions.Traverse<T>(T, Func<T, IEnumerable<T>>)
SvgExtentions.TraverseDepthFirst<T>(T, Func<T, IEnumerable<T>>)
Getting Started
  • Install Now
  • Demos
  • Step-by-Step Tutorial
  • Sample Applications
  • SDK Samples
  • Visual Studio Extensions
Support Resources
  • Code Library
  • Knowledge Base
  • Videos
Community
  • Forums
  • Blogs
  • Feedback Portal
  • Document Processing Feedback Portal

Copyright © 2018 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.