tags:

views:

26

answers:

1

Hi,

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?

+1  A: 

Hello,

What about :

for each listboxitem, you retrieve the XmlNode, then, you use .Equals() on the node you have...

G. Qyy
Thanks, hope it's not too memory heavy though, I'll try a parallel foreach then
internetmw