How can I disable a NSMenuItem? I try to disable a NSMenuItem after it has been clicked. The click is handled correctly by the Action (Logout).
I tried changing the Enabled
property to false in the following two ways:
partial void Logout (AppKit.NSMenuItem sender)
{
sender.Enabled = false;
}
and
partial void Logout (AppKit.NSMenuItem sender)
{
LogoutItemOutlet.Enabled = false;
}
But every time this action is called, the Enabled
fields keep being true
. The menu item itself also never actually disables.
How to disable the NSMenuItem after an action is executed?