Click here to Skip to main content
15,393,637 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a WPF app using the MVVM design pattern and am getting a lot of binding errors such as the one below in my UserControls;

System.Windows.Data Error: 40 : BindingExpression path error: 'AttachmentTabToolbarClickCommand' property not found on 'object' ''ComponentWindowViewModel' (HashCode=55280873)'. BindingExpression:Path=DataContext.AttachmentTabToolbarClickCommand; DataItem='AttachmentTabControl' (Name='AttControl'); 
target element is 'Button' (Name=''); 
target property is 'Command' (type 'ICommand')


Although Visual Studio 2017 shows an error the binding works. I used the snoop utility and that app didn't show an error.

I've worked on the error for a couple of days and if I can get the error fixed the binding doesn't work and vice versa.

My question is should I ignore the errors, after all it works or will it bite me in the butt later?

I don't want to know how to fix it, I haven't provided enough information for that I just want to know if I should be concerned?

What I have tried:

Proxy
Deriving class from Freezable
Relative binding

You name it I've tried it, obviously not what it needs but everything else. :)
Posted
Comments
Gerry Schmitz 15-Jul-20 14:14pm
   
The order in which user controls load, initialize and "reload" varies. "Tabs" also have events that may come into play. I usually wind up using trace messages to see who does what when in their load and initialize events.
Mike Hankey 15-Jul-20 14:30pm
   
Hadn't thought about loading order. Thanks!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900