Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
220
Complex property editor in xamPropertyGrid
posted

We are in an MVVM design pattern using the xamPropertyGrid.
One of our property is a Polynomial that needs to be edited using a specialized editor that is implemented using a separate dialog (see attachment).
Is there a way to define a command that would bring up this dialog?
For example, we already have the Reset command on each property.
Is it possible to add an Edit command to this menu and bind an ICommand to it to bring up the custom dialog editor?
Of course, the Edit command should only appear on properties of type Polynomial.

Parents
No Data
Reply
  • 34810
    Offline posted

    Hello Jean-Marc,

    I have been investigating into the behavior that you are looking to achieve, and I there are a couple of things that I can recommend on this matter.

    The first is to use a PropertyGridEditorDefinition in the XamPropertyGrid.EditorDefinitions collection. This will allow you to place your own display inside of the "editor" portion of each property. You can target the properties by name, category, or type. If you were to place something along the lines of a Button that launches your custom dialog inside of your EditorDefinition, you could create an ICommand that works with the Button.Command property and launches that dialog. You can read further about EditorDefinitions in the XamPropertyGrid here: https://es.infragistics.com/help/wpf/xampropertygrid-conf-editors#_Ref394493705.

    If you are still looking to add to the "Reset" menu in this case, I would then recommend that you take a look at the following online documentation article that describes how you can modify this menu to include your own menu items: http://help.infragistics.com/Help/Doc/WPF/2015.1/CLR4.0/html/xamPropertyGrid_Resetting_Property_Value.html#_Ref395188115.

    I hope this helps. Please let me know if you have any other questions or concerns on this matter.

Children
No Data