I am working with the WPF Toolkit data grid and it is scrolling extremely slow at the moment. The grid has 84 columns and 805 rows. (Including 3 fixed columns and the heade
Since I can't see your source code it is quite hard to help you. Especially since the performance of a WPF application is influenced by a lot of things. For some hints on what to look out for see Optimizing WPF Application Performance. And yes - it greatly matters what xaml is used in each cell. Because usually performance problems do boil down to "too many elements". Did you know that a TextBox are I think 30 individual elements? I recommend you use the Performance Profiling Tools for WPF to find out more about your specific problem. Try to minimize the amount of elements you are using (e.g. by switching from TextBox to TextBlock where appropriate).
Also you have to check if the performance problems exist on any PC you try the application on. Maybe the PC you are using is forcing WPF into software based rendering. Or are you using any BitmapEffects?
Edit:
Looking at your code I would suggest you change
column.Width = DataGridLength.Auto;
to a reasonable fixed width, since the datagrid does not have to recalculate the width dynamically every time something changes (like adding rows, or even scrolling).
One thing that I would suggest in such scenarios is to look at how you have applied the styling and what the style is on each cell. The styling applied if it has a complex Visual Tree does tend to degrade performance.
You could also try the Deferred Scrolling option on the latest WPF Datagrid.
in one of my projects the following grid style setting was causing a major performance problem:
<Style TargetType='{x:Type controls:DataGrid}'>
<Setter Property='ScrollViewer.CanContentScroll' Value='False' />
...
When I removed the ScrollViewer.CanContentScroll setting, the performance problem was gone.
I had a case where my underlying object had property with setter only. The same property was accessible by implementing ITypedList in the collection and via TypeDescriptionProvider/ICustomTypeDescriptor on the individual objects. Either removing the property or adding a getter resolved the performance issues.
Do you by any chance have a tablet of any sort installed (via USB or a tablet PC)?
I found a performance bug in the WPF datagrid when using a tablet. I posted a video and it is acknowledged by MS here in this thread
Cheers, Jon
A general tip for DataGrid performance issues: I had a problem with the DataGrid in which it took literally seconds to refresh after a window resize, column sort, etc. and locked up the window UI while it was doing so (1000 rows, 5 columns).
It came down to an issue (bug?) with the WPF sizing calculations. I had it in a grid with the RowDefinition Height="Auto" which was causing the rendering system to try and recalculate the size of the DataGrid at runtime by measuring the size of each and every column and row, presumably by filling the whole grid (as I understand it). It is supposed to handle this intelligently somehow but in this case it was not.
A quick check to see if this is a related problem is to set the Height and Width properties of the DataGrid to a fixed size for the duration of the test, and try running again. If your performance is restored, a permanent fix may be among these options: