C wpf listview not updating

Below is a simple method I’ve used that seems to work well, and allows you to pass parameters if needed.Hi, I have an Observable Collection in my View Model that I'm binding to the Items Source of a Combo Box.In that Pointer Pressed-Event Handler we just focus the List View Item when it has been clicked.

Now when we run this, the Text Box will lose its focus before the Selected Item of the List View is changed.“Lara Croft” is no more there, it’s lost (or should I write here “she’s lost”? In my opinion the name “Lara Croft” should have been written to the Content-Property of the first List View Item, but it didn’t happen. I debugged the compiled data binding code and found out the problem in UWP: The problem in UWP is: The Selected Item of the List View is changed before the Text Box is losing its focus.And the Text Box will write the data back to the Selected Item after it was losing its focus.But then the Selected Item is already a different one So in the Lost Focus-event handler for the Text Box – that you’ll find in the code for the compiled data binding in the obj/x86/Main Page.g.cs-file – you’ll see that the List View Item with the Content “Microsoft” gets the content “Microsoft”.The selection has already changed before this code is executed.

Leave a Reply