Back to Devexpress

TextProperties Class

officefileapi-devexpress-dot-docs-dot-presentation-cb7040ed.md

latest3.0 KB
Original Source

TextProperties Class

Contains text formatting properties.

Namespace : DevExpress.Docs.Presentation

Assembly : DevExpress.Docs.Presentation.v25.2.dll

NuGet Package : DevExpress.Docs.Presentation

Declaration

csharp
public class TextProperties :
    PresentationObject
vb
Public Class TextProperties
    Inherits PresentationObject

The following members return TextProperties objects:

Remarks

The following code snippet creates a paragraph with bold, all-caps text, a yellow highlight color, and a heavy underline:

csharp
using DevExpress.Docs.Presentation;
using System.Drawing;
//...
    textArea.Paragraphs.Add(new TextParagraph("5 successful builds") {
        Properties = new ParagraphProperties {
            TextProperties = new TextProperties {
                Bold = true, Caps = TextCapType.All,
                HighlightColor = new DevExpress.Docs.OfficeColor(Color.Yellow),
                UnderlineType = TextUnderlineType.Heavy 
            }
        }
    });
vb
Imports DevExpress.Docs.Presentation
Imports System.Drawing
'...
    textArea.Paragraphs.Add(New TextParagraph("5 successful builds") With {
        .Properties = New ParagraphProperties With {
            .TextProperties = New TextProperties With {
                .Bold = True,
                .Caps = TextCapType.All,
                .HighlightColor = New DevExpress.Docs.OfficeColor(Color.Yellow),
                .UnderlineType = TextUnderlineType.Heavy
            }
        }
    })

Different presentation viewers may prioritize text styles differently and use either TextAreaBase.ParagraphProperties or TextAreaBase.Level1ParagraphProperties to display top-level text.

Implements

ICloneable

Inheritance

Object PresentationObject TextProperties

See Also

TextProperties Members

DevExpress.Docs.Presentation Namespace