ContextItemCollectionOptions.AllowHtmlTextInToolTip Property
Gets or sets whether context items‘ tooltips support HTML tags.
Namespace: DevExpress.Utils
Assembly: DevExpress.Utils.v20.2.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 |
---|---|
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). |
Property Paths
You can access this nested property as listed below:
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.