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

Interface IRadTextBlock

Represents a text block in the Telerik UI framework.

Namespace: Telerik.Windows.Documents.UI.TextBlocks
Assembly: Telerik.Windows.Controls.RichTextBox.dll

Syntax

public interface IRadTextBlock

Properties

FlowDirection

Gets or sets the flow direction of the text block.

Declaration
FlowDirection FlowDirection { get; set; }
Property Value
System.Windows.FlowDirection

A FlowDirection value that indicates the direction in which the text flows.

FontFamily

Gets or sets the font family of the text block.

Declaration
FontFamily FontFamily { get; set; }
Property Value
System.Windows.Media.FontFamily

The font family to be applied to the text block. This property influences the appearance of the text rendered within the block.

FontSize

Gets or sets the font size of the text block.

Declaration
double FontSize { get; set; }
Property Value
System.Double

A double representing the size of the font in device-independent pixels (DIPs).

FontStyle

Gets or sets the font style of the text block.

Declaration
FontStyle FontStyle { get; set; }
Property Value
System.Windows.FontStyle

The font style to be applied to the text block. This can specify various styles like normal, italic, or oblique.

FontWeight

Gets or sets the font weight of the text block.

Declaration
FontWeight FontWeight { get; set; }
Property Value
System.Windows.FontWeight

ForegroundColor

Gets or sets the foreground color of the text block.

Declaration
Color ForegroundColor { get; set; }
Property Value
System.Windows.Media.Color

A System.Windows.Media.Color that represents the foreground color of the text block.

Height

Gets or sets the height of the text block in document units.

Declaration
double Height { get; set; }
Property Value
System.Double

A double representing the height of the text block. The value is measured in document units.

Left

Gets or sets the left position of the text block.

Declaration
double Left { get; set; }
Property Value
System.Double

A double representing the left position in units relative to the layout's coordinate system.

LineBaselineOffset

Declaration
double LineBaselineOffset { get; set; }
Property Value
System.Double

LineHeight

Declaration
double LineHeight { get; set; }
Property Value
System.Double

Text

Gets or sets the text content of the RadTextBlock.

Declaration
string Text { get; set; }
Property Value
System.String

The text content as a string.

Top

Gets the vertical position of the top edge of the text block.

Declaration
double Top { get; set; }
Property Value
System.Double

Width

Gets or sets the width of the text block.

Declaration
double Width { get; set; }
Property Value
System.Double

A double representing the width of the text block in pixels.

Methods

ClearFormattingProperties()

Setting the formatting properties to their default values.

Declaration
void ClearFormattingProperties()

ClearInlines()

Clears all inline elements from the text block.

Declaration
void ClearInlines()

GetBaselineOffset()

Retrieves the baseline offset of the text block.

Declaration
double GetBaselineOffset()
Returns
System.Double

A value of type double representing the baseline offset.

GetBaselineRenderingDifference(Double)

Gets the baseline rendering difference for the specified vertical position.

Declaration
double GetBaselineRenderingDifference(double lineBaselineOffset)
Parameters
System.Double lineBaselineOffset

The vertical position used to calculate the baseline rendering difference.

Returns
System.Double

The baseline rendering difference as a double value.

GetUIElement()

Retrieves the user interface element associated with the text block.

Declaration
FrameworkElement GetUIElement()
Returns
System.Windows.FrameworkElement

The UI element that represents the text block. This can be used for rendering or interaction purposes.

HasInlines()

Determines whether the current RadTextBlock has any inline elements.

Declaration
bool HasInlines()
Returns
System.Boolean

True if the RadTextBlock contains inline elements; otherwise, false.

ReleaseAndClearInlines(ObjectPool)

Releases resources and clears any inline elements associated with the text block.

Declaration
void ReleaseAndClearInlines(ObjectPool pool)
Parameters
ObjectPool pool

An instance of the ObjectPool used to manage memory allocation for inlines.

SetClip(Nullable<Rect>)

Sets the clipping region for the text block.

Declaration
void SetClip(Nullable<Rect> rect)
Parameters
System.Nullable<System.Windows.Rect> rect

The rectangle that defines the clipping region. If null, no clipping will be applied.

SetFormattingProperties(SpanProperties)

Setting the formatting properties from the provided SpanProperties.

Declaration
void SetFormattingProperties(SpanProperties spanProperties)
Parameters
SpanProperties spanProperties

The properties.

SetInlines(IEnumerable<IRadRun>)

Sets the inlines for the text block with the specified collection of runs.

Declaration
void SetInlines(IEnumerable<IRadRun> runs)
Parameters
System.Collections.Generic.IEnumerable<IRadRun> runs

An enumerable collection of IRadRun that represents the inlines to be set.

Extension Methods

CollectionExtensions.ToEnumerable<T>(T)
EnumerableExtensions.ToEnumerable<T>(T)
Getting Started
  • Install Now
  • Demos
  • SDK Samples Browser
  • Sample Applications
Support Resources
  • Code Library
  • Knowledge Base
  • MVVM Support
  • Videos
  • GitHub SDK Repository
Community
  • Forums
  • Blogs
  • XAML 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.