ClassTextBlockElement
Represents a single word in TextBoxWrapPanel
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.UI.dll
Syntax:
public class TextBlockElement : VisualElement, IDisposable, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IStylableNode, ITextBlock
Inheritance: objectDisposableObjectRadObjectRadElementVisualElementTextBlockElement
Implements:
Inherited Members
Constructors
TextBlockElement()
Initializes a new instance of the TextBlockElement class.
Declaration
public TextBlockElement()
TextBlockElement(string)
Initializes a new instance of the TextBlockElement class.
Properties
DrawFill
Gets or sets a value indicating whether the word's background can be painted.
Declaration
public bool DrawFill { get; set; }
Property Value
true if paint the background; otherwise, false.
Index
Gets or sets the index of the word
Declaration
public int Index { get; set; }
Property Value
The index.
Implements
Length
Gets the length of the word. It can be different than the exact text length.
Offset
Gets or sets the word according to the previous one
Declaration
public int Offset { get; set; }
Property Value
The offset.
Implements
Methods
DpiScaleChanged(SizeF)
Called when the DPI scale factor changes. Updates the scale factor and notifies child elements.
Declaration
public override void DpiScaleChanged(SizeF scaleFactor)
Parameters
scaleFactor
The new DPI scale factor.
Overrides
GetCharacterIndexFromX(float)
Gets the character index at X-position.
GetRectangleFromCharacterIndex(int, bool)
Gets a rectangle of character by index.
Declaration
public virtual RectangleF GetRectangleFromCharacterIndex(int index, bool trailEdge)
Parameters
index
The index.
trailEdge
if set to true [trail edge].
Returns
Implements
InitializeFields()
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.
Declaration
protected override void InitializeFields()
Overrides
MeasureOverride(SizeF)
Measures the space required by the RadElement
Used by the layout system.
Declaration
protected override SizeF MeasureOverride(SizeF availableSize)
Parameters
availableSize
The size that is available to the RadElement. The available size can be infinity (to take the full size of the element)
Returns
The minimum size required by the element to be completely visible. Cannot be infinity.
Overrides
Remarks
In this method call to the Measure method of each child must be made.
OnPropertyChanged(RadPropertyChangedEventArgs)
Called when a property value has changed, allowing for custom response to property changes.
Declaration
protected override void OnPropertyChanged(RadPropertyChangedEventArgs e)
Parameters
e
The property changed event arguments.
Overrides
PaintElement(IGraphics, float, SizeF)
Paints the element's background and calls the base implementation to paint child elements.
Declaration
protected override void PaintElement(IGraphics graphics, float angle, SizeF scale)
Parameters
graphics
The graphics object used for painting.
angle
The rotation angle to apply during painting.
scale
The scale factor to apply during painting.
Overrides
ResetLayoutCore()
Resets the core layout properties and removes this element from layout queues.
Declaration
protected override void ResetLayoutCore()
Overrides