CMWTAT_Digital_Edition/CMWTAT_DIGITAL/Domain/ViewModel.cs

38 lines
900 B
C#

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CMWTAT_DIGITAL.Domain
{
class ViewModel : INotifyPropertyChanged
{
private string _sn;
public ViewModel()
{
LongListToTestComboVirtualization = new List<int>(Enumerable.Range(0, 1000));
}
public string SN
{
get { return _sn; }
set
{
this.MutateVerbose(ref _sn, value, RaisePropertyChanged());
}
}
public IList<int> LongListToTestComboVirtualization { get; }
public event PropertyChangedEventHandler PropertyChanged;
private Action<PropertyChangedEventArgs> RaisePropertyChanged()
{
return args => PropertyChanged?.Invoke(this, args);
}
}
}