Back to Devexpress

PopupMenuBase.Tag Property

windowsforms-devexpress-dot-xtrabars-dot-popupmenubase.md

latest2.2 KB
Original Source

PopupMenuBase.Tag Property

Gets or sets user-defined data associated with the control.

Namespace : DevExpress.XtraBars

Assembly : DevExpress.XtraBars.v25.2.dll

NuGet Package : DevExpress.Win.Navigation

Declaration

csharp
[DefaultValue(null)]
public object Tag { get; set; }
vb
<DefaultValue(Nothing)>
Public Property Tag As Object

Property Value

TypeDefaultDescription
Objectnull

An object representing the data.

|

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the Tag 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-grid-show-context-menu-for-rows/CS/FormGridMenu.cs#L17

csharp
if (e.MenuType == GridMenuType.Row) {
    popupMenu_Row.Tag = e.HitInfo;
    e.ShowCustomMenu(popupMenu_Row);

winforms-grid-show-context-menu-for-rows/VB/FormGridMenu.vb#L18

vb
If e.MenuType = GridMenuType.Row Then
    popupMenu_Row.Tag = e.HitInfo
    e.ShowCustomMenu(popupMenu_Row)

See Also

PopupMenuBase Class

PopupMenuBase Members

DevExpress.XtraBars Namespace