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)
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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)