Skip to main content
A newer version of this page is available. .

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.v18.2.dll

Declaration

[DXCategory("Behavior")]
[DefaultValue(DefaultBoolean.Default)]
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
True

Corresponds to a Boolean value of true.

False

Corresponds to a Boolean value of false.

Default

The value is determined by the current object’s parent object setting (e.g., a control setting).

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;
See Also