TextFragment
Text run containing characters that share uniform font, color, spacing, and positioning; use to apply precise typographic styling within fixed content.
Definition
Namespace:Telerik.Windows.Documents.Fixed.Model.Text
Assembly:Telerik.Windows.Documents.Fixed.dll
Syntax:
public class TextFragment : PositionContentElement, IFixedDocumentElement
Inheritance: objectFixedDocumentElementBaseContentElementBasePositionContentElementTextFragment
Implements:
Inherited Members
Constructors
Initializes a new instance of the TextFragment class.
public TextFragment()
Initializes a new instance of the TextFragment class with the specified text content.
public TextFragment(string text)
The string content to be displayed in this text fragment.
Methods
Creates a deep copy of this text fragment, including all its formatting properties and text content.
public TextFragment Clone()
A new TextFragment instance that is an exact copy of this fragment.
Creates the cloned instance.
protected override T CreateClonedInstance<T>() where T : PositionContentElement
T
The cloned instance.
Overrides:
Returns a string representation of this text fragment.
Properties
Constant opacity applied to fill operations (non-stroking) when compositing.
public double? AlphaConstant { get; set; }
The alpha constant value between 0.0 (fully transparent) and 1.0 (fully opaque) for fill operations.
Uniform adjustment applied between consecutive characters to tighten or expand overall tracking.
public double? CharacterSpacing { get; set; }
The character spacing. A positive value increases spacing, negative decreases it.
Non-stroking color applied to glyph interiors when fill is enabled.
public ColorBase Fill { get; set; }
The color used to fill the text characters.
Font resource used to shape and render the fragment’s glyphs.
public FontBase Font { get; set; }
The font instance that defines the typeface, style, and other font characteristics.
Em size (in PDF text space units) used when positioning and scaling glyph outlines.
public double FontSize { get; set; }
The size of the font.
Horizontal scale factor applied to glyph widths (1.0 = normal, less than 1 compresses, greater than 1 expands).
public double? HorizontalScaling { get; set; }
The horizontal scaling factor as a percentage (e.g., 1.0 = 100%, 0.5 = 50%, 2.0 = 200%). Default is 1.0 (100%).
Maximum miter length ratio before joints are beveled when using miter joins.
public double? MiterLimit { get; set; }
The miter limit ratio. When the miter length exceeds this limit, the corner is beveled instead of mitered.
Rendering style determining fill, stroke, both, clipping, or invisibility for the glyphs.
public RenderingMode RenderingMode { get; set; }
The rendering mode that specifies the appearance style of the text.
Stroking color used for glyph outlines when stroke rendering is active.
public ColorBase Stroke { get; set; }
The color used to stroke the text character outlines.
Constant opacity applied to stroke (outline) painting operations.
public double? StrokeAlphaConstant { get; set; }
The stroke alpha constant value between 0.0 (fully transparent) and 1.0 (fully opaque) for stroke operations.
Dash pattern sequence applied when stroking glyph outlines.
public IEnumerable<double> StrokeDashArray { get; set; }
A collection of values that specify the lengths of alternating dashes and gaps in the stroke pattern.
Offset into the dash pattern at which glyph outline stroking begins.
public double StrokeDashOffset { get; set; }
The dash offset value in user space units that shifts the starting point of the dash pattern.
Style applied to the ends of stroked glyph segments (caps).
public LineCap StrokeLineCap { get; set; }
The line cap style that determines how line ends are rendered.
Strategy for rendering corners where stroked glyph outline segments meet (joins).
public LineJoin StrokeLineJoin { get; set; }
The line join style that determines how line corners are rendered.
Line width in user units for glyph outline stroking.
public double StrokeThickness { get; set; }
The stroke line thickness.
Unicode string rendered using the fragment’s current text properties.
public string Text { get; set; }
The string content that will be rendered with the formatting properties of this text fragment.
Baseline shift offset applied to raise (positive) or lower (negative) glyphs relative to the current line.
public double? TextRise { get; set; }
The text rise offset. Positive values raise the text, negative values lower it.
Additional spacing applied to space characters, influencing distance between words.
public double? WordSpacing { get; set; }
The word spacing. A positive value increases spacing between words, negative decreases it.