tags:

views:

33

answers:

0

I'm trying to follow the solution from this post in my WF4 project: http://stackoverflow.com/questions/58743/databinding-an-enum-property-to-a-combobox-in-wpf#62032

And I've implemented the code

<ObjectDataProvider MethodName="GetValues"
    ObjectType="{x:Type s:Enum}"
    x:Key="DayOfWeekValues">
    <ObjectDataProvider.MethodParameters>
        <x:Type TypeName="s:DayOfWeek" />
    </ObjectDataProvider.MethodParameters>
</ObjectDataProvider>

<ComboBox ItemsSource="{Binding Source={StaticResource DayOfWeekValues}}"/>

I'm getting the following error on the TypeName="s:DayOfWeek" property.

Cannot reparent the node "Type(System.DayOfWeek)" from the old parent "IList" to the new parent "ObjectDataProvider".

Any ideas about what this error means?

EDIT: In addition to the error above, I'm also getting the following error on the MethodName="GetValues" property on the ObjectDataProvider.

INCORRECT_PARAMETER_TYPE