To skip to the last part of your question: This is a discussion on WPF Disciples that puts forward the notion that M-V-VM negates most of the need for converters; that the ViewModel should present the data to the View in a way that is appropriate for that View.
Why write a separate class, implement IValueConverter, flesh out the Convert
and ConvertBack
methods, just to get an Int32 to a Color, when you could just have the VM expose a Color property in the first place, right?
I guess the answer to that depends on how religious you are about separation between the View and the ViewModel... I'm starting to think that the ViewModel should simply present the Model and apply business rules to it, and should be 'View Agnostic', and maybe an intermediary layer is required to manipulate the ViewModel specifically for your View, so if you ever swap out your View (for whatever reasons!) you don't need to rewrite your VM, just the 'intermediary' layer... then it occurred to me that WPF already has such an intermediary in the form of ValueConverters...
So to summarise: You could remove lots of repetitive development of Converters by simply having your VM expose properties of an appropriate type in the first place...
Now you need to decide if you want to...
Just my 2c worth... :)