Sample apps
WebView2Samples repo
Sample apps that use WebView2 are available in the WebView2Samples repo, for various frameworks or platforms.
Article | Sample | Notes |
---|---|---|
Win32 sample app | WebView2APISample | Main sample; extensive. |
Win32 sample app with Visual Composition | WebView2SampleWinComp | Windows Runtime Composition APIs leverage the Windows UI in Win32 app. |
WebView2Browser (Win32 C++/JS) | WebView2Browser repo | Uses multiple WebView2 instances. A major sample; has its own repo. |
WinUI 2 (UWP) sample app | webview2_sample_uwp | |
WPF sample app | WebView2WpfBrowser | |
WPF app with CDP extension | WV2CDPExtensionWPFSample | Use Chrome DevTools Protocol APIs in a WPF app. |
WinForms sample app | WebView2WindowsFormsBrowser |
These articles provide the specific steps to set up your machine and build, run, and update each sample.
Sample apps vs. completed Getting Started tutorials
The sample apps are the source of the sample code snippets that are shown in the API Reference docs and conceptual docs.
For some frameworks or platforms, the samples repo contains both a completed Getting Started tutorial and a sample app. These sample apps showcase more of the WebView2 APIs than the Getting Started tutorials.
Xbox WebView2 samples
See also
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기