bodong1987 / Avalonia.PropertyGrid

A property edit control in Avalonia like DevExpress's PropertyGridControl.
https://www.cnblogs.com/bodong
MIT License
182 stars 19 forks source link

In MVVM pattern, can't get Data Validation result in ViewModel #37

Closed tsctsc6 closed 2 weeks ago

tsctsc6 commented 2 months ago

You PropertyGrid automates real-time detection of data legitimacy, that is nice. However, in ViewModel, the program not sure if the data is legit. For example, the user still can click the button when the data was not legitimate; or after the userclick the button, program don't know if the data is legit. I hope PropertyGrid can add a bool property call "HasErrors", which can bind to ViewModel.

tsctsc6 commented 2 months ago

In other words, there should be a way to learn in the parent control whether the data in the PropertyGrid is legal or not.