Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[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
  Prerequisites
 [Expand]What's Installed
 [Expand]Common Concepts
 [Expand]MVVM Framework
 [Collapse]Controls and Libraries
  [Expand]Windows and Utility Controls
   Dialogs, Notifications and Panels
   Reporting
  [Expand]Data Grid
  [Expand]Ribbon, Bars and Menu
  [Expand]Charts Suite
  [Expand]Pivot Grid
  [Expand]Scheduler
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Tree List
  [Expand]Gauge Controls
  [Expand]Map Control
  [Expand]Layout Management
  [Expand]Windows Modern UI
  [Expand]Printing-Exporting
  [Expand]Data Editors
  [Expand]Navigation Controls
  [Expand]Spell Checker
  [Collapse]Property Grid
    Overview
   [Expand]Getting Started
   [Expand]Property Definitions
    Property Attributes
    Property Categories
    Descriptions
    Expandability Customization
    Property Menu
   [Expand]Visual Elements
    Appearance Customization
  [Expand]PDF Viewer
  [Expand]TreeMap Control
  [Expand]Diagram Control
  [Expand]Scheduler (legacy)
 [Expand]Scaffolding Wizard
 [Expand]Localization
  Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Reporting
[Expand]Report Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

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.

Note

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 BarItemNames static 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?​​​​​​​