MahApps.Metro.SimpleChildWindow icon indicating copy to clipboard operation
MahApps.Metro.SimpleChildWindow copied to clipboard

when use validate in simplechildwindow, not display as expect

Open lwqwag opened this issue 5 years ago • 6 comments

i use validate property binding to xaml with validate, childwindow loaded first time validate errors not displayed as expect .when error has been cleared,i triggered an error,then the childwindow could display the validate error as expect just like the demo in https://github.com/lwqwag/TestMahApp Thx for your help.

lwqwag avatar Apr 18 '20 04:04 lwqwag

Hi @lwqwag

would it be an option for you to switch to INotifyDataErrorInfo? in my experience it is better than the old way validation worked. I can provide a sample if you wish.

Happy coding Tim

timunie avatar Apr 18 '20 09:04 timunie

Hi @timunie Thanks for your reply. INotifyDataErrorInfo validation method will be a option for me. Your help is greatly appreciated.

lwqwag avatar Apr 18 '20 10:04 lwqwag

@lwqwag I am sorry, but my Idea doesn't work either. It seems to be a bug, that it does not get the Validation when loaded. By the way: Many thanks for the great example. 👍

Happy coding Tim

timunie avatar Apr 18 '20 11:04 timunie

I investigated this issue a bit further and it turned out that the validation works correct if I wrap the Content of the ChildWindowinside an AdornerDekorator.

Here is my test branch. Maybe it helps for a solution: https://github.com/timunie/MahApps.Metro.SimpleChildWindow/tree/ValidationTest

Have a great weekend Tim

timunie avatar Apr 18 '20 15:04 timunie

@timunie I tested the branch you provided,and it worked well. It's a great job! Thanks a lot again.

lwqwag avatar Apr 18 '20 15:04 lwqwag

Good morning @lwqwag please reopen this issue. I think it is a bug anyway, because my solution was just a workaround.

Thanks, Tim

timunie avatar Apr 20 '20 04:04 timunie

I think it is a bug anyway,

Yeah, it's a WPF thing :-(

punker76 avatar Oct 03 '22 20:10 punker76