Unable to show BindingMode Enum in comboBox (WPF)
I'm trying to show the original BindingMode enum in a comboBox (the list
of TwoWay`OneWay` etc.).
In the XAML file, inside Resources I need to set ObjectDataProvider to be
the type of BindingMode:
<!--BindingMode combo box-->
<ObjectDataProvider x:Key="BindingMode" MethodName="GetValues"
ObjectType="{x:Type sys:Enum}">
<ObjectDataProvider.MethodParameters>
<x:Type TypeName="sys:BindingMode"/>
</ObjectDataProvider.MethodParameters>
</ObjectDataProvider>
The problem is that I can't include System.Windows.Data in 'xmlns', i've
tried to declare:
xmlns:sysWinData="clr-namespace:System.Windows.Data;assembly=mscorlib"
but it won't work. What am I missng here? Thanks.
No comments:
Post a Comment