Archives

Archives / 2010 / July
  • Sort Data Using Code with the Silverlight CollectionViewSource

    As a follow-up to last week's blog posting and newsletter, this week I am going to show you how to use the CollectionViewSource object in Silverlight to sort data using code. Sometimes you need something a little more flexible, so you will need to resort to writing some code. You can take advantage of the CollectionViewSource from your XAML, but dynamically change the sort order of your lists with just a few lines of code.

  • Use CollectionViewSource in Silverlight to Sort Data

    If you are using Silverlight's ListBox control, you do not have to write code to sort your data. Instead you can use the built-in CollectionViewSource object in XAML to perform the sorting for you. This assumes that you are using a collection that implements the IEnumerable or IList interfaces.

Past Blog Content

Blog Archive