Suppose I have a combobox where items are binded to an array of strings. I want to use ItemStringFormat to display those strings in uppercase. How do I do that?
Update: I’m not completely clueless about formatting strings, but I’ve searched MSDN for a format specifier that will turn a string to uppercase, and for some reason I just can’t find it! I would have expected it to be something like “{0:U}” or “{0:S}” or something like that.
I also can’t believe I wasn’t able to find the answer here on SO.
You can specify a Converter as part of your binding. It is trivial to build a class that implements IValueConverter which simply returns