Disabling the property grid's summary area

Grids for WPF Forum

Posted 7 years ago by Jake Reed
Version: 11.2.0551
Avatar

Hi there,

Is it possible to completely disable the summary area/description in the property grid. I know you can chose by default that the user can't see the summary area with the IsSummaryVisible="False" but the user can just right click on the property and click Description to show the summary area. I want to remove it completely so its not possible to ever see the description area

Comments (2)

Answer - Posted 7 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Jake,

If you change PropertyGrid.IsItemDefaultContextMenuEnabled to false, then the default context menu shouldn't show.

Please note that a side effect of that is that the user won't have access to the Reset menu item then.  But you can handle the PropertyGrid.ItemContextMenuOpening event and create a ContextMenu on the PropertyGridDataAccessorItem that is passed, and add a MenuItem on that context menu like:

MenuItem menuItem = new MenuItem();
menuItem.Command = PropertyGrid.ResetPropertyValueCommand;
menuItem.CommandParameter = this;
menu.Items.Add(menuItem);

That should do the trick.


Actipro Software Support

Posted 7 years ago by Jake Reed
Avatar

Thank you very much. That sound do the trick

Jake

The latest build of this product (v2019.1 build 0681) was released 18 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.