PageRenderTime 47ms CodeModel.GetById 19ms RepoModel.GetById 0ms app.codeStats 0ms

/Main/src/Xbap/DynamicDataDisplay.Xbap.Samples/Internals/ViewState.cs

#
C# | 37 lines | 31 code | 6 blank | 0 comment | 2 complexity | 884c5e4f9f7c08253fb74a5a06bba12f MD5 | raw file
Possible License(s): CC-BY-SA-3.0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Windows;
  6. using System.Diagnostics;
  7. using System.ComponentModel;
  8. namespace Microsoft.Research.DynamicDataDisplay.Samples.Internals
  9. {
  10. public class ViewState : DependencyObject, INotifyPropertyChanged
  11. {
  12. private static readonly ViewState state = new ViewState();
  13. public static ViewState State { get { return state; } }
  14. private object value;
  15. public object SelectedValue
  16. {
  17. get { return value; }
  18. set
  19. {
  20. this.value = value;
  21. if (PropertyChanged != null)
  22. {
  23. PropertyChanged(this, new PropertyChangedEventArgs("SelectedValue"));
  24. }
  25. }
  26. }
  27. #region INotifyPropertyChanged Members
  28. public event PropertyChangedEventHandler PropertyChanged;
  29. #endregion
  30. }
  31. }