officefileapi-devexpress-dot-xtrarichedit-dot-api-dot-native-dot-characterpropertiesbase-fab8344b.md
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
bool? Bold { get; set; }
Property Bold As Boolean?
| Type | Description |
|---|---|
| Nullable<Boolean> |
true if characters are bold; otherwise, false or null for a mixture of true and false.
|
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
CharacterProperties cp = Document.BeginUpdateCharacters(field.Range);
cp.Bold = false;
cp.FontSize = 12;
winforms-richedit-create-log-viewer-application/CS/Form1.cs#L64
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
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
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
rentalFormat.FontSize = 28;
rentalFormat.Bold = true;
document.EndUpdateCharacters(rentalFormat);
winforms-spreadsheet-how-to-edit-rich-text/VB/SpreadsheetRichText/RichTextEditForm.vb#L20
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
Dim cp As CharacterProperties = Document.BeginUpdateCharacters(field.Range)
cp.Bold = False
cp.FontSize = 12
winforms-richedit-create-log-viewer-application/VB/Form1.vb#L62
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
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
richEditControl.Document.CharacterStyles("Line Number").ForeColor = System.Drawing.Color.LightGray
richEditControl.Document.CharacterStyles("Line Number").Bold = True
' #End Region ' #SimpleViewLineNumbering
See Also
CharacterPropertiesBase Interface