What is the difference between NotifyOfPropertyChange("") and NotifyOfPropertyChange(null) #382
Replies: 2 comments
-
Beta Was this translation helpful? Give feedback.
-
When i call NotifyOfPropertyChange(null) then the method private static IEventBinding BindImpl<TSource, TProperty>(TSource target, Expression<Func<TSource, TProperty>> targetSelector, EventHandler<PropertyChangedExtendedEventArgs> handler, bool invoke) where TSource : class, INotifyPropertyChanged in PropertyChangedExtensions.cs is called. In this method a handler is registered to the event ProperyChanged, but this handler considers only the case when the PropertyName is the empty string and not the case when the PropertyName is null. Which is why the inner handler is not called in the PropertyName == null case. Only unfortunately I don't know what the handler does. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
After calling either method, the getters of the properties bound in the view are called. Both refresh the view. Is there a difference?
Beta Was this translation helpful? Give feedback.
All reactions