WPF DataGrid Performance

The WPF DataGrid is a fantastic component but it can get pretty slow with a large number of rows or columns.

Try these quick-and-easy changes to improve the performance:

  • Set the following attributes to enable row and column virtualization:
  • Set a fixed column width - this reduces the number of layout recalculations that are required when rendering: