Creating Custom Context Menu

The IT Hit User File System supports creating custom context menus on both Windows and macOS. In this article we describe steps that are common for both platforms. Each platform requires additional steps for registering the menu described in these articles:

The functionality described in this article is available in IT Hit User File System v5 Beta and later versions.

Creating Custom Context Menu Shell Extension for Virtual Drive
Custom context menu on macOS Finder in Virtual File System

Follow the steps below to add custom context menu command shell extension in Windows Explorer:

1. Implement Context Menu Interface

Depending on the platform, implement the menu interface: IMenuCommandWindows on Windows or IMenuCommand on macOS. 

2. Return Context Menu Implementation from the Engine

To add a custom menu implement the IEngine.GetMenuCommandAsync() method and return your menu implementation. The Engine will call this method passing the menu GUID parameter, so you can implement multiple menu commands on the first level of the menu:

public class VirtualEngine : EngineWindows
    public override async Task<IMenuCommand> GetMenuCommandAsync(Guid menuGuid)
        // Return your menu implementation here depending on the menu GUID.


Next Article:

Programming Virtual File System .NET for Windows Platform