0

I want to Bind a TextBox.Text to my object IDataErrorInfo.Error property that return summary of errors. My object is DataContext. Now i've a textbox like that:

<TextBox xmlns:sys="clr-namespace:System.ComponentModel;assembly=System" Text="{Binding Path=(sys:IDataErrorInfo.Error), Mode=OneWay}" />

and all works fine at runtime but at design time Visual Studio 2010 show an error: InvalidOperationException was thrown on "Binding": Object 'null' cannot be used as an accessor parameter for a PropertyPath. An accessor must be DependencyProperty, PropertyInfo, or PropertyDescriptor. Now with this error (in yellow bar) i can not use property toolbox to edit my windows. Anyone can help me solve this error?

1 Answer 1

0

Can you try this Text="{Binding Path=Error, Mode=OneWay}"

1
  • I implement interface implicitly for different reasons and doesn't work.
    – gram
    Commented Aug 17, 2011 at 7:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.