When working with Binding converters are pretty common.. I always find myself
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?
You can certainly save time on this part:
- Copy an old IValueConverter or IMultiValueConverter
- Change the namespace and the class name
- Remove the old code
Do it this way instead:
FooConverter
for instance)IValueConverter
by just adding : IValueConverter
IValueConverter
, press Ctrl + . to open the smart tag menuVisual Studio will automatically create the necessary method stubs, you just need to write the implementation.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With