microsoft / microsoft/microsoft-ui-xaml
WebView2 control fails to load content in WinUI SampleBrowser
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 8.4k
- Forks
- 942
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 105
Description
### Describe the bug
When running the WebView2 control inside the SampleBrowser application, the content does not load. However, when running the same control in a standalone sample project, it works correctly.
[samplebrowser-winui.zip](https://github.com/user-attachments/files/32002780/samplebrowser-winui.zip)
### Why is this important?
We are currently using webview2 control in our application and we face an crash due to this .
### Steps to reproduce the bug
- Extract the attached project files.
- Open the WebView folder.
- Run the sample from within the SampleBrowser.
- Observe that the content is not displayed.
### Actual behavior
When running the sample inside the SampleBrowser, the HTML content is not displayed, even though the background color is applied.
### Expected behavior
When running the sample inside the SampleBrowser, the HTML content must be displayed.
### Screenshots
_No response_
### NuGet package version
1.0.4191.47
### Windows version
_No response_
### Additional context
_No response_
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the attached samplebrowser-winui.zip and the WebView folder, then run the sample from within the SampleBrowser to reproduce the loading failure. Compare its behavior with the same control in a standalone sample project; done means the HTML content displays inside SampleBrowser while retaining the applied background color.
Written by the indexing model from the issue text.
Assessment
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100