WPF ListView.CurrentChanged too fast for binding

Posted by matt on Stack Overflow See other posts from Stack Overflow or by matt
Published on 2010-04-02T12:12:40Z Indexed on 2010/04/02 12:13 UTC
Read the original article Hit count: 350

Filed under:
|
|

My case:

  • MVVM
  • ListView+Details(custom UserControl)
  • List bound to MV.Items (IsSynchronizedWithCurrent=true)
  • Details bound to MV.Items.Current
  • MV.Items.Count == 100
  • about 0.2sec to read details (lazy mode)

When I hold the down arrow on the list, very strange things happen:

  • list items order change
  • current changes in the random order
  • CPU usage drastically increments and eventually all hangs.

I've read some post that one should start the timer or run handler in the background, but I am not able to do that, since all the binding WPF does for me.

Is there some way to instruct the binding in my DetailsControl, to wait a while before accepting CurrentItem? Or should I just resign from the clean solution and write custom code in my MV to handle that?

© Stack Overflow or respective owner

Related posts about wpf

Related posts about binding