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注意复数

链接地址: http://www.djcxy.com/p/34538.html

上一篇: 在Silverlight中触发ComboBox

下一篇: 未找到Silverlight 3 ValidatesOnException