Validation in ContentDialog, what is the best way to do it? #254
Unanswered
FSharpCSharp
asked this question in
Q&A
Replies: 1 comment
-
|
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I want to use the ContentDialog with a custom developed ViewModel to retrieve data from the user. This is all working great, except for the fact that I'm having some issues with validation.
My ViewModel uses the options available in Avalonia for data validation, in this case using the INotifyDataErrorInfo interface.
The errors from the validations are also displayed on the interface. But now I want to enable or disable the buttons based on these validation results.
Is there a recommended way to do this with FluentAvalonia? Theoretically I could just pass the ContentDialog to my ViewModel. This is not quite optimal, but it would work.
Somehow it would be best if there was a special derivation of the ViewModel specifically for the ContentDialog. This would then have to be able to manage the buttons accordingly.
And finally a question or request to the developers. Would it be possible in the future to provide an example for the validation in connection with the ContentDialog in the example project? I think almost everyone will have similar challenges, and that's where perhaps a system native solution or design pattern would be useful. In my view, it makes no sense to reinvent the wheel.
Beta Was this translation helpful? Give feedback.
All reactions