[Expand]General Information
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Collapse]WPF Controls
 [Expand]What's Installed
 [Expand].NET Core 3 Support
 [Expand]Common Concepts
 [Expand]MVVM Framework
 [Collapse]Controls and Libraries
  [Expand]Data Grid
  [Expand]Ribbon, Bars and Menu
  [Expand]Charts Suite
  [Expand]Pivot Grid
  [Expand]Rich Text Editor
  [Expand]Tree List
  [Expand]Gauge Controls
  [Expand]Map Control
  [Expand]Layout Management
  [Expand]Windows Modern UI
  [Expand]Data Editors
  [Expand]Navigation Controls
  [Expand]Spell Checker
  [Collapse]Property Grid
   [Expand]Getting Started
   [Expand]Property Definitions
    Property Attributes
    Property Categories
    Expandability Customization
    Property Menu
   [Expand]Visual Elements
    Appearance Customization
  [Expand]PDF Viewer
  [Expand]TreeMap Control
  [Expand]Gantt Control
  [Expand]Diagram Control
  [Expand]Windows and Utility Controls
   Dialogs, Notifications and Panels
  [Expand]Scheduler (legacy)
 [Expand]Scaffolding Wizard
  Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Report and Dashboard Server
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)

Property Menu

Expanded Property Menu Overview

The PropertyGridControl can show menu for each property. To enable or disable property menu, use the PropertyDefinition.ShowMenuButton property.

By default, the PropertyGridControl displays the following menu items.

  • The Refresh button invokes a bound property getter to refresh the value displayed in PropertyGridControl. This is particularly useful when editing objects that don't support change notifications.
  • The Reset button resets a property to its initial value and will be enabled when the CanResetValue method of a corresponding the property descriptor returns true. To enable the Reset button for standard non-dependency properties, specify the DefaultValue attribute.

The PropertyGridControl allows you to customize property menus. To add new menu items or remove the existing ones, use the following properties.


The PropertyDefinition.MenuCustomizations property has higher precedence than the PropertyGridControl.MenuCustomizations property.

Expanded Adding Custom Menu Items

To add a new property menu item, specify the required bar item within the MenuCustomizations collection. To learn more about available bar items, see The List of Bar Items and Links.

The CollectionAction.Index attached property specifies the position of the new item.

The following example demonstrates how to add a custom menu item to a property definition and specify the new item's position.

Expanded Removing Existing Menu Items

To remove an existing item from the property menu, add a RemoveAction object to the MenuCustomizations collection. The RemoveAction.ElementName property specifies the item that you want to remove. The static BarItemNames class stores the names of the default items.

The following example demonstrates how to remove a default menu item from the property menu.

Expanded See Also

Is this topic helpful?​​​​​​​