Posts
114
Comments
126
Trackbacks
10
INotifyPropertyChanged
There are 3 entries for the tag INotifyPropertyChanged
INotifyPropertyChanged with less code using Expressions
Technorati Tags: .NET,INotifyPropertyChanged... Parts 1 & 2 of this unintended trilogy: INotifyPropertyChanged with less typing using a Code Snippet INotifyPropertyChanged with less code using generics & reflection My previous post elicited a couple of good comments. Matt noted that my use of reflection to get the property name could be a problem in due to inlining in Release mode: http://stackoverflow.com/qu... http://www.hanselman.com/bl... ......
Posted On Monday, August 2, 2010 8:17 PM | Comments (2)
INotifyPropertyChanged with less code using generics & reflection
Technorati Tags: .NET,INotifyPropertyChanged... In my last post, I talked about using a Visual Studio code snippet for properties in classes implementing INotifyPropertyChanged: The code snippet lets me create the properties faster, but it's still a lot of repetitive "setter" code for each. What if I moved the "has the value changed?" and backing field update logic out of the property setters and replace my NotifyPropertyChanged method with this CheckForPropertyChange method?: protected bool CheckForPropertyChange<T... ......
Posted On Tuesday, July 27, 2010 8:44 AM | Comments (4)
INotifyPropertyChanged with less typing using a Code Snippet
Technorati Tags: .NET,INotifyPropertyChanged... Kevin Grossnicklaus gave a nice presentation on M-V-VM User Interface Patterns in Silverlight and WPF at last night's St. Louis .NET User Group meeting. A key part of MVVM is implementation of the INotifyPropertyChanged interface to let views know that bound properties have changed. Here's a simplified version of a model class from the MSDN INotifyPropertyChanged documentation: public class DemoCustomer : INotifyPropertyChanged { private Guid _id ......
Posted On Tuesday, July 27, 2010 7:48 AM | Comments (3)
Tag Cloud