Back to Devexpress

ContextItem.Glyph Property

windowsforms-devexpress-dot-utils-dot-contextitem-8a92d47e.md

latest3.0 KB
Original Source

ContextItem.Glyph Property

Gets or sets the glyph displayed by the current item in the normal (not hovered) state. This property is obsolete. Use the ImageOptionsCollection property instead.

Namespace : DevExpress.Utils

Assembly : DevExpress.Utils.v25.2.dll

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

Declaration

csharp
[Browsable(false)]
[DefaultValue(null)]
[DXCategory("Appearance")]
[EditorBrowsable(EditorBrowsableState.Never)]
public virtual Image Glyph { get; set; }
vb
<Browsable(False)>
<EditorBrowsable(EditorBrowsableState.Never)>
<DXCategory("Appearance")>
<DefaultValue(Nothing)>
Public Overridable Property Glyph As Image

Property Value

TypeDefaultDescription
Imagenull

An Image object that specifies the glyph displayed by the current item in the normal state.

|

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the Glyph property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

winforms-calendar-dateedit-cell-appearance-customization/CS/Calendar_CellStyleProvider/Form1.cs#L36

csharp
if (Holidays.IsHoliday(e.Cell.Date, out holidayText)) {
    e.Item.Glyph = global::Calendar_CellStyleProvider.Properties.Resources.Party;
    e.Item.Visibility = ContextItemVisibility.Visible;

winforms-calendar-dateedit-cell-appearance-customization/VB/Calendar_CellStyleProvider/Form1.vb#L37

vb
If Holidays.IsHoliday(e.Cell.Date, holidayText) Then
    e.Item.Glyph = My.Resources.Party
    e.Item.Visibility = ContextItemVisibility.Visible

See Also

ContextItem Class

ContextItem Members

DevExpress.Utils Namespace