Skip to content

Instantly share code, notes, and snippets.

@johnnyelwailer
Created September 13, 2011 06:57
Show Gist options
  • Save johnnyelwailer/1213288 to your computer and use it in GitHub Desktop.
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)
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