Skip to content

Add extended context menu setting for Image Resizer#45428

Draft
Copilot wants to merge 4 commits intomainfrom
copilot/add-extended-context-menu-setting
Draft

Add extended context menu setting for Image Resizer#45428
Copilot wants to merge 4 commits intomainfrom
copilot/add-extended-context-menu-setting

Conversation

Copy link
Contributor

Copilot AI commented Feb 5, 2026

Summary of the Pull Request

Adds configurable extended context menu support to Image Resizer, matching PowerRename's existing functionality. Users can now choose to show Image Resizer only when Shift + Right-click is used.

PR Checklist

  • Communication: I've discussed this with core contributors already. If the work hasn't been agreed, this work might be rejected
  • Tests: Added/updated and all pass
  • Localization: All end-user-facing strings can be localized
  • Dev docs: Added/updated
  • New binaries: Added on the required places
  • Documentation updated: If checked, please file a pull request on our docs repo and link it here: #xxx

Detailed Description of the Pull Request / Additional comments

Backend (C++)

  • Added extendedContextMenuOnly boolean setting (defaults false for backward compatibility)
  • QueryContextMenu() checks CMF_EXTENDEDVERBS flag when setting enabled
  • JSON persistence at %LOCALAPPDATA%\Microsoft\PowerToys\ImageResizer\image-resizer-settings.json
// Check if we should only be on the extended context menu
if (CSettingsInstance().GetExtendedContextMenuOnly() && (!(uFlags & CMF_EXTENDEDVERBS)))
    return E_FAIL;

Settings UI (C#)

  • New "Shell integration" group with ComboBox (default/extended only)
  • InfoBar explains Shift + Right-click shortcut
  • Property binding with automatic persistence via ViewModel

Files Modified: 8 files (+87, -1 lines)

  • Backend: Settings.h, Settings.cpp, ContextMenuHandler.cpp
  • Settings UI: ImageResizerProperties.cs, ImageResizerViewModel.cs, ImageResizerPage.xaml, Resources.resw
  • Tests: ImageResizer.cs (added persistence test)

Behavior:

Setting Right-Click Shift + Right-Click
Default and extended Shows Shows
Extended only Hidden Shows

Validation Steps Performed

  • Unit test verifies property persistence
  • Manual testing required: context menu behavior in Explorer with images, settings persistence, UI display
Original prompt

This section details on the original issue you should resolve

<issue_title>[Image Resizer] Support only showing in extended context menu</issue_title>
<issue_description>## Feature Request

Can Image Resizer include a setting where it can be configured to only show in extended context menu (i.e. Shift + Right click). It is already supported by Powerrename, and it would be great to also have this setting in Image Resizer.</issue_description>

<agent_instructions>Implement a proper fix for this issue. Do NOT create placeholder stub files. Create actual working code that addresses the issue described. Follow PowerToys coding guidelines and conventions.</agent_instructions>

Comments on the Issue (you are @copilot in this section)

@crutkas Great idea!

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 3 commits February 5, 2026 15:20
Co-authored-by: yeelam-gordon <73506701+yeelam-gordon@users.noreply.github.com>
Co-authored-by: yeelam-gordon <73506701+yeelam-gordon@users.noreply.github.com>
Co-authored-by: yeelam-gordon <73506701+yeelam-gordon@users.noreply.github.com>
Copilot AI changed the title [WIP] Add setting for showing Image Resizer in extended context menu Add extended context menu setting for Image Resizer Feb 5, 2026
Copilot AI requested a review from yeelam-gordon February 5, 2026 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Image Resizer] Support only showing in extended context menu

2 participants