Hello I am having a problem with WPF binding and wondering if what I am trying to achieve is actually possible.
I have a ComboBox with ItemsSource bound to X509FindType Enum using the ObjectDataProvider within a control as seen below.
<ObjectDataProvider x:Key="x509FindTypes" MethodName="GetValues" ObjectType="{x:Type System:Enum}">
<ObjectDataProvider.MethodParameters>
<x:Type TypeName="cryptography:X509FindType" />
</ObjectDataProvider.MethodParameters>
</ObjectDataProvider>
The problem is that I need to make a two-way binding between SelectedItem and property in my model which is type of string (I can't change it to be that specific Enum type).
The goal seems to be simple - Whenever I set a string in Model the ComboBox should show this value. On the other hand user can also choose the element from ComboBox and the value of the string should be updated to name of that enum type.
Thanks for any advises and sorry for my ugly English.