cefsharp / CefSharp

.NET (WPF and Windows Forms) bindings for the Chromium Embedded Framework
http://cefsharp.github.io/
Other
9.79k stars 2.92k forks source link

WPF - ContextMenu's position doesn't work if grid size is changed by a grid splitter. #3908

Closed Dragmoria closed 2 years ago

Dragmoria commented 2 years ago

Bug Report

amaitland commented 2 years ago

Please test with the 96-pre release. See https://github.com/cefsharp/CefSharp/issues/3902#issuecomment-978820002

A custom WPF specific context menu is now used instead of the default CEF native menu (#1767)

Dragmoria commented 2 years ago

I just tried this in my own project and if I remove the web browser menu handler it works now which is awesome, if I don't do that it still does goes to the wrong position. I do wonder how I would go about adding extra items or removing certain items from the context menu if that is at all possible still since using this with a menu handler doesn't work?

amaitland commented 2 years ago

I do wonder how I would go about adding extra items or removing certain items from the context menu if that is at all possible still since using this with a menu handler doesn't work?

You can extend the WPF implementation, see https://github.com/cefsharp/CefSharp/blob/cefsharp/96/CefSharp.Wpf.Example/Handlers/MenuHandler.cs for example of adding a new command, you can customise the existing model as you would normally.

Dragmoria commented 2 years ago

Awesome that all works. Ty very much.