tags:

views:

19

answers:

0

I'm trying to figure out if its possible to update an IValueConverter through the code behind.

My situation is that I've got two ComboBoxes. Once the first one is updated, I change the ItemsSource property of the second to be one of a variety of enums. I've grabbed an EnumToFriendlyNameConverter from CodeProject, but I'm not sure how to set it.

If I set the converter in the ItemsSource (see below) then it gets ignored when I next set the items source.

ItemsSource="{Binding Converter={StaticResource enumItemsConverter}}"

I found that it is possible by using an ItemTemplate but then I have to manually place in a label, which then has a different style to my other combobox. Getting the styles right just seems like a lot of work...