Table of Contents

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

root ComponentInstance

The form's root.

Returns

IMenuHost

Its host, or null where the form is not shown.

Exceptions

ArgumentNullException

root is null.

Register(IMenuHost)

Registers the host of a shown form, in place of any it had.

public static void Register(IMenuHost host)

Parameters

host IMenuHost

The host, registered for its Root.

Exceptions

ArgumentNullException

host is null.

Unregister(IMenuHost)

Unregisters a host, where it is still the one its root has.

public static void Unregister(IMenuHost host)

Parameters

host IMenuHost

The host.

Exceptions

ArgumentNullException

host is null.