reactivemarbles / CrissCross

A Navigation Framework for ReactiveUI based projects
MIT License
37 stars 2 forks source link

WebView2 have a border #135

Open X-Yunner opened 1 month ago

X-Yunner commented 1 month ago

I have two Windows: loginwindow and mainwindow. webview2 In the mainwindow, I first display the loginwindow and it will have a border. Snipaste_2024-07-24_14-07-37

After the loginwindow disappears, there will still be a border in the mainwindow. How can I cancel this border? Snipaste_2024-07-24_14-16-01

Snipaste_2024-07-24_14-11-56

code image

ChrisPulman commented 1 month ago

Thank you for raising this, I will investigate what might be the cause of the border and provide and update if there is a way to resolve this issue.

ChrisPulman commented 1 month ago

@X-Yunner Please could you try V2.0.2 and see if the issue still exists, if it doesn't fix the issue, would it be possible to put a minimal demonstration of the issue to assist me to see where the issue is coming from.

X-Yunner commented 1 month ago

Thank you for handling the problem so quickly. I created a demo library in my github repository, which can reproduce this problem. https://github.com/X-Yunner/TestWebView2 I checked for distribution problems myself. It seems that the wpf-ui library appears. If I use this ui library, a border will appear in webview2. Maybe I will go to the wpf-ui library and ask questions. Anyway, thanks.

ChrisPulman commented 1 month ago

Thank you for handling the problem so quickly. I created a demo library in my github repository, which can reproduce this problem. X-Yunner/TestWebView2 I checked for distribution problems myself. It seems that the wpf-ui library appears. If I use this ui library, a border will appear in webview2. Maybe I will go to the wpf-ui library and ask questions. Anyway, thanks.

@X-Yunner I created a PR in your repository, hopefully we can find what is happening in your app.

X-Yunner commented 1 month ago

Yes, I have seen Pr, it seems that the different versions of the computer system caused by the border problem

ChrisPulman commented 1 month ago

Which OS are you using? I'm using Windows 11, but I could test on any OS if required. I saw the target OS is Windows 10. I will try to test this in the next couple of days.

X-Yunner commented 1 month ago

Looking forward to a solution. This is my system information.

version: Windows 10 Home Chinese Edition version number: 22H2 installation date: ‎2024/‎1/‎15 Operating system build version: 19045.4651 experience: Windows Feature Experience Pack 1000.19060.1000.0

ChrisPulman commented 1 month ago

@X-Yunner please update to V2.0.3 of CrissCross, I believe I found the issue you were experiencing with Windows 10, I have made the functionality equal for Windows 10 or 11.

You may wish to consider using a MVVM approach and have a single Wpf Window per physical monitor as a Navigation Host window for displaying a multitude of UserControls (Views) controlled with navigation.

X-Yunner commented 1 month ago

Yes, thank you for fixing it. There is no border in the loginwindow interface, but there is still a border in the mainwindow. Is there a way to cancel it? Snipaste_2024-07-29_09-27-50

ChrisPulman commented 1 month ago

@X-Yunner I will try to see where that comes from, it looks like a scroll viewer which I do not add, but if I can locate the source and control it, I will let you know how I get on.

ChrisPulman commented 1 month ago

@X-Yunner I believe that the base WebView2 component has been updated to include this scroll component and is there as a part of the Microsoft control which has no exposure to the external API to control it. The border you are seeing is part of the scroll viewer, the UX appears differently between Windows 10 and Windows 11 as you have experienced. Hopefully your client can update to Windows 11 and solve the issue for us :) I have raised the issue within the Microsoft Webview2 control, but unfortunately nothing happens quickly there.

X-Yunner commented 1 month ago

Is this the problem you are talking about? If I don't include a control in it, it will have a True appear.

image

ChrisPulman commented 1 month ago

@X-Yunner I will see if I can find the true, that is definitely a strange one. I will focus on this tonight