Excel Addin -> Custom Pane with Html -> Dragging between 2 screens with different resolutions misplaces the pane content

Viewed 70

In my Excel Addin project (c#) I created a custom pane, which uses winfrom control, which hosts an html page using WebView2.

When I drag the Excel app between 2 different screens, with different resolutions the pane html content seems to go out of place:

enter image description here

When I use a winform control without hosting an html page, this doesn't happen.

I tried hooking on the WebView2's OnResize, and also control's, and I see that size changes when content gets out of place, but don't know how to fix it. Tried various options like setting parent to null etc...

Any ideas?

0 Answers
Related