MicrosoftEdge / MicrosoftEdge/WebView2Feedback

custom CoreWebView2ContextMenuItem.Icon not show

Open
#2,562 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
PowerShell
Stars
526
Forks
67
PR merge metrics
No merged PRs in 30d

Description

Description

 CoreWebView2ContextMenuItem newItem = edge.CoreWebView2.Environment.CreateContextMenuItem("复制链接", e.MenuItems.First().Icon, CoreWebView2ContextMenuItemKind.Command);
            newItem.CustomItemSelected += delegate (object send, Object ex)
            {
                Clipboard.SetText(edge.Source.ToString());
                edge.CoreWebView2.ExecuteScriptAsync("uni.showToast({  title: '复制成功',   duration: 2000}); ");
            };
             e.MenuItems.Add(newItem);

image

how can i do ...

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the CoreWebView2ContextMenuItem.Icon behavior using the CreateContextMenuItem snippet in the issue. Check the WebView2 context-menu and icon API documentation to determine whether the supplied icon is expected to display; done means identifying a documented fix or limitation for the missing icon.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.