Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update main readme to cover the UWP sample and add a missing default.… #111

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ In the ``GettingStarted`` folder you will find the starter code for its respecti
- [WinUI Getting Started](https://docs.microsoft.com/microsoft-edge/webview2/gettingstarted/winui)

In the ``Sample Apps`` folder you will find:
- [WebView2Samples.sln](SampleApps/WebView2Samples.sln) - a collective solution that includes [WebView2APISample.vcxproj](SampleApps/WebView2APISample/WebView2APISample.vcxproj), [WebView2SampleWinComp.vcxproj](SampleApps/WebView2SampleWinComp/WebView2SampleWinComp.vcxproj), [WebView2WpfBrowser.csproj](SampleApps/WebView2WpfBrowser/WebView2WpfBrowser.csproj), [WebView2WindowsFormsBrowser.csproj](SampleApps/WebView2WindowsFormsBrowser/WebView2WindowsFormsBrowser.csproj), [WV2DeploymentWiXCustomActionSample](/SampleApps/WV2DeploymentWiXCustomActionSample/README.md), and [WV2DeploymentWiXBurnBundleSample](/SampleApps/WV2DeploymentWiXBurnBundleSample/README.md).
- [WebView2Samples.sln](SampleApps/WebView2Samples.sln) - a collective solution that includes [WebView2APISample.vcxproj](SampleApps/WebView2APISample/WebView2APISample.vcxproj), [WebView2SampleWinComp.vcxproj](SampleApps/WebView2SampleWinComp/WebView2SampleWinComp.vcxproj), [WebView2WpfBrowser.csproj](SampleApps/WebView2WpfBrowser/WebView2WpfBrowser.csproj), [WebView2WindowsFormsBrowser.csproj](SampleApps/WebView2WindowsFormsBrowser/WebView2WindowsFormsBrowser.csproj), [WV2DeploymentWiXCustomActionSample](/SampleApps/WV2DeploymentWiXCustomActionSample/README.md), [WV2DeploymentWiXBurnBundleSample](/SampleApps/WV2DeploymentWiXBurnBundleSample/README.md), and [webview2_sample_uwp](/SampleApps/webview2_sample_uwp/README.md)

Please leave feedback in our [our feedback repo](https://aka.ms/webviewfeedback)!

Expand Down Expand Up @@ -43,11 +43,11 @@ Follow the [WebView2Browser guide](https://github.com/MicrosoftEdge/WebView2Brow
* The **WPF Sample** can be found in the [WebView2WpfBrowser](./SampleApps/WebView2WpfBrowser) directory.
* The **Windows Forms Sample** can be found in the [WebView2WindowsFormsBrowser](./SampleApps/WebView2WindowsFormsBrowser) directory.

## UWP/WinUI
## UWP/WinUI2

#### Comprehensive API Sample
#### WebView2 UWP sample
* The "WinUi2 Webview UWP sample can be found int the [webview2_sample_uwp](./SampleApps/webview2_sample_uwp) directory.

The **UWP WinUI Sample** can be found in the [WinUI Controls Gallery](https://github.com/microsoft/Xaml-Controls-Gallery/tree/winui3preview).

## WebView2 Deployment

Expand Down
2 changes: 1 addition & 1 deletion SampleApps/webview2_sample_uwp/properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: ComVisible(false)]
[assembly: AssemblyTitleAttribute("webview2_sample_uwp")]
[assembly: AssemblyDescriptionAttribute("A WebView2 WinUI2 UWP test application")]
[assembly: AssemblyDescriptionAttribute("A WebView2 WinUI 2 UWP test application")]
[assembly: AssemblyCompanyAttribute("Microsoft")]
[assembly: AssemblyCopyrightAttribute("Copyright © Microsoft Inc. 2021")]
31 changes: 31 additions & 0 deletions SampleApps/webview2_sample_uwp/properties/Default.rd.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<!--
This file contains Runtime Directives used by .NET Native. The defaults here are suitable for most
developers. However, you can modify these parameters to modify the behavior of the .NET Native
optimizer.

Runtime Directives are documented at https://go.microsoft.com/fwlink/?LinkID=391919

To fully enable reflection for App1.MyClass and all of its public/private members
<Type Name="App1.MyClass" Dynamic="Required All"/>

To enable dynamic creation of the specific instantiation of AppClass<T> over System.Int32
<TypeInstantiation Name="App1.AppClass" Arguments="System.Int32" Activate="Required Public" />

Using the Namespace directive to apply reflection policy to all the types in a particular namespace
<Namespace Name="DataClasses.ViewModels" Serialize="All" />
-->

<Directives xmlns="http://schemas.microsoft.com/netfx/2013/01/metadata">
<Application>
<!--
An Assembly element with Name="*Application*" applies to all assemblies in
the application package. The asterisks are not wildcards.
-->
<Assembly Name="*Application*" Dynamic="Required All" />


<!-- Add your application specific runtime directives here. -->


</Application>
</Directives>
10 changes: 5 additions & 5 deletions SampleApps/webview2_sample_uwp/readme.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
description: "Demonstrate the features and usage patterns of WebView2 running in a UWP application using winui2."
description: "Demonstrate the features and usage patterns of WebView2 running in a UWP application using WinUI 2."
extendedZipContent:
-
path: SharedContent
Expand All @@ -14,7 +14,7 @@ products:
- microsoft-edge
urlFragment: WebView2_UWP
---
# WebView2 UWP WinUi2 browser
# WebView2 UWP WinUi 2 browser

This is a hybrid application built with the [Microsoft Edge WebView2](https://aka.ms/webview2) control.

Expand All @@ -33,9 +33,9 @@ To learn more specifics about events and API Handlers in WebView2, you can refer
- [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.
- Latest pre-release version of the [WinUI2 SDK](https://aka.ms/webviewnuget), which is included in this project
- Latest pre-release version of the [WinUI 2 SDK](https://aka.ms/webviewnuget), which is included in this project

## Build the WebView2 UWP WinUi2 browser
## Build the WebView2 UWP WinUi 2 browser

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

Expand All @@ -46,7 +46,7 @@ Clone the repository and open the solution in Visual Studio. WebView2 & WebUi2 a

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.
*You can get the WebView2 & WinUI 2 NugetPackage through the Visual Studio NuGet Package Manager.

## Code of Conduct

Expand Down