Silverlight 3 ValidatesOnException not found
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?
该属性不称为ValidatesOnException
它被称为ValidatesOnExceptions
注意复数 。