ContextItemCollectionOptions.AllowHtmlText Property
Gets or sets whether context items support HTML tags.
Namespace: DevExpress.Utils
Assembly: DevExpress.Utils.v24.1.dll
NuGet Packages: DevExpress.Utils, DevExpress.Wpf.Core
Declaration
Property Value
Type | Default | Description |
---|---|---|
Boolean | false | true if context items support HTML tags; otherwise, false. |
Property Paths
You can access this nested property as listed below:
Object Type | Path to AllowHtmlText |
---|---|
CameraControl |
|
CalendarControlBase |
|
ImageSlider |
|
RepositoryItemPictureEdit |
|
SvgImageBox |
|
TileControl |
|
TileView |
|
Remarks
You can use HTML tags to format ContextItem text. The code below demonstrates how to change a ContextButton‘s caption color.
using DevExpress.Utils;
// ...
pictureEdit1.Properties.ContextButtonOptions.AllowHtmlText = true;
((ContextButton)pictureEdit1.Properties.ContextButtons[0]).Caption = "<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 caption text and formatting.
See Also