-
Notifications
You must be signed in to change notification settings - Fork 884
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PropertyGrid raises NullReferenceException if a PropertyChanged event is raised on a null value #1464
Comments
I have a the exact same problem with nullable DateTime Property in my model object since I updated from version 3 to 3.5. The PropertyGrid just crashes whenever a Null is put in the DatePicker cell either from code or by deleting the Date value in the UI. Error Message: Object reference not set to an instance of an object. StackTrace: at Xceed.Wpf.Toolkit.PropertyGrid.DescriptorPropertyDefinitionBase.UpdateAdvanceOptionsForItem(DependencyObject dependencyObject, DependencyPropertyDescriptor dpDescriptor, Object& tooltip) WPF:
|
Well, for those of you that need this production crash solved ASAP, you can always rollback to an earlier (although now unlisted) Nuget package version: https://www.nuget.org/packages/Extended.Wpf.Toolkit/3.4.0/ |
Hi, |
Ok, well now we know that the open source version is not being maintained anymore. |
Hi, |
Usually, the open source quality is not good enough for any serious usage as there are known critical issues that are fixed in a years time (or so) and there are always new critical issues creeping up in that amount of time. You can see the difference for AvalonDock's current version 3.5 at the bottom of this page: ...and you can refere to this Wiki page for older versions: |
It looks like this has been fixed as of 9/27/2019 See DescriptorPropertyDefinitionBase.cs Line 213 |
In my model implementing
INotifyPropertyChanged
if I have a string property with a null value and call the setter on the property with a null value, and raisePropertyChanged
then thePropertyGrid
throws aNullReferenceException
.In
DescriptorPropertyDefinitionBase
the lineif (this.Value.Equals(this.DefaultValue))
throws ifthis.Value
is null.I have worked around it by making my model object setter default to
string.Empty
in this case, but for more complex objects there may be an issue.The text was updated successfully, but these errors were encountered: