Validation Binding from code

Feb 20, 2009 at 1:27 PM
Hi,

 My question is straight forward. How can I make a validation binding from code.

 This is for normal binding works:
            Binding binding = new Binding(MainItemPath) { Source = DestinationItem };
            cbAddress.SetValue(ComboBox.SelectedItemProperty, binding);

 This is for validation binding does not work:
            ValidationBinding binding = new ValidationBinding(MainItemPath) { Source = DestinationItem };
            cbAddress.SetValue(ComboBox.SelectedItemProperty, binding);

Thank you,
Coordinator
Feb 25, 2009 at 3:26 PM
Hi Calin,

This was really Simon's territory. I don't know where he's been (I suspect rather busy on a contract). I'll take a look at this over the weekend to see if I can figure out whats not working. But this really isn't my area :(
Feb 25, 2009 at 3:49 PM
Hi DaneOConnor,

 Thank you for your time, I found a work around but it will still be nice to have it work.

Regards,
Calin