2

I currently have a 952 large collection of items. I am displaying about 500+ of them as polygons, and this is causing some noticeable, but manageable lag in my application. What is the most lightweight control / element that I can use to display these items at one time?

Kiang Teng
  • 1,675
  • 4
  • 23
  • 42

1 Answers1

3

DrawingVisuals provide a more lightweight approach for rendering objects than Paths:

http://msdn.microsoft.com/en-us/library/ms742254.aspx

The downside of this approach is that they do not provide events such as mouse enter / leave, you must perform hit testing manually. However, this might be OK for your needs.

There is an even more lightweight approach where you add items to the visual layer directly, you can see an example on this page:

http://msdn.microsoft.com/en-us/library/ms748373.aspx

My advice would be to try DrawingVisuals first.

ColinE
  • 68,894
  • 15
  • 164
  • 232
  • +1 Try DrawingVisuals as ColinE suggested. Else you want more lighter one, you could use lower level `StreamGeometry` http://msdn.microsoft.com/en-us/library/system.windows.media.streamgeometry.aspx – Prince Ashitaka Jan 18 '11 at 17:42