Skip to content

Commit e845ee6

Browse files
mikehoffmsMichael Hoffmanpeiche-mscaptainbrosset
authored
Move samples repos Readme content into regular Docs (#2069)
* Merged-in top half of Readme content removed per WebView2Samples PR 140 * Linkfix, add pngs from samples repo * note to remove png from other repo * Ref link fix, tag table ref items * Improved format of Deploy samples * alt text * linkfix, alt text * Start doc'ing toolset versions * Fix png path * Started WinUI 3 Sample article * Added the Readme info for WiX Custom Action * Link to custom action sample * Linkfix * Clarify product.xml 3 lines/options * Samples use VS2019 * Linkfix * Refresh code blocks for GetStart Win32 per PR 144 * Try to reference code snippet by label id if possible * Try absolute path * Try range and different path * Use updated descriptive snippet ids * Describe menus of some sample apps * Indent code * Polish VS Deploy * Table cleanup * Hello World * Red lines to boxes * Inc'd review comments entered in dest. PR Co-authored-by: Michael Hoffman <[email protected]> Co-authored-by: Jessica Chen <[email protected]> Co-authored-by: Patrick Brosset <[email protected]>
1 parent 1e6a415 commit e845ee6

File tree

75 files changed

+2311
-881
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+2311
-881
lines changed
1.16 KB
Loading

microsoft-edge/toc.yml

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1025,10 +1025,27 @@
10251025
href: webview2/code-samples-links.md
10261026
displayName:
10271027

1028+
- name: Win32 sample app
1029+
href: webview2/samples/webview2apissample.md
1030+
displayName: WebView2APISample, SampleApps, Win32 sample app # repo dir names, top-of-page title
1031+
1032+
- name: Win32 sample app with Visual Composition
1033+
href: webview2/samples/webview2samplewincomp.md
1034+
displayName: WebView2SampleWinComp, Win32 sample app with Visual Composition # repo dir name, top-of-page title
1035+
1036+
- name: Win32 sample WebView2Browser
1037+
href: webview2/samples/webview2browser.md
1038+
displayName: WebView2Browser # repo dir name
1039+
10281040
- name: WinUI 2 (UWP) sample app
10291041
href: webview2/samples/webview2_sample_uwp.md
10301042
displayName: webview2_sample_uwp, WinUI 2 (UWP) sample app # repo dir name, top-of-page title
10311043

1044+
# pending, July 26 2022
1045+
# - name: WinUI 3 sample app
1046+
# href: webview2/samples/webview2-winui3-sample.md
1047+
# displayName: WebView2_WinUI3_Sample # repo dir name
1048+
10321049
- name: WPF sample app
10331050
href: webview2/samples/webview2wpfbrowser.md
10341051
displayName: WebView2WpfBrowser, WPF sample app # repo dir name, top-of-page title
@@ -1041,14 +1058,6 @@
10411058
href: webview2/samples/webview2windowsformsbrowser.md
10421059
displayName: WebView2WindowsFormsBrowser, WinForms sample app # repo dir name, top-of-page title
10431060

1044-
- name: Win32 sample app
1045-
href: webview2/samples/webview2apissample.md
1046-
displayName: WebView2APISample, SampleApps, Win32 sample app # repo dir names, top-of-page title
1047-
1048-
- name: Win32 sample app with Visual Composition
1049-
href: webview2/samples/webview2samplewincomp.md
1050-
displayName: WebView2SampleWinComp, Win32 sample app with Visual Composition # repo dir name, top-of-page title
1051-
10521061
# -----------------------------------------------------------------------------
10531062
# Deployment samples
10541063
- name: Deployment samples

microsoft-edge/webview2/code-samples-links.md

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,25 @@ ms.author: msedgedevrel
66
ms.topic: conceptual
77
ms.prod: microsoft-edge
88
ms.technology: webview
9-
ms.date: 07/18/2022
9+
ms.date: 08/29/2022
1010
---
1111
# Sample apps
1212

1313
Sample apps that use WebView2 are available in the [WebView2Samples repo](https://github.com/MicrosoftEdge/WebView2Samples/tree/main/SampleApps), for various frameworks or platforms.
1414

15-
| Framework or platform | Article | Sample in repo | Comments |
16-
|---|---|---|---|
17-
| WinUI 2 (UWP) | [WinUI 2 (UWP) sample app](samples/webview2_sample_uwp.md) | [webview2_sample_uwp](https://github.com/MicrosoftEdge/WebView2Samples/tree/main/SampleApps/webview2_sample_uwp) | &nbsp; |
18-
| WinUI 3 (Windows App SDK) | n/a | n/a | [Tutorial](get-started/winui.md).<br/> [Completed tutorial project](https://github.com/MicrosoftEdge/WebView2Samples/tree/main/GettingStartedGuides/WinUI3_GettingStarted). |
19-
| WPF | [WPF sample app](samples/webview2wpfbrowser.md) | [WebView2WpfBrowser](https://github.com/MicrosoftEdge/WebView2Samples/tree/main/SampleApps/WebView2WpfBrowser) | &nbsp; |
20-
| WPF with CDP | [WPF app with CDP extension](samples/wv2cdpextensionwpfsample.md) | [WV2CDPExtensionWPFSample](https://github.com/MicrosoftEdge/WebView2Samples/tree/main/SampleApps/WV2CDPExtensionWPFSample) | &nbsp; |
21-
| WinForms | [WinForms sample app](samples/webview2windowsformsbrowser.md) | [WebView2WindowsFormsBrowser](https://github.com/MicrosoftEdge/WebView2Samples/tree/main/SampleApps/WebView2WindowsFormsBrowser) | &nbsp; |
22-
| Win32 | [Win32 sample app](samples/webview2apissample.md) | [WebView2APISample](https://github.com/MicrosoftEdge/WebView2Samples/tree/main/SampleApps/WebView2APISample) | Main sample; extensive. Detailed Readme. |
23-
| Win32 with Visual Composition | [Win32 sample app with Visual Composition](samples/webview2samplewincomp.md) | [WebView2SampleWinComp](https://github.com/MicrosoftEdge/WebView2Samples/tree/main/SampleApps/WebView2SampleWinComp) | &nbsp; |
15+
| Article | Sample | Notes |
16+
|---|---|---|
17+
| [Win32 sample app](samples/webview2apissample.md) | [WebView2APISample](https://github.com/MicrosoftEdge/WebView2Samples/tree/main/SampleApps/WebView2APISample) | Main sample; extensive. |
18+
| [Win32 sample app with Visual Composition](samples/webview2samplewincomp.md) | [WebView2SampleWinComp](https://github.com/MicrosoftEdge/WebView2Samples/tree/main/SampleApps/WebView2SampleWinComp) | Windows Runtime Composition APIs leverage the Windows UI in Win32 app. |
19+
| [WebView2Browser (Win32 C++/JS)](samples/webview2browser.md) | [WebView2Browser repo](https://github.com/MicrosoftEdge/WebView2Browser) | Uses multiple WebView2 instances. A major sample; has its own repo. |
20+
| [WinUI 2 (UWP) sample app](samples/webview2_sample_uwp.md) | [webview2_sample_uwp](https://github.com/MicrosoftEdge/WebView2Samples/tree/main/SampleApps/webview2_sample_uwp) | &nbsp; |
21+
| [WPF sample app](samples/webview2wpfbrowser.md) | [WebView2WpfBrowser](https://github.com/MicrosoftEdge/WebView2Samples/tree/main/SampleApps/WebView2WpfBrowser) | &nbsp; |
22+
| [WPF app with CDP extension](samples/wv2cdpextensionwpfsample.md) | [WV2CDPExtensionWPFSample](https://github.com/MicrosoftEdge/WebView2Samples/tree/main/SampleApps/WV2CDPExtensionWPFSample) | Use Chrome DevTools Protocol APIs in a WPF app. |
23+
| [WinForms sample app](samples/webview2windowsformsbrowser.md) | [WebView2WindowsFormsBrowser](https://github.com/MicrosoftEdge/WebView2Samples/tree/main/SampleApps/WebView2WindowsFormsBrowser) | &nbsp; |
24+
25+
<!--
26+
| [WinUI 3 (Windows App SDK) sample app](./samples/webview2-winui3-sample.md) | _pending_ PR: https://github.com/MicrosoftEdge/WebView2Samples/pull/142 [WebView2_WinUI3_Sample](https://github.com/MicrosoftEdge/WebView2Samples/tree/main/SampleApps/WebView2_WinUI3_Sample) | [Tutorial](get-started/winui.md).<br/> [Completed tutorial project](https://github.com/MicrosoftEdge/WebView2Samples/tree/main/GettingStartedGuides/WinUI3_GettingStarted). |
27+
-->
2428

2529
These articles provide the specific steps to set up your machine and build, run, and update each sample.
2630

@@ -32,14 +36,6 @@ The sample apps are the source of the sample code snippets that are shown in the
3236
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.
3337

3438

35-
#### Installed SDK package versions
36-
37-
Typically, for these samples, you do the following sequence:
38-
1. Build and run the sample as-is from the repo.
39-
1. Update the sample's project's packages, such as the WebView2 prerelease SDK. The prerelease SDK allows you to try the latest APIs.
40-
1. Build and run the sample using the updated SDK packages.
41-
42-
4339
<!-- ====================================================================== -->
4440
## See also
4541

microsoft-edge/webview2/concepts/basic-authentication.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ For more information, see [Navigation events for WebView2 apps](navigation-event
5454

5555
The following diagram shows the flow of navigation events for basic authentication for WebView2 apps:
5656

57-
![Flow of navigation events for basic authentication for WebView2 apps.](basic-authentication-images/basic-auth-page-nav-flow.png)
57+
![Flow of navigation events for basic authentication for WebView2 apps](basic-authentication-images/basic-auth-page-nav-flow.png)
5858
<!-- initial Visio filename: https://microsoft-my.sharepoint.com/ ... "Basic Auth in Page Nav Flow.vsd"
5959
later, check: Teams > Team > channel > Files > dir > filename -->
6060

microsoft-edge/webview2/concepts/distribution.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ Cons:
6363

6464
The [Download the WebView2 Runtime](https://developer.microsoft.com/microsoft-edge/webview2#download-section) section of the **Microsoft Edge WebView2** page provides several options for distributing the WebView2 Runtime onto client machines. Understanding the options at this page provides a good introduction, to help decide which approach you want to use.
6565

66-
![Options for distributing and updating the WebView2 Runtime.](../media/runtime-distrib-options.png)
66+
![Options for distributing and updating the WebView2 Runtime](../media/runtime-distrib-options.png)
6767

6868
The Evergreen distribution mode is recommended for most apps.
6969

@@ -332,7 +332,7 @@ To use the Fixed Version distribution mode:
332332

333333
1. To confirm that PlayReady is installed correctly, in the **Security** tab of the **Fixed Version** folder, make sure permissions are granted for `ALL APPLICATION PACKAGES` and `ALL RESTRICTED APPLICATION PACKAGES`, as shown below:
334334

335-
![Permission for PlayReady.](../media/play-ready-permission.png)
335+
![Permission for PlayReady](../media/play-ready-permission.png)
336336

337337

338338
<!-- ====================================================================== -->

microsoft-edge/webview2/concepts/navigation-events.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ The normal sequence of navigation events is:
4141

4242
The following events describe the state of WebView2 during each navigation action:
4343

44-
![WebView2 Navigation Events.](../media/navigation-graph.png)
44+
![WebView2 Navigation Events](../media/navigation-graph.png)
4545

4646
| Sequence | Event name | Details |
4747
| --- | --- | --- |

microsoft-edge/webview2/concepts/process-model.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ A _WebView2 process group_ is a collection of WebView2 Runtime processes. A Web
2424
* One or more renderer processes.
2525
* Other helper processes, such as the GPU process and the Audio service process.
2626

27-
![Process 1.](../media/process-model-1.png)
27+
![Process 1](../media/process-model-1.png)
2828

2929
The number and presence of processes in a WebView2 process group can change as a WebView2 application makes use of WebView2 features. (However, there's only a single, specific browser process in a WebView2 process group.) For example, creating a new WebView2 instance from the same `CoreWebView2Environment`, but with a different domain in the `Source` property, will usually start a new renderer process.
3030

@@ -44,7 +44,7 @@ All processes in a WebView2 Runtime processes collection are tied to the browser
4444

4545
A user data folder can be shared by multiple applications, but be sure to consider the implications on performance and management, as described in [Manage user data folders](user-data-folder.md).
4646

47-
![Process 2.](../media/process-model-2.png)
47+
![Process 2](../media/process-model-2.png)
4848

4949
To make use of multiple user data folders, a WebView2 application needs to create different `CoreWebView2Environment` objects. A `WebView2` instance is created for a given user data folder through the configured `CoreWebView2Environment` object. Each `CoreWebView2Environment` object needs to be configured with a different user data folder value.
5050

microsoft-edge/webview2/concepts/threading-model.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ private void CoreWebView2_WebMessageReceived(object sender, CoreWebView2WebMessa
7474
> 1. In **Solution Explorer**, right-click the WebView2 project and then select **Properties**.
7575
> 1. Select the **Debug** tab, and then select the **Enable native code debugging** checkbox, as shown below.
7676
77-
![Enabling native code debugging in Visual Studio.](../media/webview-enable-native-debug.png)
77+
![Enabling native code debugging in Visual Studio](../media/webview-enable-native-debug.png)
7878

7979

8080
<!-- ====================================================================== -->

microsoft-edge/webview2/get-started/get-started.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,20 @@ ms.date: 01/24/2022
1010
---
1111
# Getting Started tutorials
1212

13-
These articles cover how to set up your development tools and create an initial WebView2 app, and learn about WebView2 concepts along the way.
13+
These articles cover how to set up your development tools and create an initial WebView2 app, like a Hello World app with basic functionality. Learn about WebView2 concepts along the way.
1414

15-
| Framework | Article | Completed project |
15+
| Article | Completed project | Description |
1616
|---|---|---|
17-
| WinUI 2 (UWP) | [Get started with WebView2 in WinUI 2 (UWP) apps](winui2.md) | n/a |
18-
| WinUI 3 (Windows App SDK) | [Get started with WebView2 in WinUI 3 (Windows App SDK) apps](winui.md) | [WinUI3_GettingStarted](https://github.com/MicrosoftEdge/WebView2Samples/tree/main/GettingStartedGuides/WinUI3_GettingStarted) |
19-
| WPF | [Get started with WebView2 in WPF apps](wpf.md) | [WPF_GettingStarted](https://github.com/MicrosoftEdge/WebView2Samples/tree/main/GettingStartedGuides/WPF_GettingStarted) |
20-
| WinForms | [Get started with WebView2 in WinForms apps](winforms.md) | [WinForms_GettingStarted](https://github.com/MicrosoftEdge/WebView2Samples/tree/main/GettingStartedGuides/WinForms_GettingStarted) |
21-
| Win32 | [Get started with WebView2 in Win32 apps](win32.md) | [Win32_GettingStarted](https://github.com/MicrosoftEdge/WebView2Samples/tree/main/GettingStartedGuides/Win32_GettingStarted) |
17+
| [Get started with WebView2 in WinUI 2 (UWP) apps](winui2.md) | n/a<!--todo: upload finished project--> | Use **C# Blank App (Universal Windows)** project template and install the **Microsoft.UI.Xaml** package (WinUI 2), which installs the **Microsoft.Web.WebView2** SDK package as a dependency. |
18+
| [Get started with WebView2 in WinUI 3 (Windows App SDK) apps](winui.md) | [WinUI3_GettingStarted](https://github.com/MicrosoftEdge/WebView2Samples/tree/main/GettingStartedGuides/WinUI3_GettingStarted) | Use the **Blank App, Packaged (WinUI in Desktop)** project template, which uses the WindowsAppSDK, which includes the WebView2 SDK. Add an address bar and URL logic. |
19+
| [Get started with WebView2 in WPF apps](wpf.md) | [WPF_GettingStarted](https://github.com/MicrosoftEdge/WebView2Samples/tree/main/GettingStartedGuides/WPF_GettingStarted) | Use the **WPF Application** or **WPF App (.NET Framework)** project template to create a WPF app, and then install the WebView2 SDK for the project to add WebView2. |
20+
| [Get started with WebView2 in WinForms apps](winforms.md) | [WinForms_GettingStarted](https://github.com/MicrosoftEdge/WebView2Samples/tree/main/GettingStartedGuides/WinForms_GettingStarted) | Use the **C# Windows Forms App (.NET Framework)** project template to create a WinForms project, then install the **Microsoft.Web.WebView2** SDK package for the WinForms project. |
21+
| [Get started with WebView2 in Win32 apps](win32.md) | [Win32_GettingStarted](https://github.com/MicrosoftEdge/WebView2Samples/tree/main/GettingStartedGuides/Win32_GettingStarted) | Starts by opening an existing Win32 app project that has the WebView2 SDK and code already added. |
2222

2323

2424
<!-- ====================================================================== -->
2525
## See also
2626

27-
* [Sample apps](../code-samples-links.md)
2827
* [Microsoft Edge WebView2](https://developer.microsoft.com/microsoft-edge/webview2) - initial introduction to WebView2, at `developer.microsoft.com`.
29-
* [WebView2Samples repo > Readme](https://github.com/MicrosoftEdge/WebView2Samples#readme)
28+
* [Sample apps](../code-samples-links.md) - framework-specific sample apps that showcase more of the WebView2 APIs than the Getting Started tutorials.
29+
* [WebView2Samples repo](https://github.com/MicrosoftEdge/WebView2Samples#readme) - contains completed Visual Studio projects that result from following the steps in these Getting Started tutorials, as well as sample apps and deployment samples.
Binary file not shown.

0 commit comments

Comments
 (0)