摘要:
要求:年龄不满18 就边框飘红 后台代码: public class AgeInfoWithValidation : IDataErrorInfo { public int Age { get; set; } public string this[string columnName] { get { 阅读全文
摘要:
实现简单的年龄划分: 如果年龄小于18则显示:年龄:x,未成年人; 否则:年龄:x,成年人; 代码: [ValueConversion(typeof(int), typeof(String))] public class AgeConverter : IValueConverter { public 阅读全文
摘要:
验证用户是否年满18+ public class AgeRule : ValidationRule { private Double limitAge = 18; public Double LimitAge { get { return limitAge; } set { limitAge = v 阅读全文