WPF DataGrid : CanContentScroll property causing odd behavior

Posted by Sonic Soul on Stack Overflow See other posts from Stack Overflow or by Sonic Soul
Published on 2010-06-17T14:27:50Z Indexed on 2010/06/17 15:43 UTC
Read the original article Hit count: 771

Filed under:
|
|

i have a solution where i generate a DataGrid (or multiple instances) based on user criteria.. each grid keeps receiving data as it comes in via ObservableCollection

the problem i had, was that the scroll acted weird. It was choppy, and scrollbar would resize it self while scrolling.

than i found.. CanContentScroll property! It completely fixes the weird scrolling behavior bringing me temporary bliss and happiness.

however, it causes 2 unfortunate side effects.

  1. whenever i re-create grid instances and bind them to my observable collection, it freezes my entire window for 5 seconds. when my grid grows to a big size, this delay can last for 30 seconds.

  2. when i call TradeGrid.ScrollIntoView(TradeGrid.Items(TradeGrid.Items.Count - 1)) to scroll to the bottom, it jumps to bottom and than back to the top.

is there another way to achieve smooth scrolling perhaps?

© Stack Overflow or respective owner

Related posts about wpf

Related posts about wpf-binding