Developers Can Extend Context Menus and the Share Dialog in Windows 11

Posted on July 19, 2021 by Paul Thurrott in Dev, Windows 11 with 24 Comments

As with previous Windows versions, Windows 11 lets developers extend key parts of the shell with new functionality. And key among these capabilities is the ability to extend the context menus and Share dialog in the new platform, even from unpackaged Win32 desktop apps.

Microsoft describes these capabilities in a new blog post. But the more fascinating part of this discussion, I think, is how the firm improved the context menus and the Share dialog in Windows 11 in response to issues with these interfaces in Windows 10.

According to Microsoft’s Xander Fiss, the context menus in Windows 10—which you can view by right-clicking or, with multi-touch or a smartpen, pressing and holding—are chock full of problems. The most common commands—Cut, Copy, Paste, Delete, and Rename—are buried too deep in the menu, and far from the mouse pointer (or touch/pen point). The menu is far too long, and it has been growing in the 20 years since it first appeared in its current form in Windows XP. It features rarely-used commands that take up space. And so on.

The Windows 11 context menu addresses these problems, Fiss says. Commonly-used commands are placed right where the menu is invoked. “Open” and “Open with” are grouped together. It formalizes the location of app extensions, including cloud file providers, as well as the presentation of multiple app actions, or “verbs,” which will now always appear in a flyout sub-menu to reduce clutter.

(Windows 11 also allows users to return to the Windows 10 context menu by choosing the new “Show more options” item or by typing SHIFT + F10.)

As for the Share dialog, it has also been improved in Windows 11. Nearby sharing is now easier to use. Your own email address is now the first entry in the contacts list, so you can more easily send an email to yourself. And most importantly, all apps, not just Store apps, can now participate in the Share dialog as share targets. This includes unpackaged Win32 apps and PWAs installed through Microsoft Edge.

Join the discussion!


Don't have a login but want to join the conversation? Become a Thurrott Premium or Basic User to participate

Comments (24)

24 responses to “Developers Can Extend Context Menus and the Share Dialog in Windows 11”

  1. blue77star

    The context menu never grew overtime because you can control what entries go there for each Win32 app you install. For example I got nothing there. I think Windows 11 context menu is not suitable for desktops especially if you set higher resolution with 150 or more % scaling. It looks terrible and spacing between text is just too large. I think MS is trying again to make AIO OS for Desktop, Tablet and what not and I am afraid they will fail again.

    • jdawgnoonan

      I cannot say that I agree. This isn't the 90s and the new menu is pretty much perfect for normal users. I do not mind learning some new stuff to get to advanced features to have a more elegant UI for regular use.

      • Greg Green

        I’d say you have little experience with normal users. My experience is many dislike PCs even when there aren’t changes, just new things assigned.

        yet somehow they love their smartphones.

  2. Chris_Kez

    Windows developers “can do” a lot of things; unfortunately, they mostly don’t.

  3. straker135

    Hmmm. 'Eject' is still right next to 'Format' in File Explorer. Yes, I know we get a pop-up warning when we click 'Format', but it still seems stupidly dangerous to me. The spacing is a bit better with the new Windows 11 touch friendly layout but I would prefer a menu where the format option is more separated from the more frequently used eject option.

    • hrlngrv

      Has there been ANY need for Format in File Explorer's popup menu since laptops ceased including diskette drives? One can use Disk Management to format internal SSDs and HDDs and external drives, and it should be a sufficiently INFREQUENT need to PARTITION and format such disks that Disk Management would seem to be the ideal place. CDs/DVDs are best formatted when burning new contents onto them, something which has used a different UI than formatting floppies for decades.

      Perhaps more to the point, shouldn't a Format entry in File Explorer's popup menu launch Disk Management?

      • thewarragulman

        Having the asbility for Format right from the context menu is super useful when formatting USB flash drives or SD cards for particular uses, for example when creating a Windows install drive, yes I know the tool can format it for you but many users prefer to do this themselves, same with SD cards. I often copy content from an SD card that belongs to a camera I use for YouTube videos so I can edit the video. Due to the weird way my camera records the video, if I don't format the SD card after taking the files off of it, the camera still thinks they're on there, thus my need to format the SD card before returning it to the camera.

        Sure, the format command can be moved from the context menu to the Explorer ribbon or command bar, or to a keyboard shortcut, but why mess with 20-years worth of muscle memory?

  4. jdawgnoonan

    I know it is an early build yet, but am I the only person who has noticed that the "New Item" option in the menu is slow to fill? The menu fully renders and it appears that the menu fully renders with the word "New" which then gets replaced with "New Item". I know I am a nitpicker, but stuff like that impacts the over all feel of polish in the OS.

    • Usman

      I noticed the same thing, wonder what causes it to load after right clicking

  5. IanYates82

    So this is why "refresh" moved location in that earlier build (not defending or praising, but I can at least see more of the thought process at work now)

  6. mattbg

    Nice improvements to the context menu. Cynically, you would expect the new context menu to fill up like the old one after developers get their hands on it. But, the enforcement of a philosophy will go some way to making it more usable.

    On the Share functionality: worryingly, Windows 8+ has a share menu as well, but very few apps work with it. I can't even share an e-mail a link from new Edge to the latest version of desktop Outlook, for example - only to the built-in mail app. The blog mentions that there is a new interface for Win32 apps, so let's hope it gets adopted (and that Office adopts it on day 1!).

    The apps that the existing Share menu does work with are also the only apps listed in the screenshot on the blog, which has me concerned that this won't be improving.

    • hrlngrv

      | Nice improvements to the context menu.

      Consider: install Notepad++. It puts an Edit with Notepad++ entry into the popup menu for a lot of plain text, source code and editable-as-text file types. Select ONE such file OR ONE directory in File Explorer and right-click on it, that entry doesn't appear. Select such a file AND a directory, and Edit with Notepad++ does appear.

      The logic for the new popup menu's top-level appears to be a work-in-progress at best, but possibly just a dog's lunch.

      • mattbg

        So Notepad++ needs to add something to the new context menu using the new interface before Windows 11 comes out?

        I get that it’ll be a speed bump initially, but some people have context menus nearly as tall as their monitor at this point and something needs to be done. It should almost be a permission to add something there, like the one required to send notifications, IMO.

        • hrlngrv

          Agreed something should be done, but wouldn't it be best to allow USERS to customize their menus? Adding submenus? Prioritizing, say, Send To over Compress as ZIP file?

          Tangent: if MSFT Defender is working correctly, wouldn't it scan every file automatically? If so, what value is there in the popup menu's Scan with Microsoft Defender... entry?

          Less of a tangent: should users have the option of REMOVING the Move to OneDrive entry? Or Restore previous versions? Actually, regarding Restore previous versions, since it's not that difficult for Windows to check whether previous versions of a given file exist, WHY does that entry appear when there are NO previous versions?

          Then there's Create Shortcut (now a top-level, top-row icon) vs Send To > Desktop (create shortcut). How often does anyone want a shortcut in the SAME DIRECTORY as the shortcut's target? Also, when the user lacks write permission in the directory being viewed, Windows/File Explorer asks the user whether they want to create the shortcut on the desktop. Is there any compelling reason for the former to exist?

          A lot of space in File Explorer's traditional popup menu is used by entries MSFT put there which provide questionable functionality. It should be easier to hide some of them when they provide NO functionality.

          • mattbg

            A smarter and more responsive context menu like you describe would definitely be an improvement.

            I'm not too confident that app developers would implement these behaviors consistently, nor am I confident that Microsoft would police it effectively.

            • behindmyscreen

              It doesn't even need to be smart. Just let a power user customize it by reorganizing it/removing things to a "other actions" menu.

  7. hrlngrv

    If by '[t]he most common commands—Cut, Copy, Paste, Delete, and Rename—are buried too deep in the menu' means that these aren't near the mouse pointer immediately after right-click or equivalent, they ARE where they've been for the most part of the last 26-odd years. Eliminating familiarity, a familiarity with a UI which has been around for a generation, is NOT going to improve most users' efficiency using that UI.

    Besides, the new File Explorer menu (or is it more of a toolbar?) has all those icons as well. Which is the greater drain on efficiency for ALL Windows users? The time it takes to move the mouse pointer to the icons in the new File Explorer menu or to move to the corresponding entries in the popup menu (using habits built up over a generation) or the unfamiliarity of the new popup menus? From my perspective, this is MSFT again forcing a phone-like UI on PC users.

    '[The menu] features rarely-used commands that take up space.' For the typical user, stipulated. For more advanced users who've installed File Explorer extensions or added their own actions for specific file types in the registry, or have installed 3rd party software which has done that (e.g., Notepad++ with damn near all well-used plain text, markup, XML, JSON and source code file types).

    Consider what's in the top-level popup menu for File Explorer. The 5 icons across the top (with nothing in the Clipboard) are fine, stipulated an improvement over Windows 10 and prior, but might they be even better if there were an option to display text captions below each of them? Consider what else there is. Open with is fine, but Compress to ZIP file? That's one of the most used entries in popup menus? Even with a single file/directory selected? Plausible for directories, but not for files. Copy as path is actually something I use a lot, and I'm glad I don't need to use [Shift]+[Right-click]. Properties is good, but I figure it's used often enough it should also be an icon in the top row. Finally, Show more options would be A LOT BETTER if one could just hover the mouse pointer over it, and it would appear as a submenu.

    Options are good, especially with an OS like Windows used by billions mostly in a given way for the better part of the last 3 decades. Same complaint made against Windows 8. Since I'm a tinkerer, I know how to use macro utilities which can change the behavior of mouse clicks in specific applications. I've already remapped [Right-click] to [Shift]+[F10] for Explorer.exe, but Windows 11 has finally gotten me to use the FreeCommander setting to switch the [Win]+E key to launch it rather than File Explorer.

    Note: select anything in File Explorer and press [Shift]+[F10] or the [Menu] key, and one sees the old popup menu immediately.

    Why do I care? Because I use a file/directory comparison tool which puts entries in the popup menu to select one file/directory for comparison then select another and run the comparison. I use Notepad++ which puts and Edit with Notepad++ item in the popup menu. I added my own action for drives/directories in HKCR to create plain text directory listings. And I use Send To, which I have to wonder whether it's on its way to deprecation.

    Would I appreciate these changes were I an 11-year-old getting my 1st PC? Maybe, but the typical 11-year-old would be able to figure out the Windows 10 popup menu more quickly and easily than the typical 45-year-old who's been using Windows since they were an 11-year-old would become comfortable with the new layout.

    MSFT's attitude towards long-time Windows users is a mix of where are they going to go? LOL and if they don't like the changes, they can FOAD.

    • dmitryko

      | MSFT's attitude towards long-time Windows users is a mix of where are they going to go? LOL and if they don't like the changes, they can FOAD.

      My sentiments exactly.

      Microsoft spends their resources working on "fresh new" features like Cortana, Timeline, tabs in File Explorer, etc. only to stop all development shortly and eventually entirely remove them.

      Now they have to force "fresh new" touch-based UI redesign ripped off Windows 10X, itself a ripoff from Chrome OS and OS X - which looks awful on my 32" screen, which us the main reason I use a desktop and not a tablet or a netbook/notebook, and it's useless without touch capability.

      Why call it Windows 11 and 'next generation of Windows'? I'd just buy a Chrome OS netbook if I wanted a dumbed-down 'highly secure' children's toy.

      If the plan was to lure people in developing countries from their mobile phones to PC-based tablets/netbooks, then fine, name it Windows X or whatever (and see it flop like Windows 10S and S Mode).

    • boots

      Cut, Copy, Paste, Delete, and Rename are at the bottom of the menu, if you right click something on the lower half of the screen, the menu will open above the pointer and these commands will be near the mouse pointer.

      Will the new menu rearrange itself depending on pointer position?

    • nickysreensaver

      youre ranting and i disagree with your perspective