wpfenumsnullablewpftoolkit

WPF Toolkit Propertybox does not display nullable Enums


I'm currently using the Extended WPF Toolkit and from that i'm using the Propertybox. This box displays all properties of a bound element. While this works great, there is one problem. I'm using Nullable... so it does not display this enum correctly (it just gives a textbox). If i changed the enum to a normal enum (not nullable), then it displays the items correctly in a combobox.

To solve this, i tried the IItemsSource interface as described in the documentation, but this won't allow me to add a "null" value either.

I know i could solve this by adding a fake "null" value to my enumlist, but i would like to avoid this. Does anyone here know how i could make my nullable display correctly?

Kind regards Tom

Control documentation: https://wpftoolkit.codeplex.com/wikipage?title=PropertyGrid


UPDATE SOLUTION: I "solved" it by using a different control. http://www.codeproject.com/Articles/87715/Native-WPF-4-PropertyGrid. This grid supports it out of the box.


Solution

  • SOLUTION: I "solved" it by using a different control. https://github.com/xceedsoftware/wpftoolkit. This grid supports Nullable out of the box, and has some filtering functions for the properties you want to display that are not included in the Community Edition of the WPF Toolkit.

    Update 2020: Added link to current webpage.