ContextItemCollectionOptions.AllowHtmlTextInToolTip Property
Gets or sets whether context items‘ tooltips support HTML tags.
Namespace: DevExpress.Utils
Assembly: DevExpress.Utils.v24.2.dll
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. |
|
False | The value is false. |
|
Default | The value is specified by a global option or a higher-level object. |
|
Property Paths
You can access this nested property as listed below:
Object Type | Path to AllowHtmlTextInToolTip |
---|---|
CameraControl |
|
CalendarControlBase |
|
ImageSlider |
|
RepositoryItemPictureEdit |
|
SvgImageBox |
|
TileControl |
|
TileView |
|
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.
Alternatively, you can set AllowHtmlText to true in the Properties window.
Then click the ContextButtons ellipsis button to open the Collection Editor.
Specify the ContextButton‘s tooltip text and formatting.