Posts

Showing posts with the label INotifyPropertyChanged

An easy way to update all the UI Property Bindings of an Instance at once! – Silverlight and WPF

Imagine that you have a lot of properties in a class and you are very sure that all of those properties are getting updated at the same point of time. What generally we do in the ViewModel scenario is that we create Property setters for all these and raise PropertyChanged event so as to get the data reflected in the UI layer bindings. But that is a real resource waste when you really know the time of all your property updates. The solution is really easy as per the MSDN documentation for PropertyChanged Event in the remarks section it says “ The PropertyChanged event can indicate all properties on the object have changed by using either a null reference (Nothing in Visual Basic) or String.Empty as the property name in the PropertyChangedEventArgs .” It seems that this is a great saver in terms of code writing and execution, since we need to raise only one PropertyChanged Event per class just after the property updation. Think about a Stock Trading scenario as an example to this, yo...