Class MenuHosts
- Namespace
- RDCore.Forms.Menus
- Assembly
- RDCore.Forms.dll
The menu host of each shown form, by its root: where a program's PopupMenu goes.
public static class MenuHosts
- Inheritance
-
MenuHosts
- Inherited Members
Remarks
A form's window registers itself while it is open, and unregisters when it closes. A root holds no reference to its host, so a root no longer shown can be collected.
Methods
Of(ComponentInstance)
The host of a form's menus.
public static IMenuHost? Of(ComponentInstance root)
Parameters
rootComponentInstanceThe form's root.
Returns
Exceptions
- ArgumentNullException
rootis null.
Register(IMenuHost)
Registers the host of a shown form, in place of any it had.
public static void Register(IMenuHost host)
Parameters
Exceptions
- ArgumentNullException
hostis null.
Unregister(IMenuHost)
Unregisters a host, where it is still the one its root has.
public static void Unregister(IMenuHost host)
Parameters
hostIMenuHostThe host.
Exceptions
- ArgumentNullException
hostis null.