YOu can delegate a command to yet another comand, this is useful when you can create some anonymouse comnad and the real command action is perfomred by a command that is embedded in the anonymous commnad. Let's see an example.
if (parameters.Gesture != null)
{
var command =
new SimpleDelegateCommand(
(p) =>
m_chromeManager.CreateWindow(parameters.WindowFactoryID, parameters.InitialParameters));
//button.SetValue(ButtonBase.CommandProperty,
// command);
m_shell.MainWindow.InputBindings.Add(new InputBinding(command, parameters.Gesture));
}
s you can see , we can create a SimpleDelegateCommand, and in the args passed to it, you can pass in one delegate, and this delegate can dispatch and call the real command underneath .
Another point of info that you may need to notice is that, in the example above, the top windows's InputBinding is used to set the CommandBindings.
Joe,