Back to Devexpress

ReadOnlyTextPropertiesBase.FontName Property

officefileapi-devexpress-dot-xtrarichedit-dot-api-dot-native-dot-readonlytextpropertiesbase.md

latest3.3 KB
Original Source

ReadOnlyTextPropertiesBase.FontName Property

Gets the name of a font applied to characters in the current DocumentText object.

Namespace : DevExpress.XtraRichEdit.API.Native

Assembly : DevExpress.RichEdit.v25.2.Core.dll

NuGet Package : DevExpress.RichEdit.Core

Declaration

csharp
string FontName { get; }
vb
ReadOnly Property FontName As String

Property Value

TypeDescription
String

A String object that is the font name.

|

The following code snippets (auto-collected from DevExpress Examples) contain references to the FontName property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

winforms-spreadsheet-how-to-edit-rich-text/CS/SpreadsheetRichText/CustomDocumentVisitor.cs#L36

csharp
{
    RichTextRunFont runFont = new RichTextRunFont(tp.FontName, tp.DoubleFontSize / 2, tp.ForeColor);
    runFont.Bold = tp.FontBold;

blazor-grid-export-images-and-rich-text-using-office-file-api/CS/ExportImagesAndRichText/Models/CustomDocumentVisitor.cs#L33

csharp
private RichTextRunFont CreateRichTextRun(ReadOnlyTextProperties tp) {
    RichTextRunFont runFont = new RichTextRunFont(tp.FontName, tp.DoubleFontSize / 2, tp.ForeColor);
    runFont.Bold = tp.FontBold;

winforms-spreadsheet-how-to-edit-rich-text/VB/SpreadsheetRichText/CustomDocumentVisitor.vb#L29

vb
Private Function CreateRichTextRun(ByVal tp As ReadOnlyTextProperties) As RichTextRunFont
    Dim runFont As New RichTextRunFont(tp.FontName, tp.DoubleFontSize \ 2, tp.ForeColor)
    runFont.Bold = tp.FontBold

See Also

ReadOnlyTextPropertiesBase Interface

ReadOnlyTextPropertiesBase Members

DevExpress.XtraRichEdit.API.Native Namespace