Skip to main content
A newer version of this page is available. .

ContextItemCollectionOptions.AllowHtmlText Property

Gets or sets whether context items support HTML tags.

Namespace: DevExpress.Utils

Assembly: DevExpress.Utils.v20.2.dll

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

Declaration

[DefaultValue(false)]
[XtraSerializableProperty]
public bool AllowHtmlText { get; set; }

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:

Show 49 property paths
Object Type Path to AllowHtmlText
AccordionControl
.ContextButtonsOptions .AllowHtmlText
TileBar
.ContextButtonOptions .AllowHtmlText
BaseCheckedListBoxControl
.ContextButtonOptions .AllowHtmlText
BaseDateControl
.ContextButtonOptions .AllowHtmlText
BaseImageListBoxControl
.ContextButtonOptions .AllowHtmlText
BaseListBoxControl
.ContextButtonOptions .AllowHtmlText
CameraControl
.ContextButtonOptions .AllowHtmlText
CheckedListBoxControl
.ContextButtonOptions .AllowHtmlText
CalendarControl
.ContextButtonOptions .AllowHtmlText
CalendarControlBase
.ContextButtonOptions .AllowHtmlText
ImageSlider
.ContextButtonOptions .AllowHtmlText
DateControl
.ContextButtonOptions .AllowHtmlText
ImageListBoxControl
.ContextButtonOptions .AllowHtmlText
ListBoxControl
.ContextButtonOptions .AllowHtmlText
RepositoryItemBaseSpinEdit
.ContextButtonOptions .AllowHtmlText
RepositoryItemBlobBaseEdit
.ContextButtonOptions .AllowHtmlText
RepositoryItemBreadCrumbEdit
.ContextButtonOptions .AllowHtmlText
RepositoryItemCalcEdit
.ContextButtonOptions .AllowHtmlText
RepositoryItemCheckedComboBoxEdit
.ContextButtonOptions .AllowHtmlText
RepositoryItemColorEdit
.ContextButtonOptions .AllowHtmlText
RepositoryItemColorPickEdit
.ContextButtonOptions .AllowHtmlText
RepositoryItemComboBox
.ContextButtonOptions .AllowHtmlText
RepositoryItemDateEdit
.ContextButtonOptions .AllowHtmlText
RepositoryItemDateTimeOffsetEdit
.ContextButtonOptions .AllowHtmlText
RepositoryItemFontEdit
.ContextButtonOptions .AllowHtmlText
RepositoryItemGridLookUpEdit
.ContextButtonOptions .AllowHtmlText
RepositoryItemGridLookUpEditBase
.ContextButtonOptions .AllowHtmlText
RepositoryItemImageComboBox
.ContextButtonOptions .AllowHtmlText
RepositoryItemImageEdit
.ContextButtonOptions .AllowHtmlText
RepositoryItemLookUpEdit
.ContextButtonOptions .AllowHtmlText
RepositoryItemLookUpEditBase
.ContextButtonOptions .AllowHtmlText
RepositoryItemMemoExEdit
.ContextButtonOptions .AllowHtmlText
RepositoryItemMRUEdit
.ContextButtonOptions .AllowHtmlText
RepositoryItemPictureEdit
.ContextButtonOptions .AllowHtmlText
RepositoryItemPopupBase
.ContextButtonOptions .AllowHtmlText
RepositoryItemPopupBaseAutoSearchEdit
.ContextButtonOptions .AllowHtmlText
RepositoryItemPopupContainerEdit
.ContextButtonOptions .AllowHtmlText
RepositoryItemPopupGalleryEdit
.ContextButtonOptions .AllowHtmlText
RepositoryItemSearchControl
.ContextButtonOptions .AllowHtmlText
RepositoryItemSearchLookUpEdit
.ContextButtonOptions .AllowHtmlText
RepositoryItemSpinEdit
.ContextButtonOptions .AllowHtmlText
RepositoryItemTimeEdit
.ContextButtonOptions .AllowHtmlText
RepositoryItemTimeSpanEdit
.ContextButtonOptions .AllowHtmlText
RepositoryItemTreeListLookUpEdit
.ContextButtonOptions .AllowHtmlText
SvgImageBox
.ContextButtonOptions .AllowHtmlText
TileControl
.ContextButtonOptions .AllowHtmlText
TileViewOptionsKanban
DateNavigator
.ContextButtonOptions .AllowHtmlText
ResourcesCheckedListBoxControl
.ContextButtonOptions .AllowHtmlText

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.

AllowHtmlText

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

PropertiesAllowHtmlText

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

ContextButtonsCollection

Specify the ContextButton‘s caption text and formatting.

EditorAllowHtmlText

See Also