CommandHandler for TreeNodeMouseClickEventArgs

Jan 1, 2008 at 2:54 PM
I would like to ask, for the CommandHandler, can I use the function with arguments other than (object, EventArgs)? e.g. (object, TreeNodeMouseClickEventArgs), since I have added an invoker "NodeMouseDoubleClick" to TreeView.

When I use the following code, it give an exception: "Error binding to target method"...

WorkItem.CommandscommandName.AddInvoker(treeNode.TreeView, "NodeMouseDoubleClick");

CommandHandler(CommandNames.MyCommand)
public void OnNodeDoubleClick(object sender, TreeNodeMouseClickEventArgs e)
{
}
Jan 1, 2008 at 5:35 PM
Hi.
Would you like to do such:

in LayoutView.cs Module

private void treeViewNodeMouseDoubleClick(object sender, TreeNodeMouseClickEventArgs e)
{
if (this.Tree.SelectedNode != null)
_presenter.TreeClick((string)this.Tree.SelectedNode.Tag);
}