Aug 9, 2010 at 8:58 PM
Edited Aug 9, 2010 at 8:58 PM
Perhaps you could provide a screen shot how you'd like it to look. It would be easier to advice with that.
Designing for good performance in WPF is not impossible but not always trivial due to its flexibility and powerful layout engine.
It's hard to come up with a good list of guidelines but I guess I could make a try:
0. Use the simplest possible visualizer (ie is ListBox good enough then it's probably performs better than DataGrid)
1. Use virtualizing stackpanels if you have many (ie >100) rows
2. Use ObservableCollections and minimal rebuild of those
3. Use DataTemplates (enables lazy build of visual tree)
4. Avoid scrollviewers (as they are unbounded and thus instantiate visual objects that's outside the screen, the scrollviewers that's built into ListBox doesn't do this when using virtualizing stackpanel)
5. Use Styles to simpify visual objects (if you have a visual object that's instansiated many times it can make sense to remove unused clutter using Styles)
6. Use a tool to visualize the visual tree or build a simple function that dumps it for you (will help you identify where you have unnecessary complex objects)
7. Use bitmap cache in .NET 4 / Silverlight (but use it smart, ie only on static content or mostly static content, its often possible to separate dynamic content into a static tree and a dynamic tree and cache the static tree)
8. Sometimes the best thing you can do is to override OnRender
There's more of course.