Created
September 13, 2011 06:57
-
-
Save johnnyelwailer/1213288 to your computer and use it in GitHub Desktop.
Sample of using DependencyObsevation. letting the viewmodel know the dependencies of a property (calling RaisePropertyChanged when those change)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public string FullName | |
{ | |
get | |
{ | |
using (var obs = DependencyObservation.Of(this, @this => @this.FullName)) | |
{ | |
return obs.Follow(@this => @this.FirstName) + obs.Follow(@this => @this.LastName); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment