troubleshooting Question

WPF ListBox SelectedIndex issue

Avatar of Sid Price
Sid PriceFlag for United States of America asked on
Visual Basic.NET.NET Programming
12 Comments2 Solutions625 ViewsLast Modified:
I am setting the selected index of a bound listbox in my code behind in response to some processing that has happened. I can trace the code through and it is only setting the selected index once, the changed event for the selected index fires twice, the first time it is the value my code sets it to and the second time it is -1.

Since the code to do this is through a mixture of several objects it is hard to post an example here. Perhaps someone can give me a clue of how to debug this, or suggest why the selection I make is apparently getting reset by the listbox.

Sid Price
Software Systems Architect/Designer

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 2 Answers and 12 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 12 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros