In WPF, should I base my converters on types or use-cases?

Posted by user1013159 on Programmers See other posts from Programmers or by user1013159
Published on 2014-08-22T06:10:22Z Indexed on 2014/08/22 10:27 UTC
Read the original article Hit count: 383

Filed under:
|

I'm looking for some advice on how to write my WPF value converters. The way I'm currently writing them, they are very specific, like (bool?,bool) => Brush, i.e. I'm writing each converter for a specific use case, in this case, the Brush is bound to an indicator showing equality information between the bool? and the bool. This obviously makes re-use very hard and I end up with a quite large list of converters.

Should I strive to write my converters in a more general way? Can I?

© Programmers or respective owner

Related posts about c#

Related posts about wpf