Command binding Unable to cast object of type 'System.Reflection.RuntimeEventInfo' to type 'System.Reflection.MethodInfo'
问题 When I wire up my button to a command via XAML, I'm getting a run time error System.Windows.Markup.XamlParseException: Provide value on 'System.Windows.Data.Binding' threw an exception. ---> System.InvalidCastException: Unable to cast object of type 'System.Reflection.RuntimeEventInfo' to type 'System.Reflection.MethodInfo'. When I remove the command binding in XAML everything works okay, and my items display etc.. Here is the command binding: Click="{Binding ElementName=MainGrid, Path