ToolStripMenuItem enable/disable

Hi,
I'm new in C-Sharp so sorry "easy" for this question.

I come from Win32/MFC world.

I MFC to enable/disable menu item at Runtime I got to make an handler for the UpdateCommandUI and in it enable or disable the item.

Is there a way to do it the same way in CSharp or do I have to enable/disable item each time a menu will be shown?

Thanks
[385 byte] By [F.Mayis] at [2007-11-20 9:19:26]
# 1 Re: ToolStripMenuItem enable/disable
Hi

Take a look at this property; ToolStripMenuItem.Enabled Property (https://msdn2.microsoft.com/en-us/library/system.windows.forms.toolstripmenuitem.enabled.aspx)

Laitinen
laitinen at 2007-11-9 11:34:14 >
# 2 Re: ToolStripMenuItem enable/disable
Hi,

Thanks for the answer,

But it is not what I intend to ask in fact.
I know that .Enabled will do the stuff, but What I'm looking for is the same UpdateCommandUI process in C#.

I mean that the framework come and ask the state of the menuitems when needed and that I don't have to explicitly set the status of items each time I display a menu.

Thanks
F.Mayis at 2007-11-9 11:35:14 >
# 3 Re: ToolStripMenuItem enable/disable
when the menu is created
and you set enable and disable on it and or on it's items
they will have that state untill you dispose of the object

you dont have to redo properties when ever the menu is being displayed
Rudegar at 2007-11-9 11:36:13 >