Skip to main content

ContextItemCollectionOptions.AllowHtmlTextInToolTip Property

Gets or sets whether context items‘ tooltips support HTML tags.

Namespace: DevExpress.Utils

Assembly: DevExpress.Utils.v24.1.dll

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

Declaration

[DefaultValue(DefaultBoolean.Default)]
[XtraSerializableProperty]
public DefaultBoolean AllowHtmlTextInToolTip { get; set; }

Property Value

Type Default Description
DefaultBoolean Default

True, to enable HTML formatting in DevExpress.Utils.ContextItem tooltips; False, to disable; Default, to use the ToolTipController.AllowHtmlText setting.

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

Property Paths

You can access this nested property as listed below:

Object Type Path to AllowHtmlTextInToolTip
CameraControl
.ContextButtonOptions .AllowHtmlTextInToolTip
CalendarControlBase
.ContextButtonOptions .AllowHtmlTextInToolTip
ImageSlider
.ContextButtonOptions .AllowHtmlTextInToolTip
RepositoryItemPictureEdit
.ContextButtonOptions .AllowHtmlTextInToolTip
SvgImageBox
.ContextButtonOptions .AllowHtmlTextInToolTip
TileControl
.ContextButtonOptions .AllowHtmlTextInToolTip
TileView
.ContextButtonOptions .AllowHtmlTextInToolTip

Remarks

You can use HTML tags to format ContextItem tooltips. The code below demonstrates how to change a ContextButton‘s tooltip text color.

using DevExpress.Utils;
// ...
pictureEdit1.Properties.ContextButtonOptions.AllowHtmlTextInToolTip = DefaultBoolean.True;
pictureEdit1.Properties.ContextButtons[0].ToolTip = "<color=red>Select</color>";

The image below demonstrates the result.

HtmlToolTip

Alternatively, you can set AllowHtmlText to true in the Properties window.

PropertiesHtmlToolTip

Then click the ContextButtons ellipsis button to open the Collection Editor.

ContextButtonsCollection

Specify the ContextButton‘s tooltip text and formatting.

EditorHtmlToolTip

See Also