1

I'm trying to follow the solution from this post in my WF4 project: Databinding an enum property to a ComboBox in WPF

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 
2
  • To followup, even though I was getting the error, I tried to use the activity anyway. There was no problem using the activity in my main workflow. It found the enum values just fine. Commented Sep 29, 2010 at 18:36
  • I was impatient about getting that "reparenting" error as well but it compiles nonetheless. Thanks for the tip ! Commented Nov 29, 2010 at 15:04

1 Answer 1

5

Just rebuild (not build) the solution or rebuild the project and it will work just fine.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.