views:

16

answers:

1

I want to bind Validation.HasError to a boolean property on my viewmodel. I only want to know when there is a validation error so that I can disable my buttons on my VM using canexecute methods from my relay commands. I get this error though:

'Validation.HasError' property is read-only and cannot be set from markup. 

I have tried different modes and they all cause this error. How do I do this? It shouldnt be this difficult.

A: 

You can't set a Binding on a read-only dependency property. This is a known bug at Microsoft Connect. You might vote for it.

The BookLibrary sample application of the WPF Application Framework (WAF) shows how to listen to the Validation.HasError property and disable some buttons.

jbe
Thanks I will definately check into it...
ecathell