views:

188

answers:

1

I'm trying to add the validation and get the following from the compiler.

The property 'ValidatesOnException' was not found in type 'Binding'. The property 'ValidatesOnException' does not exist on the type 'Binding' in the XML namespace 'http://schemas.microsoft.com/winfx/2006/xaml/presentation'.

I tried adding System.Windows.Data in System.Windows as a xmlns but no luck.

The following are my attempts at the markup.

<TextBox x:Name="Office" Style="{StaticResource PhoneNumber}">
  <TextBox.Text>
    <Binding Path="Office" Mode="TwoWay" NotifyOnValidationError="true" ValidatesOnException="true" Converter="{StaticResource PhoneNumberConverter}" />
  </TextBox.Text>
</TextBox>


<TextBox x:Name="Office" Style="{StaticResource PhoneNumber}" Text="{Binding Office, Mode=TwoWay, NotifyOnValidationError=true, ValidatesOnException=true, Converter={StaticResource PhoneNumberConverter}}" />

Any ideas?

+1  A: 

The property is not called ValidatesOnException it is called ValidatesOnExceptions note the plural.

AnthonyWJones
Victim of the old "stared at it tool long". It's funny, I even thought spelling might be an issues and copied it from one of Jesse Liberty's examples. -- Thanks!!
PretzelSteelersFan