wpf-devexpress-dot-xpf-dot-propertygrid-dot-propertygridmenueventargs-0953b48f.md
Gets the invoked menu’s type.
Namespace : DevExpress.Xpf.PropertyGrid
Assembly : DevExpress.Xpf.PropertyGrid.v25.2.dll
NuGet Package : DevExpress.Wpf.PropertyGrid
public PropertyGridMenuType MenuType { get; }
Public ReadOnly Property MenuType As PropertyGridMenuType
| Type | Description |
|---|---|
| PropertyGridMenuType |
The invoked menu’s type.
|
Available values:
| Name | Description |
|---|---|
| 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
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
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