InfoBarMessageControlGenerationMode, break validation ?

Topics: Issues / bugs, Questions
Jan 14, 2014 at 9:19 AM
He guys, I using Catel with doing some dialogs. But I wanna use my own validation style.

If I set the dialog validation mode to: InfoBarMessageControlGenerationMode.None

No Validation happend anymore !
I thought, the "None" value allows to use the default validation style with fields. But the Validation Method in my ViewModel will never called again.

Anyone knows a work around ? Thx for help :)

Catelversion: 4.X
Jan 14, 2014 at 9:26 AM
Cool that you are using Catel 4.x, where did you get it? ;-)

Anyway, the InfoBarMessageControl != validation. It is just a way to display the validation, but the validation sequence will still be handled. Just override one of the Validate methods on the view model and you will see that they are still being called. They are just not being displayed to the end-user in the form of the InfoBarMessageControl.

If you feel that it is not working, please create a reproducable scenario in the official issue tracker:
Jan 14, 2014 at 9:39 AM
Edited Jan 14, 2014 at 9:39 AM
Ouch, assembly version != nuget version, I wanted to say 3.8.1 D:

thx for your fast answer.

Validation is called in viewModel, sorry for the overzealous statement. Is there a way to show the validation for the user by default and not via the default style "InfoBarMessageControl" ?

Jan 14, 2014 at 9:41 AM
You can use the default built-in manner of xaml:

<TextBox Text="{Binding SomeText, Mode=TwoWay, NotifyOnValidationErrors=True, ValidateOnErrors=True}" />

Then it will show a red border when the property SomeText has an error.
Jan 14, 2014 at 9:50 AM
damn, not my day ... sorry.
Better I wanna go home now!

thx for your patience :D

I found my bug .... had nothing to do with catel...
Jan 14, 2014 at 9:56 AM
No problem, glad it is all working for you now.