Generic Filter Control for Silverlight DataGrid

by Dean

During the creation of a recent demo Silverlight project, I tasked myself with creating a generic (re-useable) filter control that I could use to filter rows in a Silverlight DataGrid.

The control had to be lightweight, and work automatically with any object collection that the DataGrid was bound to – thus making it plug-and-play for any future uses.

I’ve created a great starting point with this, by designing a set of inter-operating classes that have the following key features.

  1. The Filter control of writtem completely in Xaml, using Xaml binding syntax (good designer supprt)
  2. By virtue of point 1, it is easily modified in Blend
  3. The filter control works by creating Lambda/Linq Expression trees to perform filtering.
  4. The filter control can ustilise the DescriptionAttribute for plug-and-play.

Here are a couple of screenshots:

1) No filtering

image.axd?picture=filter1 thumb Generic Filter Control for Silverlight DataGrid

more

Similar posts

This entry was posted in Controls, Software, tutorial and tagged , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>