ViewModel.cs 899 B

12345678910111213141516171819202122232425262728293031323334353637
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. namespace CmwtatDigital.Domain
  8. {
  9. class ViewModel : INotifyPropertyChanged
  10. {
  11. private string _sn;
  12. public ViewModel()
  13. {
  14. LongListToTestComboVirtualization = new List<int>(Enumerable.Range(0, 1000));
  15. }
  16. public string SN
  17. {
  18. get { return _sn; }
  19. set
  20. {
  21. this.MutateVerbose(ref _sn, value, RaisePropertyChanged());
  22. }
  23. }
  24. public IList<int> LongListToTestComboVirtualization { get; }
  25. public event PropertyChangedEventHandler PropertyChanged;
  26. private Action<PropertyChangedEventArgs> RaisePropertyChanged()
  27. {
  28. return args => PropertyChanged?.Invoke(this, args);
  29. }
  30. }
  31. }