Search code examples
silverlightxamlexpression-blendstyles

Is there an easy way to remove 'Style' attributes from all elements of a particular type in Xaml?


Okay,...I've recently inherited a downright shocking Silverlight 4 application and the Xaml is worse than you could possibly imagine. I'm going through a clean up operation and I'm looking to save time if I can.

One of my problems is that I've got a bajillion Button controls; some have a Style set and some don't. I need a quick and easy way (if one exists) to remove all of the Style attributes from any Button (or whatever) that has one set. Is this possible?

I have access to VS2010, KaXaml, XamlPad and Blend 4.

Thanks in advance..


Solution

  • Forgot about this question so in response to Robert Claypool's question,...No, not really.

    What I actually did was remove all the styles and go through the big daunting errors list one by one. I tried a little find and replace magic first but that failed miserably no matter how clever my Regex got.

    No choice here but to just hand-ball it I'm afraid.