I’m looking for some general WPF/C# info on binding to a custom class using ObervableCollection. I currently have an error relating to “BindingExpression path error”…”property not found on”. Any pointers would be good.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It sounds like you haven’t assigned your DataContext. Below is a brief example.
Assuming your custom class looks something like this:
CODE:
and your XAML looks like
XAML:
Set your DataContext in code behind.
This is a very simplistic version to achieve what you need. You should really have a look at Binding to Collections.