Custom Sort Icons with Silverlight 2's DataGrid Control
While looking through the control templates for Silverlight 2's DataGrid, I noticed the DataGridColumnHeader defines a couple of StoryBoards that allow you to control how the headers are displayed as they pass through the three column states: {Sorted Ascending, Sorted Descending, Unsorted}. And without too much work you can override the default display and customize it to your liking. I took a crack at overriding these states to mimic the icons the awesome jquery tablesorter plugin uses - below is a sample table that shows how it turned out. Read on for the details (there really aren't too many) and don't forget to check out the live demo and download. Live Demo | Download Default Sort Indicator If you look at the default template for the DataGridColumnHeader you will see the control uses a Path shape (named SortIconElement) to describe the sorting icon (the value of the Data attribute...