PowerToys icon indicating copy to clipboard operation
PowerToys copied to clipboard

Adjust ContextMenu UX

Open DHowett opened this issue 10 months ago • 0 comments

originally filed by @plante-msft

Description of the new feature / enhancement

The ContextMenu (previously Actions panel) needs to be improved to be clear and Windows-like while still being visually discoverable within the Palette

Scenario when this would be used?

User can discover and hit ContextMenu shortcut key to invoke "more commands"

Supporting information

No response


comment from @zadjii

I would also love to have the ContextMenu items show up when right-clicking on a listitem_comment from @zadjii-msft_

@niels9001 and @michael-hawker I'll probably want your help with this.

The obvious choice for this menu seems like a MenuFlyout - it's got icons, text, keybindings, and separators. Just what we need.

Except that you can't x:Bind to the Items of a MenuFlyout. You can apparently play silly games with XAML to try and create your own fake MenuFlyout binding like this: https://stackoverflow.com/questions/20336517/why-doesnt-the-windows-8-1-menuflyout-have-itemssource-property

But Of course, a MenuFlyoutItem.Icon won't accept an IconBox control - it needs an actual Icon. And then the padding also looks insane:

image

(this looked better:

  Margin="-8,-4,-8,-4" 
  Padding="8,4,8,4" 

but it was still wrong )

And of course, I can't just populate the menu in code-behind, because again I don't know how to bind the .Icon of the MenuFlyoutItem to the icon of the item to do the async cache lookup thing.

So, does that leave us with "Stylize the ListViewItems to not look terrible?" How would we handle seperators in that case? comment from @zadjii-msft

https://github.com/zadjii-msft/PowerToys/issues/434 started this

DHowett avatar Mar 31 '25 15:03 DHowett