Skip to main content

RepositoryItem.AllowHtmlDraw Property

Gets or sets whether HTML tags can be used to format an editor’s text or text of the editor’s items.

Namespace: DevExpress.XtraEditors.Repository

Assembly: DevExpress.XtraEditors.v24.2.dll

Declaration

[DefaultValue(DefaultBoolean.Default)]
[DXCategory("Behavior")]
public virtual DefaultBoolean AllowHtmlDraw { get; set; }

Property Value

Type Default Description
DefaultBoolean Default

A DefaultBoolean value that specifies whether HTML tags can be used to format an editor’s text or text of the editor’s items.

Available values:

Name Description Return Value
True

The value is true.

0

False

The value is false.

1

Default

The value is specified by a global option or a higher-level object.

2

Remarks

If the AllowHtmlDraw property is set to True, you can use HTML tags to format an editor’s text or the text of the editor’s items. For detailed information, see HTML Text Formatting.

Note

The AllowHtmlDraw property is not supported by all editors. For ButtonEdit descendants, the property is supported when text editing is disabled (the RepositoryItemButtonEdit.TextEditStyle property is set to TextEditStyles.DisableTextEditor).

For a list of editors supported this property, see HTML Text Formatting.

Example

The following example shows how to format the BaseCheckEdit.Text using HTML tags. HTML formatting is enabled via the RepositoryItem.AllowHtmlDraw property. The image below shows the result:

checkEdit_HTML_formatting

checkEdit1.Text = "<size=14>Size = 14 <br/> <b>Bold</b> <i>Italic</i> 
<u>Underline</u> <br/><size=11>Size = 11<br/> <color=255, 0, 0>Sample Text";

checkEdit1.Properties.AllowHtmlDraw = DefaultBoolean.True;
checkEdit1.Properties.Appearance.TextOptions.WordWrap = DevExpress.Utils.WordWrap.Wrap;
checkEdit1.Properties.Appearance.Options.UseTextOptions = true;

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the AllowHtmlDraw 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.

See Also