IDisplayCommands InterfaceCleanCode C# Libraries v1.2.03 API
Identifies a class as supporting a DisplayCommandsForm for a quick reference of user commands.

Namespace: CleanCode.GeneralComponents.Dialogs
Assembly: CleanCode.GeneralComponents (in CleanCode.GeneralComponents.dll) Version: (1.2.03)

public interface IDisplayCommands

Implementing this interface means the hosting class provides a ShowUserCommands  method that opens a quick-reference of all commands in its user interface. A typical implementation is shown below. The UserCommandsTitle property would ideally be a static property but since interfaces do not support static properties, it is backed by a static field. See the DisplayCommandsForm class description for further details.

public void ShowUserCommands()
    DisplayCommandsForm userCommandsForm
        = new DisplayCommandsForm(userCommands);
    userCommandsForm.Description = "subtext here, as appropriate";

public string UserCommandsTitle
    get { return userCommandsTitle; }
    set { userCommandsTitle = value; }

private static string userCommandsTitle;

Since CleanCode 0.9.23.

See Also