Site icon 지락문화예술공작단

Extending the Context Menu and Share Dialog in Windows 11

Extending the Context Menu and Share Dialog in Windows 11

Windows 11 brings refinement to contextual file operations in the right-click context menu and share dialog. These are extensible by apps, including unpackaged Win32 apps. 

The context menu is one of the most popular and useful shell extensions. If you are already in File Explorer or on the Desktop, it significantly reduces the number of steps to complete a file operation compared to opening a separate app.

As useful as the Windows 10 context menu is, there are aspects of its design we sought to improve in Windows 11.

The Windows 11 context menu addresses these problems in the following ways:

The share dialog has also been improved in Windows 11. 

Context Menu Best Practices

Regarding File Opening scenarios:

1. When should I register my app for “Open with”? (File Type associations)

The new context menu moves “Open with” to the top of the menu, right next to “Open.” 

If your app can open the file to do something more with it, you should always register for any applicable File Type Associations.

“Universal openers,” like technical text editors, should register to handle * so they will always be offered as an “Open with” option. They should also explicitly register for any filetypes they are optimized to handle.

2. When should I add a verb to “Edit with〈app〉”?

It is common for certain file types to be both “viewable/runnable” and “editable,” such as scripts, HTML, images, or text-based document formats. 

Because the default action on double-click for these files can be “open/run” or “edit,” one of these two actions will be less convenient.

In these cases, adding a verb for “Edit with〈app name〉” is an acceptable practice.

However, please consider if your non-power-users will be adequately served by “Open with.”

For these users, a default state of not including the verb unless users opt into it will keep the menu tidier in general while offering classic functionality to your power users.

Regarding File Sharing scenarios:

3. When should I add a Context Menu verb to “Share with〈app〉”?

Share actions can originate outside of File Explorer, for example the Photos app or Snip & Sketch. In these cases, the Share dialog is shown to the user.

The best practice is to make sure you are registered as an app target in the Share dialog.

It’s also OK to add a Context Menu verb for “Share with〈app〉”

Because the Share dialog is also easily accessed from the File Explorer ribbon and context menu, an additional “Share with” verb in the context menu can be redundant – consider offering a way for users to opt out of the duplicate context menu verb.

Source: Extending the Context Menu and Share Dialog in Windows 11

Exit mobile version