Class TextPrimitive
Represents text that is drawn on the screen. Extends %BasePrimitive:Telerik.WinControls.Primitives.BasePrimitive%.
Inheritance
Inherited Members
Namespace: Telerik.WinControls.Primitives
Assembly: Telerik.WinControls.dll
Syntax
public class TextPrimitive : BasePrimitive, IDisposable, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IStylableNode, IPrimitive, ITextProvider, ITextPrimitive
Constructors
TextPrimitive()
Declaration
public TextPrimitive()
Fields
AutoEllipsisProperty
DisabledTextRenderingHintProperty
FlipTextProperty
LineLimitProperty
MeasureTrailingSpacesProperty
ShadowProperty
ShowKeyboardCuesProperty
TextAlignmentProperty
TextOrientationProperty
TextProperty
TextRenderingHintProperty
TextWrapProperty
UseMnemonicProperty
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
|
Implements
CachedForeColor
Declaration
public Color CachedForeColor { get; set; }
Property Value
System.Drawing.Color
|
DisabledTextRenderingHint
Gets or sets the text rendering hint used when this instance is disabled.
Declaration
[RadPropertyDefaultValue("TextRenderingHint", typeof(VisualElement))]
public virtual TextRenderingHint DisabledTextRenderingHint { get; set; }
Property Value
System.Drawing.Text.TextRenderingHint
|
DisableHTMLRendering
Declaration
public bool DisableHTMLRendering { get; set; }
Property Value
System.Boolean
|
FlipText
Gets or sets whether the text will be flipped.
Declaration
[RadPropertyDefaultValue("TextOrientation", typeof(TextPrimitive))]
public bool FlipText { get; set; }
Property Value
System.Boolean
|
Implements
Impl
This property is used internally.
Declaration
public ITextPrimitive Impl { get; }
Property Value
ITextPrimitive
|
IsEmpty
Gets a value indicating whether the primitive has content.
Declaration
public override bool IsEmpty { get; }
Property Value
System.Boolean
|
Overrides
LineLimit
Declaration
public bool LineLimit { get; set; }
Property Value
System.Boolean
|
MeasureTrailingSpaces
Includes the trailing space at the end of each line. By default the boundary rectangle returned by the Overload:System.Drawing.Graphics.MeasureString method excludes the space at the end of each line. Set this flag to include that space in measurement.
Declaration
public bool MeasureTrailingSpaces { get; set; }
Property Value
System.Boolean
|
Implements
Shadow
Gets or sets the shadow settings.
Declaration
[RadPropertyDefaultValue("Shadow", typeof(TextPrimitive))]
public ShadowSettings Shadow { get; set; }
Property Value
ShadowSettings
|
Implements
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
|
Implements
StretchHorizontally
Allow StretchHorizontally
Declaration
public override bool StretchHorizontally { get; set; }
Property Value
System.Boolean
|
Overrides
StretchVertically
Allow StretchVertically
Declaration
public override bool StretchVertically { get; set; }
Property Value
System.Boolean
|
Overrides
Text
Gets or sets the displayed text.
Declaration
[RadPropertyDefaultValue("Text", typeof(TextPrimitive))]
public string Text { get; set; }
Property Value
System.String
|
Implements
TextAlignment
Gets or sets the text alignment. Possible values are included in the ContentAlignment enumeration.
Declaration
[RadPropertyDefaultValue("TextAlignment", typeof(TextPrimitive))]
public ContentAlignment TextAlignment { get; set; }
Property Value
System.Drawing.ContentAlignment
|
Implements
TextBlock
Declaration
public virtual FormattedTextBlock TextBlock { get; set; }
Property Value
FormattedTextBlock
|
TextOrientation
Gets or sets the text orientation. Possible values are horizontal and vertical.
Declaration
[RadPropertyDefaultValue("TextOrientation", typeof(TextPrimitive))]
public Orientation TextOrientation { get; set; }
Property Value
System.Windows.Forms.Orientation
|
Implements
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.
Declaration
[RadPropertyDefaultValue("TextRenderingHint", typeof(VisualElement))]
public virtual TextRenderingHint TextRenderingHint { get; set; }
Property Value
System.Drawing.Text.TextRenderingHint
|
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
|
Implements
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
Methods
AllowHTMLRendering()
Declaration
public bool AllowHTMLRendering()
Returns
System.Boolean
|
ArrangeCore(RectangleF)
Declaration
protected override void ArrangeCore(RectangleF finalRect)
Parameters
System.Drawing.RectangleF
finalRect
|
Overrides
ArrangeOverride(SizeF)
Declaration
protected override SizeF ArrangeOverride(SizeF finalSize)
Parameters
System.Drawing.SizeF
finalSize
|
Returns
System.Drawing.SizeF
|
Overrides
CreateStringFormat()
Declaration
public StringFormat CreateStringFormat()
Returns
System.Drawing.StringFormat
|
CreateTextParams()
GetFaceRectangle()
Declaration
public RectangleF GetFaceRectangle()
Returns
System.Drawing.RectangleF
|
Implements
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
GetTextSize(TextParams)
Declaration
public SizeF GetTextSize(TextParams textParams)
Parameters
TextParams
textParams
|
Returns
System.Drawing.SizeF
|
Implements
InitializeFields()
MeasureOverride(SizeF)
Declaration
protected override SizeF MeasureOverride(SizeF availableSize)
Parameters
System.Drawing.SizeF
availableSize
|
Returns
System.Drawing.SizeF
|
Overrides
MeasureOverride(SizeF, TextParams)
Declaration
public SizeF MeasureOverride(SizeF availableSize, TextParams textParams)
Parameters
System.Drawing.SizeF
availableSize
|
TextParams
textParams
|
Returns
System.Drawing.SizeF
|
Implements
OnMouseMove(Object, MouseEventArgs)
Declaration
public void OnMouseMove(object sender, MouseEventArgs e)
Parameters
System.Object
sender
|
System.Windows.Forms.MouseEventArgs
e
|
Implements
OnMouseMove(MouseEventArgs)
Declaration
protected override void OnMouseMove(MouseEventArgs e)
Parameters
System.Windows.Forms.MouseEventArgs
e
|
Overrides
OnPropertyChanged(RadPropertyChangedEventArgs)
Declaration
protected override void OnPropertyChanged(RadPropertyChangedEventArgs e)
Parameters
RadPropertyChangedEventArgs
e
|
Overrides
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
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
PaintPrimitive(IGraphics, TextParams)
Declaration
public void PaintPrimitive(IGraphics graphics, TextParams textParams)
Parameters
IGraphics
graphics
|
TextParams
textParams
|
Implements
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
|