I have a ListBox bound to a collection of custom objects, and an ItemTemplate which uses a custom UserControl to display the objects.
For some reason my program keeps crashing with errors usually along the lines of "Object of type 'MS.Internal.NamedObject' cannot be converted to type '...'."
Since my collection contains only objects of my custom class, and my UserControl expects to have a DataContext of one of these objects, this is causing a lot of problems in my code.
What I would like to know is why are my objects becoming disconnected and why are random objects that aren't part of my bound collection being placed inside my ListBox anyway?
Thanks for any help addressing this problem.
View Complete Post