Back to Devexpress

CharacterPropertiesBase.FontSize Property

officefileapi-devexpress-dot-xtrarichedit-dot-api-dot-native-dot-characterpropertiesbase-b9c1c121.md

latest5.4 KB
Original Source

CharacterPropertiesBase.FontSize Property

Gets or sets the character(s) font size.

Namespace : DevExpress.XtraRichEdit.API.Native

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

NuGet Package : DevExpress.RichEdit.Core

Declaration

csharp
float? FontSize { get; set; }
vb
Property FontSize As Single?

Property Value

TypeDescription
Nullable<Single>

A Single value, representing the font size in points or null for mixed sizes.

|

Remarks

Use the CharacterProperties interface to change character formatting.

The following code snippets (auto-collected from DevExpress Examples) contain references to the FontSize 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-richedit-document-api/CS/RichEditAPISample/CodeExamples/Formatting.cs#L23

csharp
cp.FontName = "Comic Sans MS";
cp.FontSize = 18;
cp.ForeColor = Color.Blue;

wpf-richedit-document-api/CS/DXRichEditControlAPISample/CodeExamples/FormattingActions.cs#L18

csharp
cp.FontName = "Comic Sans MS";
cp.FontSize = 18;
cp.ForeColor = Color.Blue;

winforms-richedit-tables-simple-example/CS/TablesSimpleExample/Form1.cs#L131

csharp
properties.FontName = "Segoe UI";
properties.FontSize = 16;
document.EndUpdateCharacters(properties);

word-document-api-table-examples/CS/Program.cs#L113

csharp
properties.FontName = "Segoe UI";
properties.FontSize = 16;
document.EndUpdateCharacters(properties);

winforms-rich-edit-text-formatting/CS/Text Formatting Example/Form1.cs#L51

csharp
//Set the character size, font name and color
titleFormatting.FontSize = 20;
titleFormatting.FontName = "Helvetica";

winforms-richedit-document-api/VB/RichEditAPISample/CodeExamples/Formatting.vb#L21

vb
cp.FontName = "Comic Sans MS"
cp.FontSize = 18
cp.ForeColor = System.Drawing.Color.Blue

wpf-richedit-document-api/VB/DXRichEditControlAPISample/CodeExamples/FormattingActions.vb#L15

vb
cp.FontName = "Comic Sans MS"
cp.FontSize = 18
cp.ForeColor = Color.Blue

winforms-richedit-tables-simple-example/VB/TablesSimpleExample/Form1.vb#L107

vb
properties.FontName = "Segoe UI"
properties.FontSize = 16
document.EndUpdateCharacters(properties)

word-document-api-examples/VB/CodeExamples/FormattingActions.vb#L36

vb
cp.FontName = "Comic Sans MS"
cp.FontSize = 18
cp.ForeColor = System.Drawing.Color.Blue

word-document-api-table-examples/VB/Program.vb#L89

vb
properties.FontName = "Segoe UI"
properties.FontSize = 16
document.EndUpdateCharacters(properties)

See Also

CharacterPropertiesBase Interface

CharacterPropertiesBase Members

DevExpress.XtraRichEdit.API.Native Namespace