Bound WPF TextBox is not updating value when the bound property enforces some business rules
- 阅读更多 关于 Bound WPF TextBox is not updating value when the bound property enforces some business rules
问题 I am using .NET 4.0. I have some very simple code that lets the user type in a number between 1 and 99,999 (inclusive). I have some logic in the Property setter that prevents the latest value from being applied if it does not adhere to the business rules (e.g., it is not a number or the number is too large). public class MainViewModel : INotifyPropertyChanged { #region Fields private string _text = string.Empty; #endregion // Fields #region Properties public string Text { get { return _text;