Back to Devexpress

ContextItem.Visibility Property

windowsforms-devexpress-dot-utils-dot-contextitem-16daa658.md

latest2.9 KB
Original Source

ContextItem.Visibility Property

Gets or sets the item visibility.

Namespace : DevExpress.Utils

Assembly : DevExpress.Utils.v25.2.dll

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

Declaration

csharp
[DefaultValue(ContextItemVisibility.Auto)]
[DXCategory("Appearance")]
public ContextItemVisibility Visibility { get; set; }
vb
<DXCategory("Appearance")>
<DefaultValue(ContextItemVisibility.Auto)>
Public Property Visibility As ContextItemVisibility

Property Value

TypeDefaultDescription
DevExpress.Utils.ContextItemVisibilityAuto

A ContextItemVisibility enumeration value that specifies the item visibility.

|

Remarks

By default, when the Visibility property is set to Auto , the current item is automatically visible when an end-user hovers over the owner control with the mouse cursor. Use this property to specify the item to be always visible or hidden.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the Visibility 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#L37

csharp
e.Item.Glyph = global::Calendar_CellStyleProvider.Properties.Resources.Party;
e.Item.Visibility = ContextItemVisibility.Visible;
e.Item.ToolTip = holidayText;

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

vb
e.Item.Glyph = My.Resources.Party
e.Item.Visibility = ContextItemVisibility.Visible
e.Item.ToolTip = holidayText

See Also

ContextItem Class

ContextItem Members

DevExpress.Utils Namespace