Fastest way to create a Converter in Visual Studio

c#, silverlight, visual-studio, wpf

Solution

Probably the best resource for you is the Visual Studio templates. You can create your own and so you could right-click/create new item/Converter that would stub in everything that you're doing manually.

If you do create something like that, it would probably be a great little project to share with the community via codeplex or something like that.

Creating Item Templates in Visual Studio

Problem

When working with Binding converters are pretty common.. I always find myself - Right-click the correct Folder - Click Add - Click New Item - (Sometimes) Choose Code to the left - Choose Class and "Add" (and sometimes when I'm in a hurry a create an AboutBox instead :-( ) - Copy an old IValueConverter or IMultiValueConverter - Change the namespace and the class name - Remove the old code and then I can finally start to implement my new converter. After this I also have to add this namespace to the xaml file and add it to resources before I can reference it. I've been doing this a million times and this is probablly the slowest way to do it so my question is.. What is the fastest way to create a Converter in Visual Studio?

Original source