I have a pretty large resource dictionary and I was wondering if there was an easy way to clean it up by removing any unused element (style, brushes, etc)
+2
A:
If it is a single file, the easiest way would be to use ReSharper (you can get a free trial). ReSharper does a pretty good job of understanding when things are not being used and grays them out. You can collapse the document and then expand only the root nodes and just whack the ones that are grayed out.
Without ReSharper, it is a little tougher. You could go through and do a find all in the solution for each Keyed resource and wack those that aren't found. For implicit resources without keys it will be a little tougher to determine (I don't think R# can even handle these well)
Foovanadil
2010-08-20 21:33:05