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.v20.1.dll

Declaration

[DXCategory("Behavior")]
[DefaultValue(DefaultBoolean.Default)]
public virtual DefaultBoolean AllowHtmlDraw { get; set; }
<DXCategory("Behavior")>
<DefaultValue(DefaultBoolean.Default)>
Public Overridable Property AllowHtmlDraw As DefaultBoolean

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.

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.

Examples

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