-
Notifications
You must be signed in to change notification settings - Fork 473
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Onboarding Samples and Guides to docs.microsoft.com/samples (#51)
* Added README.md for getting started guides * Added urlFragment * Updated README.md for sample apps
- Loading branch information
1 parent
b9e752a
commit fbee375
Showing
8 changed files
with
167 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
description: "Getting started with WebView2 in WPF doc" | ||
languages: | ||
- csharp | ||
page_type: sample | ||
products: | ||
- microsoft-edge | ||
urlFragment: webview2-wpf-getting-started | ||
--- | ||
# Getting Started with WebView2 in WPF | ||
|
||
This sample relates to the [Getting started with WebView2 in WPF](https://docs.microsoft.com/microsoft-edge/webview2/gettingstarted/wpf) doc. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
description: "Getting started with WebView2 for Win32 apps doc" | ||
languages: | ||
- cpp | ||
page_type: sample | ||
products: | ||
- microsoft-edge | ||
urlFragment: webview2-win32-getting-started | ||
--- | ||
# Getting Started with WebView2 for Win32 apps | ||
|
||
This sample relates to the [Getting started with WebView2 for Win32 apps](https://docs.microsoft.com/microsoft-edge/webview2/gettingstarted/win32) doc. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
description: "Getting started with WebView2 in WinUI3 doc" | ||
languages: | ||
- csharp | ||
page_type: sample | ||
products: | ||
- microsoft-edge | ||
urlFragment: webview2-winui3-getting-started | ||
--- | ||
# Getting Started with WebView2 in WinUI3 | ||
|
||
This sample relates to the [Getting started with WebView2 in WinUI3](https://docs.microsoft.com/microsoft-edge/webview2/gettingstarted/winui) doc. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
--- | ||
description: "Demonstrate the features and usage patterns of WebView2 in Windows Forms." | ||
extendedZipContent: | ||
- | ||
path: SharedContent | ||
target: SharedContent | ||
- | ||
path: LICENSE | ||
target: LICENSE | ||
languages: | ||
- csharp | ||
page_type: sample | ||
products: | ||
- microsoft-edge | ||
urlFragment: WebView2WindowsFormsBrowser | ||
--- | ||
# WebView2 Windows Forms Browser | ||
|
||
This is a hybrid application built with the [Microsoft Edge WebView2](https://aka.ms/webview2) control. | ||
|
||
![Sample App Snapshot](https://raw.githubusercontent.com/MicrosoftEdge/WebView2Samples/master/SampleApps/WebView2WindowsFormsBrowser/screenshots/winforms-browser-screenshot.png) | ||
|
||
The WebView2WindowsFormsBrowser is an example of an application that embeds a WebView within a Windows Forms application. It is built as a Windows Forms [Visual Studio 2019](https://visualstudio.microsoft.com/vs/) project and makes use of both C# and HTML/CSS/JavaScript in the WebView2 environment. | ||
|
||
The API Sample showcases a selection of WebView2's event handlers and API methods that allow a Windows Forms application to directly interact with a WebView and vice versa. | ||
|
||
If this is your first time using WebView, we recommend first following the [Getting Started](https://docs.microsoft.com/microsoft-edge/webview2/gettingstarted/winforms) 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](https://docs.microsoft.com/microsoft-edge/webview2/webview2-api-reference). | ||
|
||
## Prerequisites | ||
|
||
- [Microsoft Edge (Chromium)](https://www.microsoftedgeinsider.com/download/) installed on a supported OS. Currently we recommend the latest version of the Edge Canary channel. | ||
- [Visual Studio](https://visualstudio.microsoft.com/vs/) with .NET support installed. | ||
- Latest pre-release version of our [WebView2 SDK](https://aka.ms/webviewnuget), which is included in this project. | ||
|
||
## Build the WebView2 Windows Forms Browser | ||
|
||
Clone the repository and open the solution in Visual Studio. WebView2 is 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: _WebView2WindowsFormsBrowser.csproj_ | ||
|
||
That's it! Everything should be ready to just launch the app. | ||
|
||
*You can get the WebView2 NugetPackage through the Visual Studio NuGet Package Manager. | ||
|
||
**You can also use Visual Studio 2017 by changing the project's Platform Toolset in Project Properties/Configuration properties/General/Platform Toolset. You might also need to change the Windows SDK to the latest version available to you. | ||
|
||
## Code of Conduct | ||
|
||
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [email protected] with any additional questions or comments. |
Binary file added
BIN
+408 KB
SampleApps/WebView2WindowsFormsBrowser/screenshots/winforms-browser-screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
--- | ||
description: "Demonstrate the features and usage patterns of WebView2 in WPF." | ||
extendedZipContent: | ||
- | ||
path: SharedContent | ||
target: SharedContent | ||
- | ||
path: LICENSE | ||
target: LICENSE | ||
languages: | ||
- csharp | ||
page_type: sample | ||
products: | ||
- microsoft-edge | ||
urlFragment: WebView2WpfBrowser | ||
--- | ||
# WebView2 WPF Browser | ||
|
||
This is a hybrid application built with the [Microsoft Edge WebView2](https://aka.ms/webview2) control. | ||
|
||
![Sample App Snapshot](https://raw.githubusercontent.com/MicrosoftEdge/WebView2Samples/master/SampleApps/WebView2WpfBrowser/screenshots/wpf-browser-screenshot.png) | ||
|
||
The WebView2WpfBrowser is an example of an application that embeds a WebView within a WPF application. It is built as a WPF [Visual Studio 2019](https://visualstudio.microsoft.com/vs/) project and makes use of both C# and HTML/CSS/JavaScript in the WebView2 environment. | ||
|
||
The API Sample showcases a selection of WebView2's event handlers and API methods that allow a WPF application to directly interact with a WebView and vice versa. | ||
|
||
If this is your first time using WebView, we recommend first following the [Getting Started](https://docs.microsoft.com/microsoft-edge/webview2/gettingstarted/wpf) 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](https://docs.microsoft.com/microsoft-edge/webview2/webview2-api-reference). | ||
|
||
## Prerequisites | ||
|
||
- [Microsoft Edge (Chromium)](https://www.microsoftedgeinsider.com/download/) installed on a supported OS. Currently we recommend the latest version of the Edge Canary channel. | ||
- [Visual Studio](https://visualstudio.microsoft.com/vs/) with .NET support installed. | ||
- Latest pre-release version of our [WebView2 SDK](https://aka.ms/webviewnuget), which is included in this project. | ||
|
||
## Build the WebView2 WPF Browser | ||
|
||
Clone the repository and open the solution in Visual Studio. WebView2 is 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: _WebView2WpfBrowser.csproj_ | ||
|
||
That's it! Everything should be ready to just launch the app. | ||
|
||
*You can get the WebView2 NugetPackage through the Visual Studio NuGet Package Manager. | ||
|
||
**You can also use Visual Studio 2017 by changing the project's Platform Toolset in Project Properties/Configuration properties/General/Platform Toolset. You might also need to change the Windows SDK to the latest version available to you. | ||
|
||
## Code of Conduct | ||
|
||
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [email protected] with any additional questions or comments. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.