Reputation: 699
I'm working on a c# wpf app in which I databind a listbox control to an xml datasource. Now I know that I can find the XmlNode that is linked to a listboxitem using datacontext. But now I want to go the other way around: Find the associated listboxitem when I have an xmlnode..
Any advice?
Upvotes: 2
Views: 82
Reputation: 4502
What about :
for each listboxitem, you retrieve the XmlNode, then, you use .Equals() on the node you have...
Upvotes: 1