Guest User

Untitled

a guest
Aug 16th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. public class MyCoolViewModel
  2. {
  3. string _FooBar;
  4. public string Foobar {
  5. get { return _FooBar; }
  6. set { this.RaiseAndSetIfChanged(x => x.Foobar); }
  7. }
  8.  
  9. public MyCoolViewModel()
  10. {
  11. IObservable<ObservedChanged<string>> changesToFoobar = this.ObservableFromProperty(x => x.Foobar);
  12. changesToFoobar.Where(x => x.Value != null).Subscribe(Console.WriteLine);
  13. }
  14. }
Add Comment
Please, Sign In to add comment