Hiding ToolStripMenuItems

Topics: CAB & Smart Client Software Factory
Nov 18, 2005 at 10:08 AM
originally posted by: aaguiarz

I have a set ToolStripMenuItem that is registered as a site for a set of other ToolStripMenuItems (like File and New/Open/Save/Exit) that are bound to Commands.

Depending on the active WorkItem I need to hide the child ToolStripMenuItems (like hiding New/Open/Save/Exit). I can do that by setting the CommandStatus to Unavailable. However, I cannot find a way to hide the root ('File') entry.

I can do it by scanning the root ToolStrip and check for parents without children, but I don't like that solution...