Commands question

Topics: CAB & Smart Client Software Factory
Jun 13, 2006 at 6:25 AM
originally posted by: Sankar74

I have a menu item that I added during design time. Now I want to add a command associated with it. How can I do it?

      • I am not sanker. Whats happening with Passport??? *****
Jun 13, 2006 at 1:30 PM
originally posted by: ChrisHolmes

When you created your MenuItem you need to associated a Command with it, like so:

Commands"FileOpen".AddInvoker(menuItem, "Click");

Then, in a child workItem where you want to handle the click, create the CommandHandler:

public void FileOpen(object sender, EventArgs e)
//do stuff
Feb 6, 2007 at 10:17 AM
I am new to SCSF. I meet the same question. ChrisHolmes's answer is very useful for me.