Back to Devexpress

ContextButtonBase.AllowHtmlText Property

windowsforms-devexpress-dot-utils-dot-contextbuttonbase-78bd1a44.md

latest2.9 KB
Original Source

ContextButtonBase.AllowHtmlText Property

Gets or sets whether the current button’s caption is formatted using HTML tags.

Namespace : DevExpress.Utils

Assembly : DevExpress.Utils.v25.2.dll

NuGet Packages : DevExpress.Utils, DevExpress.Wpf.Core

Declaration

csharp
[DefaultValue(DefaultBoolean.Default)]
[DXCategory("Appearance")]
public DefaultBoolean AllowHtmlText { get; set; }
vb
<DXCategory("Appearance")>
<DefaultValue(DefaultBoolean.Default)>
Public Property AllowHtmlText As DefaultBoolean

Property Value

TypeDefaultDescription
DefaultBooleanDefault

A DefaultBoolean enumeration value that specifies whether the current button’s caption is formatted using HTML tags.

|

Available values:

NameDescriptionReturn 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

The button caption specified by the ContextButtonBase.Caption property can be formatted using HTML tags. Set the AllowHtmlText property to True to enable this feature. If this property is set to Default , the feature is controlled by the owner control. To specify the global setting, use the corresponding property, accessible using the ContextButtonOptions property of the owner control. The AllowHtmlText property overrides the global setting for the current button.

HTML formatting allows you to display hyperlinks in the button caption using the href tag. See the ContextButtonBase.HyperlinkClick event to learn how to handle a click on a hyperlink.

For detailed information on supported HTML tags, see the HTML Text Formatting topic.

See Also

Caption

HyperlinkClick

HyperLinkColor

HTML-inspired Text Formatting

ContextButtonBase Class

ContextButtonBase Members

DevExpress.Utils Namespace