I'm trying to bind a button to a function which is in an other project (MVVM). My XML-Code (View) looks like this:
<Button Click="{Binding PressMe}">Press Me!</Button>
and my ViewModel-Code like this:
public void PressMe()
{
Console.WriteLine("Ouch!");
}
When I try to run the program the error "InvalidCastException: The Object of the type "System.Reflection.RuntimeEventInfo" couldn't be converted to the type "System.Reflection.MethodInfo". Any ideas?
Thanks for any reply