CreateScaledBitmapFromStreamAsync(int width, int height, IRandomAccessStream source)
+ {
+ WriteableBitmap bitmap = new WriteableBitmap(width, height);
+ BitmapDecoder decoder = await BitmapDecoder.CreateAsync(source);
+ BitmapTransform transform = new BitmapTransform();
+ transform.ScaledHeight = (uint)height;
+ transform.ScaledWidth = (uint)width;
+ PixelDataProvider pixelData = await decoder.GetPixelDataAsync(
+ BitmapPixelFormat.Bgra8,
+ BitmapAlphaMode.Straight,
+ transform,
+ ExifOrientationMode.RespectExifOrientation,
+ ColorManagementMode.DoNotColorManage);
+ pixelData.DetachPixelData().CopyTo(bitmap.PixelBuffer);
+ return bitmap;
+ }
+ }
+}
diff --git a/Samples/XamlWebView/cs/Scenario9_ContainsFullScreenElement.xaml b/Samples/XamlWebView/cs/Scenario9_ContainsFullScreenElement.xaml
new file mode 100644
index 0000000000..dbd51d296c
--- /dev/null
+++ b/Samples/XamlWebView/cs/Scenario9_ContainsFullScreenElement.xaml
@@ -0,0 +1,42 @@
+
+
+
+
+
+
+
+
+
+
+
+ Full-screen mode
+
+
+ The app can respond to requests from the WebView to offer a full-screen experience.
+ For example, it may resize the WebView to occupy the entirety of the app view, or, as this
+ scenario illustrates, put a windowed app in full screen mode.
+
+
+
+
+
+
+
+
diff --git a/Samples/XamlWebView/cs/Scenario9_ContainsFullScreenElement.xaml.cs b/Samples/XamlWebView/cs/Scenario9_ContainsFullScreenElement.xaml.cs
new file mode 100644
index 0000000000..7cdd5337de
--- /dev/null
+++ b/Samples/XamlWebView/cs/Scenario9_ContainsFullScreenElement.xaml.cs
@@ -0,0 +1,51 @@
+//*********************************************************
+//
+// Copyright (c) Microsoft. All rights reserved.
+// This code is licensed under the MIT License (MIT).
+// THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
+// ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
+// IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR
+// PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
+//
+//*********************************************************
+
+using System;
+using Windows.UI.ViewManagement;
+using Windows.UI.Xaml.Controls;
+using Windows.UI.Xaml.Navigation;
+
+namespace SDKTemplate
+{
+ ///
+ /// An empty page that can be used on its own or navigated to within a Frame.
+ ///
+ public sealed partial class Scenario9_ContainsFullScreenElement : Page
+ {
+ public Scenario9_ContainsFullScreenElement()
+ {
+ this.InitializeComponent();
+ }
+
+ protected override void OnNavigatedTo(NavigationEventArgs e)
+ {
+ WebViewControl.Navigate(new Uri("https://www.youtube.com/watch?v=XVfOe5mFbAE"));
+ }
+
+ private void WebViewControl_ContainsFullScreenElementChanged(WebView sender, object args)
+ {
+ var applicationView = ApplicationView.GetForCurrentView();
+
+ if (sender.ContainsFullScreenElement)
+ {
+ applicationView.TryEnterFullScreenMode();
+ }
+ else
+ {
+ // It is harmless to exit full screen mode when not full screen.
+ applicationView.ExitFullScreenMode();
+ }
+
+ }
+
+ }
+}
diff --git a/Samples/XamlWebView/cs/XamlWebView.csproj b/Samples/XamlWebView/cs/XamlWebView.csproj
new file mode 100644
index 0000000000..e7e080d520
--- /dev/null
+++ b/Samples/XamlWebView/cs/XamlWebView.csproj
@@ -0,0 +1,241 @@
+
+
+
+
+ Debug
+ x86
+ {DC30CE66-DAEE-4CCF-BD02-8837FE918B6F}
+ AppContainerExe
+ Properties
+ SDKTemplate
+ XamlWebView
+ en-US
+ UAP
+ 10.0.10586.0
+ 10.0.10240.0
+ 14
+ true
+ 512
+ {A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
+
+
+ true
+ bin\ARM\Debug\
+ DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP
+ ;2008
+ full
+ ARM
+ false
+ prompt
+ true
+
+
+ bin\ARM\Release\
+ TRACE;NETFX_CORE;WINDOWS_UWP
+ true
+ ;2008
+ pdbonly
+ ARM
+ false
+ prompt
+ true
+ true
+
+
+ true
+ bin\x64\Debug\
+ DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP
+ ;2008
+ full
+ x64
+ false
+ prompt
+ true
+
+
+ bin\x64\Release\
+ TRACE;NETFX_CORE;WINDOWS_UWP
+ true
+ ;2008
+ pdbonly
+ x64
+ false
+ prompt
+ true
+ true
+
+
+ true
+ bin\x86\Debug\
+ DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP
+ ;2008
+ full
+ x86
+ false
+ prompt
+ true
+
+
+ bin\x86\Release\
+ TRACE;NETFX_CORE;WINDOWS_UWP
+ true
+ ;2008
+ pdbonly
+ x86
+ false
+ prompt
+ true
+ true
+
+
+
+
+
+
+ App.xaml.cs
+ App.xaml
+
+
+ MainPage.xaml.cs
+ MainPage.xaml
+
+
+ Properties\AssemblyInfo.cs
+
+
+
+ Scenario10_UnviewableContent.xaml
+
+
+ Scenario3_InvokeScript.xaml
+
+
+ Scenario2_NavToString.xaml
+
+
+ Scenario1_NavToUrl.xaml
+
+
+ Scenario5_NavToFiles.xaml
+
+
+ Scenario4_ScriptNotify.xaml
+
+
+ Scenario6_NavToStream.xaml
+
+
+ Scenario7_Share.xaml
+
+
+ Scenario8_CaptureBitmap.xaml
+
+
+ Scenario9_ContainsFullScreenElement.xaml
+
+
+
+
+ Designer
+
+
+
+
+ App.xaml
+ MSBuild:Compile
+ Designer
+
+
+ MainPage.xaml
+ MSBuild:Compile
+ Designer
+
+
+ Designer
+ MSBuild:Compile
+
+
+ MSBuild:Compile
+ Designer
+
+
+ Designer
+ MSBuild:Compile
+
+
+ MSBuild:Compile
+ Designer
+
+
+ Designer
+ MSBuild:Compile
+
+
+ MSBuild:Compile
+ Designer
+
+
+ Styles\Styles.xaml
+ MSBuild:Compile
+ Designer
+
+
+ Designer
+ MSBuild:Compile
+
+
+ Designer
+ MSBuild:Compile
+
+
+ Designer
+ MSBuild:Compile
+
+
+ Designer
+ MSBuild:Compile
+
+
+
+
+ Properties\Default.rd.xml
+
+
+ Assets\microsoft-sdk.png
+
+
+ Assets\smallTile-sdk.png
+
+
+ Assets\splash-sdk.png
+
+
+ Assets\squareTile-sdk.png
+
+
+ Assets\storeLogo-sdk.png
+
+
+ Assets\tile-sdk.png
+
+
+ Assets\windows-sdk.png
+
+
+
+
+
+
+
+
+ 14.0
+
+
+
+
\ No newline at end of file
diff --git a/Samples/XamlWebView/cs/XamlWebView.sln b/Samples/XamlWebView/cs/XamlWebView.sln
new file mode 100644
index 0000000000..c56eba3c37
--- /dev/null
+++ b/Samples/XamlWebView/cs/XamlWebView.sln
@@ -0,0 +1,40 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 14
+VisualStudioVersion = 14.0.23107.0
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XamlWebView", "XamlWebView.csproj", "{DC30CE66-DAEE-4CCF-BD02-8837FE918B6F}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|ARM = Debug|ARM
+ Debug|x64 = Debug|x64
+ Debug|x86 = Debug|x86
+ Release|ARM = Release|ARM
+ Release|x64 = Release|x64
+ Release|x86 = Release|x86
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {DC30CE66-DAEE-4CCF-BD02-8837FE918B6F}.Debug|ARM.ActiveCfg = Debug|ARM
+ {DC30CE66-DAEE-4CCF-BD02-8837FE918B6F}.Debug|ARM.Build.0 = Debug|ARM
+ {DC30CE66-DAEE-4CCF-BD02-8837FE918B6F}.Debug|ARM.Deploy.0 = Debug|ARM
+ {DC30CE66-DAEE-4CCF-BD02-8837FE918B6F}.Debug|x64.ActiveCfg = Debug|x64
+ {DC30CE66-DAEE-4CCF-BD02-8837FE918B6F}.Debug|x64.Build.0 = Debug|x64
+ {DC30CE66-DAEE-4CCF-BD02-8837FE918B6F}.Debug|x64.Deploy.0 = Debug|x64
+ {DC30CE66-DAEE-4CCF-BD02-8837FE918B6F}.Debug|x86.ActiveCfg = Debug|x86
+ {DC30CE66-DAEE-4CCF-BD02-8837FE918B6F}.Debug|x86.Build.0 = Debug|x86
+ {DC30CE66-DAEE-4CCF-BD02-8837FE918B6F}.Debug|x86.Deploy.0 = Debug|x86
+ {DC30CE66-DAEE-4CCF-BD02-8837FE918B6F}.Release|ARM.ActiveCfg = Release|ARM
+ {DC30CE66-DAEE-4CCF-BD02-8837FE918B6F}.Release|ARM.Build.0 = Release|ARM
+ {DC30CE66-DAEE-4CCF-BD02-8837FE918B6F}.Release|ARM.Deploy.0 = Release|ARM
+ {DC30CE66-DAEE-4CCF-BD02-8837FE918B6F}.Release|x64.ActiveCfg = Release|x64
+ {DC30CE66-DAEE-4CCF-BD02-8837FE918B6F}.Release|x64.Build.0 = Release|x64
+ {DC30CE66-DAEE-4CCF-BD02-8837FE918B6F}.Release|x64.Deploy.0 = Release|x64
+ {DC30CE66-DAEE-4CCF-BD02-8837FE918B6F}.Release|x86.ActiveCfg = Release|x86
+ {DC30CE66-DAEE-4CCF-BD02-8837FE918B6F}.Release|x86.Build.0 = Release|x86
+ {DC30CE66-DAEE-4CCF-BD02-8837FE918B6F}.Release|x86.Deploy.0 = Release|x86
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/Samples/XamlWebView/cs/html/html_example.html b/Samples/XamlWebView/cs/html/html_example.html
new file mode 100644
index 0000000000..f9b41f511a
--- /dev/null
+++ b/Samples/XamlWebView/cs/html/html_example.html
@@ -0,0 +1,9 @@
+
+
+ Example HTML document
+
+ Hi!
+ This is a very simple HTML page.
+ This content will be show in the WebView control when you click the button.
+
+
diff --git a/Samples/XamlWebView/cs/html/html_example2.html b/Samples/XamlWebView/cs/html/html_example2.html
new file mode 100644
index 0000000000..c1558d9d11
--- /dev/null
+++ b/Samples/XamlWebView/cs/html/html_example2.html
@@ -0,0 +1,16 @@
+
+
+
+ Example HTML document
+
+
+
+ This is a very simple HTML page.
+ According to the browser DOM, this content has been loaded from .
+
+
+
diff --git a/Samples/XamlWebView/cs/html/scriptNotify_example.html b/Samples/XamlWebView/cs/html/scriptNotify_example.html
new file mode 100644
index 0000000000..0e619f0654
--- /dev/null
+++ b/Samples/XamlWebView/cs/html/scriptNotify_example.html
@@ -0,0 +1,9 @@
+
+
+
+ This is a simple test page for window.external.notify().
+
+ Call window.external.notify
+
+
+
diff --git a/Samples/XamlWebView/cs/html/script_example.html b/Samples/XamlWebView/cs/html/script_example.html
new file mode 100644
index 0000000000..e11f43948a
--- /dev/null
+++ b/Samples/XamlWebView/cs/html/script_example.html
@@ -0,0 +1,14 @@
+
+
+
+
+
+ Hello
+
+
diff --git a/Samples/XamlWebView/cs/html/stream_example.html b/Samples/XamlWebView/cs/html/stream_example.html
new file mode 100644
index 0000000000..d4fe8b1b6a
--- /dev/null
+++ b/Samples/XamlWebView/cs/html/stream_example.html
@@ -0,0 +1,14 @@
+
+
+
+ Streamed content
+
+
+
+
+ This page was streamed by %.
+
+
+
+
+
diff --git a/Samples/XamlWebView/cs/project.json b/Samples/XamlWebView/cs/project.json
new file mode 100644
index 0000000000..c594939270
--- /dev/null
+++ b/Samples/XamlWebView/cs/project.json
@@ -0,0 +1,16 @@
+{
+ "dependencies": {
+ "Microsoft.NETCore.UniversalWindowsPlatform": "5.0.0"
+ },
+ "frameworks": {
+ "uap10.0": {}
+ },
+ "runtimes": {
+ "win10-arm": {},
+ "win10-arm-aot": {},
+ "win10-x86": {},
+ "win10-x86-aot": {},
+ "win10-x64": {},
+ "win10-x64-aot": {}
+ }
+}
\ No newline at end of file
diff --git a/Samples/XmlDocument/cs/XmlDocument.csproj b/Samples/XmlDocument/cs/XmlDocument.csproj
index 0df0575d45..df94bbcc88 100644
--- a/Samples/XmlDocument/cs/XmlDocument.csproj
+++ b/Samples/XmlDocument/cs/XmlDocument.csproj
@@ -11,7 +11,7 @@
Xml
en-US
UAP
- 10.0.10240.0
+ 10.0.10586.0
10.0.10240.0
14
true
diff --git a/Samples/XmlDocument/js/XmlDocument.jsproj b/Samples/XmlDocument/js/XmlDocument.jsproj
index c7ea39f882..0d0f1b386a 100644
--- a/Samples/XmlDocument/js/XmlDocument.jsproj
+++ b/Samples/XmlDocument/js/XmlDocument.jsproj
@@ -45,7 +45,7 @@
UAP
- 10.0.10240.0
+ 10.0.10586.0
10.0.10240.0
$(VersionNumberMajor).$(VersionNumberMinor)
en-US
diff --git a/Samples/XmlLite/cpp/XmlLite.vcxproj b/Samples/XmlLite/cpp/XmlLite.vcxproj
index 192da5f75a..4c1c346e9f 100644
--- a/Samples/XmlLite/cpp/XmlLite.vcxproj
+++ b/Samples/XmlLite/cpp/XmlLite.vcxproj
@@ -8,7 +8,7 @@
true
Windows Store
10.0
- 10.0.10240.0
+ 10.0.10586.0
10.0.10240.0
true