Question about detecting MenuItem clicked

Topics: CAB & Smart Client Software Factory
Dec 10, 2006 at 9:39 AM
originally posted by: michaelveit

I add drop down items dynamically (from a db) to an extension site. Each item gets added to the same command as an invoker, and there is only one handler that needs to detect which item was clicked like you can do via ToolbarMenuItemEventArgs. CAB returns only the command and an empty eventargs. What Is the best way to implement this functionality?

(I did the easiest thing I could think of which was to fire an event in the dropDownItem.Clicked event that the included the name of the menu item in a DataEventArgs obj so subscribers can pick it up).