Back to Devexpress

CharacterPropertiesBase.Bold Property

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

latest6.4 KB
Original Source

CharacterPropertiesBase.Bold Property

Gets or sets a value indicating whether characters are bold.

Namespace : DevExpress.XtraRichEdit.API.Native

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

NuGet Package : DevExpress.RichEdit.Core

Declaration

csharp
bool? Bold { get; set; }
vb
Property Bold As Boolean?

Property Value

TypeDescription
Nullable<Boolean>

true if characters are bold; otherwise, false or null for a mixture of true and false.

|

Remarks

Use the CharacterPropertiesBase interface to change character formatting.

The following code snippets (auto-collected from DevExpress Examples) contain references to the Bold 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-table-of-contents-practical-guide/CS/Form1.cs#L94

csharp
CharacterProperties cp = Document.BeginUpdateCharacters(field.Range);
cp.Bold = false;
cp.FontSize = 12;

winforms-richedit-create-log-viewer-application/CS/Form1.cs#L64

csharp
richEditControl1.Document.DefaultCharacterProperties.FontSize = 12;
richEditControl1.Document.DefaultCharacterProperties.Bold = true;
richEditControl1.Document.DefaultCharacterProperties.ForeColor = Color.Blue;

winforms-richedit-enable-line-numbering-and-count-document-rows/CS/LineNumberingExample/Form1.cs#L46

csharp
richEditControl1.Document.CharacterStyles["Line Number"].ForeColor = Color.DarkGray;
richEditControl1.Document.CharacterStyles["Line Number"].Bold = true;
#endregion #linenumbering

winforms-richeditcontrol-common-api/CS/RichEditAPISample/CodeExamples/RichEditControlActions.cs#L620

csharp
richEditControl.Document.CharacterStyles["Line Number"].ForeColor = Color.LightGray;
richEditControl.Document.CharacterStyles["Line Number"].Bold = true;
#endregion #SimpleViewLineNumbering

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

csharp
rentalFormat.FontSize = 28;
rentalFormat.Bold = true;
document.EndUpdateCharacters(rentalFormat);

winforms-spreadsheet-how-to-edit-rich-text/VB/SpreadsheetRichText/RichTextEditForm.vb#L20

vb
Dim cp As CharacterProperties = document.BeginUpdateCharacters(range)
cp.Bold = run.Font.Bold
cp.ForeColor = run.Font.Color

winforms-richedit-table-of-contents-practical-guide/VB/Form1.vb#L86

vb
Dim cp As CharacterProperties = Document.BeginUpdateCharacters(field.Range)
cp.Bold = False
cp.FontSize = 12

winforms-richedit-create-log-viewer-application/VB/Form1.vb#L62

vb
richEditControl1.Document.DefaultCharacterProperties.FontSize = 12
richEditControl1.Document.DefaultCharacterProperties.Bold = True
richEditControl1.Document.DefaultCharacterProperties.ForeColor = Color.Blue

winforms-richedit-enable-line-numbering-and-count-document-rows/VB/LineNumberingExample/Form1.vb#L40

vb
richEditControl1.Document.CharacterStyles("Line Number").ForeColor = Color.DarkGray
            richEditControl1.Document.CharacterStyles("Line Number").Bold = True
#End Region ' #linenumbering

winforms-richeditcontrol-common-api/VB/RichEditAPISample/CodeExamples/RichEditControlActions.vb#L636

vb
richEditControl.Document.CharacterStyles("Line Number").ForeColor = System.Drawing.Color.LightGray
            richEditControl.Document.CharacterStyles("Line Number").Bold = True
' #End Region ' #SimpleViewLineNumbering

See Also

ShowFontFormCommand

ToggleFontBoldCommand

CharacterPropertiesBase Interface

CharacterPropertiesBase Members

DevExpress.XtraRichEdit.API.Native Namespace