Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content
main
Switch branches/tags
WebView2Samples/SampleApps/webview2_sample_uwp/
WebView2Samples/SampleApps/webview2_sample_uwp/

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
description extendedZipContent languages page_type products urlFragment
Demonstrate the features and usage patterns of WebView2 running in a UWP application using winui2.
path target
SharedContent
SharedContent
path target
LICENSE
LICENSE
cpp
sample
microsoft-edge
WebView2_UWP

WebView2 UWP WinUi2 browser

This is a hybrid application built with the Microsoft Edge WebView2 control.

Sample App Snapshot

The WebView2 UWP is an example of an application that embeds a WebView within a UWP application. It is built as a UWP Visual Studio 2019 project and makes use of both cpp and HTML/CSS/JavaScript in the WebView2 environment.

The sample showcases simple application structure and handling of webview api.

If this is your first time using WebView, we recommend first following the Getting Started guide, which goes over how to create a WebView2 and walks through some basic WebView2 functionality.

To learn more specifics about events and API Handlers in WebView2, you can refer to the WebView2 Reference Documentation.

Prerequisites

  • Microsoft Edge (Chromium) installed on a supported OS. Currently we recommend the latest version of the Edge Canary channel.
  • Visual Studio with .NET support installed.
  • Latest pre-release version of our WebView2 SDK, which is included in this project.
  • Latest pre-release version of the WinUI2 SDK, which is included in this project

Build the WebView2 UWP WinUi2 browser

Clone the repository and open the solution in Visual Studio. WebView2 & WebUi2 are already included as a NuGet package* in this project.

  • Clone this repository
  • Open the solution in Visual Studio 2019
  • Set the target you want to build (Debug/Release, AnyCPU)
  • Build the project file: WebView2_UWP.csproj

That's it! Everything should be ready to just launch the app.

*You can get the WebView2 & WinUI2 NugetPackage through the Visual Studio NuGet Package Manager.

Code of Conduct

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.