Back to Devexpress

PropertyGridMenuEventArgs.MenuType Property

wpf-devexpress-dot-xpf-dot-propertygrid-dot-propertygridmenueventargs-0953b48f.md

latest3.0 KB
Original Source

PropertyGridMenuEventArgs.MenuType Property

Gets the invoked menu’s type.

Namespace : DevExpress.Xpf.PropertyGrid

Assembly : DevExpress.Xpf.PropertyGrid.v25.2.dll

NuGet Package : DevExpress.Wpf.PropertyGrid

Declaration

csharp
public PropertyGridMenuType MenuType { get; }
vb
Public ReadOnly Property MenuType As PropertyGridMenuType

Property Value

TypeDescription
PropertyGridMenuType

The invoked menu’s type.

|

Available values:

NameDescription
Property

The property menu.

| | NewItem |

The new item menu.

|

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

wpf-property-grid-show-tooltips-in-new-item-menu/CS/PropertyGridMenuOpening/MainWindow.xaml.cs#L18

csharp
private void OnMenuOpening(object sender, PropertyGridMenuEventArgs e) {
    if (e.MenuType == PropertyGridMenuType.NewItem && e.Row.Path == "Issues") {
        e.Items[0].ToolTip = "Create a new breaking change.";

wpf-property-grid-show-tooltips-in-new-item-menu/VB/PropertyGridMenuOpening/MainWindow.xaml.vb#L15

vb
Private Sub OnMenuOpening(ByVal sender As Object, ByVal e As PropertyGridMenuEventArgs)
    If e.MenuType = PropertyGridMenuType.NewItem AndAlso Equals(e.Row.Path, "Issues") Then
        e.Items(0).ToolTip = "Create a new breaking change."

See Also

PropertyGridMenuEventArgs Class

PropertyGridMenuEventArgs Members

DevExpress.Xpf.PropertyGrid Namespace