Thumbnail View Resource
Source

www.silverlightplayground.org (Silverlight Playground), posted 2010-04-27

Added By

Avatar BillHenn on 2010-04-27

Vitals
0score
  • 5637 total views
Summary
Shows how to keep an ObservableCollection sorted when adding items.
Excerpt
"Usually the order of elements in a collection is something one does not feel to be important. We have plenty of methods in the Framework to order things and now that there is LINQ to Objects the need to sort something is really matter of seconds. Since the introduction of LINQ the main problem is that you have many cases where a few lines of code are adding really complex iteration logic and often this hurts performances when the count of milliseconds is something important. In these days I had this problem because I did need to make a lot of updates to a collection in the short time as possible, because I was working into the a CompositionTarget_Rendering event. A lot of hidden iterations through the collection, made by LINQ queries, has degraded the performances of the application and I had to put my nose on the iteration logic to optimize it. In a case like this, having a collection that ensure a given order of the elements was key to solve my problem. So I decided to impleme..."
Full Link

http://www.silverlightplayground.org/post/2010/04/27/keeping-an-observablecollection-sorted-with-a-method-override.aspx

About Silverlight Playground

Andrea Boschin's blog focuses on various Silverlight topics. He is a Microsoft MVP and a member of the WPF & Silverlight Insiders group. http://www.silverlightplayground.org/

The WPFpedia resource guide has 1 total links to this site.

Comments 

There aren't any comments yet for this resource. Be the first to add one!

Add a Comment

Please log in to post comments.

Tags

Tasks

Thumbnail Screenshots by Thumbshots