How would you design this?
-
I've got a control that displays data (List). My control supports a few different types of status indicators to mark the data. I'd like to allow the user of my control the ability to customize the appearance (color) of the markers. I'm having a little trouble coming up with a way to design that in a MVVM friendly way. I'm thinking an IValueConverter of some sort possibly... However... well, let me give you a real world example: One type of status indicator is the min/max style. So I'll mark the min item and the max item. If the converter takes just the arbitrary T value, the implementer of the converter would have no way of knowing if it was the min item or the max item. So I was thinking of having an IMultiValueConverter at the control level and in this case, I would pass in the min value in [0] and the max value in [1] and the implementer would return an array[2] of brushes. Otherwise, I'd have to call the converter for each individual value and pass in a min / max indicator, so it would still need to be a multi value converter. I haven't really seen a control that does that LOL, so I'm not quite sure that's the WPF / MVVM way... Any ideas?