VmDataGriValidation.cs 856 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. using FWindSoft.Data;
  2. using FWindSoft.MVVM;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Linq;
  6. using System.Text;
  7. using System.Threading.Tasks;
  8. namespace Test.ValidateRule
  9. {
  10. public class VmDataGriValidation: BaseViewModel
  11. {
  12. public VmDataGriValidation()
  13. {
  14. People = new List<Person>();
  15. for (int i = 0; i < 10; i++)
  16. {
  17. People.Add(new Person() { Name = $"姓名{i}" });
  18. }
  19. }
  20. public List<Person> People { get; set; }
  21. }
  22. public class Person : BasePropertyChanged
  23. {
  24. private string m_Name;
  25. public string Name
  26. {
  27. get { return this.m_Name; }
  28. set
  29. {
  30. this.m_Name = value;
  31. RaisePropertyChanged("Name");
  32. }
  33. }
  34. }
  35. }