Announcing the Release of Quasar 0.1 Alpha  

Monday, January 19 2009

Over the past several months I have been developing a forthcoming portfolio of my past works in Silverlight. Over the course of this project, I have developed several reusable controls that I have decided to release open source under the MIT License (MIT ftw). As the title of this blog post suggests, the name of this new library is Quasar. You can download 0.1 Alpha here.

I am attempting to release this library using an approach similar to what the Silverlight Toolkit team has done. That is, to have quality bands that represent my confidence in the RFPT (ready for prime time) status of these controls. Currently I have thrown all the controls and behaviors into the “pre-Alpha” band. Robust unit tests and sample usage will be forthcoming soon, but I’d love any and all feedback about this library. Enjoy!


  • Posted by Charlie Robbins

Inserting Views into Regions in Prism V2 Alpha for Silverlight  

Wednesday, January 07 2009

Recently I was implementing a ReorderableListBox in Silverlight using Prism. Now the standard approach in Prism would be to write a ReorderableListBoxRegionAdapter and then register the type in your bootstrapper. After doing this and getting my reordering behavior working in a sample application without Prism, I ran into a brick wall around what I see as a glaring hole in Prism: IRegion does not allow Views to be inserted at an arbitrary position, they may only be added to the end of the list.

Clearly without the ability to insert dynamically my reordering behavior was up the river without a paddle. Now after digging through the Prism source code I have a very clean, workable solution that I would like to eventually get into Prism itself.

If you do not want to see the details of how I did this, you can download it here and stop reading now. For those foolish souls who want to listen to my banter, read on. The problem revolves around the fact that although ViewsCollection implements INotifyPropertyChanged it does not implement IList. The ViewsCollection class is responsible for filtering the underlying collection of ItemMetadata and keeping these collections up to date. It updates these filters by responding to CollectionChanged events in the underlying collection. It’s response to NotifyCollectionChanged.Add is:


case NotifyCollectionChangedAction.Add:
  foreach (ItemMetadata itemMetadata in e.NewItems)
  {
    itemMetadata.MetadataChanged += itemMetadata_MetadataChanged;
    if (filter(itemMetadata))
    {
      changedItems.Add(itemMetadata.Item);
    }
  }
  AddAndNotify(changedItems);
  break;


Read More...
  • Posted by Charlie Robbins