开发者

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?


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜