XamlParseException: failed to create a 'System.Windows.Input.ICommand' from the text
Posted on: 2011-10-10
XamlParseException: failed to create a 'System.Windows.Input.ICommand' from the text
This error can occur when binding a Command inside a Xaml file.
<Button Command="MyCommand"> Click Me </Button>
In fact, the problem with this syntax reside in the way we call the command. The previous example were not using the Binding syntax.
You need to use the Binding keyword.
<Button Command="{Binding MyCommand}"> Click Me </Button>
Of course, you need bind to a ICommand property to the desired command.
public ICommand MyCommand { get { return .... } }
Hope this help some body that has this error.