diff --git a/Directory.Build.props b/Directory.Build.props
index fe9cbb14b..d43a2ceff 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -14,8 +14,8 @@
$(MSBuildProjectName.Contains('Test'))
$(MSBuildProjectName.Contains('Uwp'))
$(MSBuildProjectName.Contains('Sample'))
- 18362
- 16299
+ 19041
+ 17763
$(MSBuildThisFileDirectory)bin\nupkg
diff --git a/Directory.Build.targets b/Directory.Build.targets
index 9898f0281..111afac2e 100644
--- a/Directory.Build.targets
+++ b/Directory.Build.targets
@@ -1,6 +1,6 @@
-
+
10.0.$(DefaultTargetPlatformVersion).0
@@ -15,9 +15,6 @@
Windows Desktop Extensions for the UWP
-
- Windows Mobile Extensions for the UWP
-
diff --git a/GazeInputTest/GazeInputTest.csproj b/GazeInputTest/GazeInputTest.csproj
index 7735a9bb1..9c699a3f5 100644
--- a/GazeInputTest/GazeInputTest.csproj
+++ b/GazeInputTest/GazeInputTest.csproj
@@ -11,7 +11,7 @@
GazeInputTest
en-US
UAP
- 10.0.18362.0
+ 10.0.19041.0
10.0.17134.0
14
512
diff --git a/Microsoft.Toolkit.Services/Microsoft.Toolkit.Services.csproj b/Microsoft.Toolkit.Services/Microsoft.Toolkit.Services.csproj
index 446db56c7..e1f1a13d6 100644
--- a/Microsoft.Toolkit.Services/Microsoft.Toolkit.Services.csproj
+++ b/Microsoft.Toolkit.Services/Microsoft.Toolkit.Services.csproj
@@ -1,7 +1,7 @@
- uap10.0.16299;netstandard2.0;NET462
+ uap10.0.17763;netstandard2.0;NET462
Windows Community Toolkit .NET Standard Services
This .NET standard library enables access to different data sources such as Microsoft Graph, OneDrive, Twitter, Microsoft Translator, and LinkedIn. It is part of the Windows Community Toolkit.
@@ -12,7 +12,7 @@
false
-
+
$(DefineConstants);WINRT
@@ -31,7 +31,7 @@
-
+
@@ -47,7 +47,7 @@
-
+
diff --git a/Microsoft.Toolkit.Uwp.Connectivity/BluetoothLEHelper/BluetoothLEHelper.cs b/Microsoft.Toolkit.Uwp.Connectivity/BluetoothLEHelper/BluetoothLEHelper.cs
index 97e20f13a..c83718ec2 100644
--- a/Microsoft.Toolkit.Uwp.Connectivity/BluetoothLEHelper/BluetoothLEHelper.cs
+++ b/Microsoft.Toolkit.Uwp.Connectivity/BluetoothLEHelper/BluetoothLEHelper.cs
@@ -12,7 +12,6 @@ using Microsoft.Toolkit.Uwp.Helpers;
using Windows.Devices.Bluetooth;
using Windows.Devices.Bluetooth.Advertisement;
using Windows.Devices.Enumeration;
-using Windows.Foundation.Metadata;
using Windows.System;
namespace Microsoft.Toolkit.Uwp.Connectivity
@@ -27,11 +26,6 @@ namespace Microsoft.Toolkit.Uwp.Connectivity
///
private const string BluetoothLeDeviceWatcherAqs = "(System.Devices.Aep.ProtocolId:=\"{bb7bb05e-5972-42b5-94fc-76eaa7084d49}\")";
- ///
- /// Gets a value indicating whether the Bluetooth LE Helper is supported
- ///
- private static bool? _isBluetoothLESupported = null;
-
///
/// We need to cache all DeviceInformation objects we get as they may
/// get updated in the future. The update may make them eligible to be put on
@@ -82,12 +76,6 @@ namespace Microsoft.Toolkit.Uwp.Connectivity
///
public static BluetoothLEHelper Context { get; } = new BluetoothLEHelper();
- ///
- /// Gets a value indicating whether the Bluetooth LE Helper is supported.
- ///
- public static bool IsBluetoothLESupported => (bool)(_isBluetoothLESupported ??
- (_isBluetoothLESupported = ApiInformation.IsApiContractPresent("Windows.Foundation.UniversalApiContract", 4)));
-
///
/// Gets the list of available bluetooth devices
///
diff --git a/Microsoft.Toolkit.Uwp.Connectivity/Microsoft.Toolkit.Uwp.Connectivity.csproj b/Microsoft.Toolkit.Uwp.Connectivity/Microsoft.Toolkit.Uwp.Connectivity.csproj
index e1a7784b7..f1b211c25 100644
--- a/Microsoft.Toolkit.Uwp.Connectivity/Microsoft.Toolkit.Uwp.Connectivity.csproj
+++ b/Microsoft.Toolkit.Uwp.Connectivity/Microsoft.Toolkit.Uwp.Connectivity.csproj
@@ -1,7 +1,7 @@
- uap10.0.16299
+ uap10.0.17763
Windows Community Toolkit Devices
This library enables easier consumption of connectivity Devices/Peripherals and handle its connection to Windows devices. It contains BluetoothLE and Network connectivity helpers.
UWP Toolkit Windows Devices Bluetooth BluetoothLE BLE Networking
diff --git a/Microsoft.Toolkit.Uwp.DeveloperTools/Microsoft.Toolkit.Uwp.DeveloperTools.csproj b/Microsoft.Toolkit.Uwp.DeveloperTools/Microsoft.Toolkit.Uwp.DeveloperTools.csproj
index ff464b80d..930d09f5a 100644
--- a/Microsoft.Toolkit.Uwp.DeveloperTools/Microsoft.Toolkit.Uwp.DeveloperTools.csproj
+++ b/Microsoft.Toolkit.Uwp.DeveloperTools/Microsoft.Toolkit.Uwp.DeveloperTools.csproj
@@ -1,7 +1,7 @@
- uap10.0.16299
+ uap10.0.17763
Windows Community Toolkit Developer Tools
This library provides XAML user controls and services to help developers build their app. It is part of the Windows Community Toolkit.
diff --git a/Microsoft.Toolkit.Uwp.Input.GazeInteraction/Microsoft.Toolkit.UWP.Input.GazeInteraction.vcxproj b/Microsoft.Toolkit.Uwp.Input.GazeInteraction/Microsoft.Toolkit.UWP.Input.GazeInteraction.vcxproj
index 741138670..0c2b42caf 100644
--- a/Microsoft.Toolkit.Uwp.Input.GazeInteraction/Microsoft.Toolkit.UWP.Input.GazeInteraction.vcxproj
+++ b/Microsoft.Toolkit.Uwp.Input.GazeInteraction/Microsoft.Toolkit.UWP.Input.GazeInteraction.vcxproj
@@ -42,7 +42,7 @@
14.0
true
Windows Store
- 10.0.17763.0
+ 10.0.19041.0
10.0.17134.0
10.0
Microsoft.Toolkit.Uwp.Input.GazeInteraction
diff --git a/Microsoft.Toolkit.Uwp.Notifications.JavaScript/Microsoft.Toolkit.Uwp.Notifications.JavaScript.csproj b/Microsoft.Toolkit.Uwp.Notifications.JavaScript/Microsoft.Toolkit.Uwp.Notifications.JavaScript.csproj
deleted file mode 100644
index fcfe464a6..000000000
--- a/Microsoft.Toolkit.Uwp.Notifications.JavaScript/Microsoft.Toolkit.Uwp.Notifications.JavaScript.csproj
+++ /dev/null
@@ -1,24 +0,0 @@
-
-
-
- uap10.0
- false
- Windows Community Toolkit Notifications for JavaScript
-
- This project is used for packaging the WinMD to work for WinJS projects.
-
- Generate tile, toast, and badge notifications for Windows 10 via code, with the help of IntelliSense, instead of directly using XML.
- Supports adaptive tiles and adaptive/interactive toasts for Windows 10. It is part of the Windows Community Toolkit.
- Supports C# and C++ UWP project types (see Microsoft.Toolkit.Uwp.Notifications).
- Also works with C# portable class libraries and non-UWP C# projects like server projects.
-
- notifications win10 windows-10 tile tiles toast toasts badge xml uwp javascript
- true
-
-
-
-
-
-
-
-
diff --git a/Microsoft.Toolkit.Uwp.Notifications.JavaScript/Microsoft.Toolkit.Uwp.Notifications.JavaScript.targets b/Microsoft.Toolkit.Uwp.Notifications.JavaScript/Microsoft.Toolkit.Uwp.Notifications.JavaScript.targets
deleted file mode 100644
index 8a78f301f..000000000
--- a/Microsoft.Toolkit.Uwp.Notifications.JavaScript/Microsoft.Toolkit.Uwp.Notifications.JavaScript.targets
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
-
-
- $(MSBuildThisFileDirectory)..\..\lib\Windows\Microsoft.Toolkit.Uwp.Notifications.winmd
- true
-
-
-
-
diff --git a/Microsoft.Toolkit.Uwp.Notifications/Microsoft.Toolkit.Uwp.Notifications.csproj b/Microsoft.Toolkit.Uwp.Notifications/Microsoft.Toolkit.Uwp.Notifications.csproj
index 1c08ba0f6..5d5f1a638 100644
--- a/Microsoft.Toolkit.Uwp.Notifications/Microsoft.Toolkit.Uwp.Notifications.csproj
+++ b/Microsoft.Toolkit.Uwp.Notifications/Microsoft.Toolkit.Uwp.Notifications.csproj
@@ -7,7 +7,7 @@
Generate tile, toast, and badge notifications for Windows 10 via code, with the help of IntelliSense.
Adds Support for adaptive tiles and adaptive/interactive toasts for Windows 10. It is part of the Windows Community Toolkit.
- Supports C# and C++ UWP project types (see Microsoft.Toolkit.Uwp.Notifications.JavaScript for the JS version).
+ Supports C# and C++ UWP project types.
Also works with C# portable class libraries and non-UWP C# projects like server projects.
This project contains outputs for netstandard1.4, uap10.0 and native for WinRT.
@@ -65,7 +65,7 @@
native
UAP,Version=v10.0
uap10.0
- 10.0.18362.0
+ 10.0.19041.0
10.0.10240.0
$(DefineConstants);NETFX_CORE;WINDOWS_UWP;WINRT
false
diff --git a/Microsoft.Toolkit.Uwp.Notifications/readme.md b/Microsoft.Toolkit.Uwp.Notifications/readme.md
index c7ee380f5..bfc7d22d1 100644
--- a/Microsoft.Toolkit.Uwp.Notifications/readme.md
+++ b/Microsoft.Toolkit.Uwp.Notifications/readme.md
@@ -6,22 +6,16 @@ Any code for generating notifications should be written in the Microsoft.Toolkit
If there's UWP-specific code, use the appropriate `#ifdef`, `WINDOWS_UWP` or `WINRT`.
## What are all the projects for?
-There's two notification projects...
- - Microsoft.Toolkit.Uwp.Notifications
- - Microsoft.Toolkit.Uwp.Notifications.JavaScript
+All the code is contained on the Microsoft.Toolkit.Uwp.Notifications project.
-The first project is where all the code is contained.
-
-The JavaScript project is just for packaging the `WinMD` to work for WinJS projects.
+It outputs `netstandard1.4`, `uap10.0`, `native` for WinRT, and netcoreapp for .Net Core projects. The UWP library is only for C#, while the WinRT library is a Windows Runtime Component for C++.
-The first project contains outputs for `netstandard1.4`, `uap10.0` and a `native` for WinRT. The UWP library is only for C#, while the WinRT library is a Windows Runtime Component for JavaScript and C++.
-
-
-| C# | JavaScript/C++ |
+| C# | C++ |
| ---------------- | ------------------- |
| NET Standard 1.4 | UWP WinRT Component |
| UWP C# DLL | |
+| .Net Core DLL | |
diff --git a/Microsoft.Toolkit.Uwp.SampleApp/Microsoft.Toolkit.Uwp.SampleApp.csproj b/Microsoft.Toolkit.Uwp.SampleApp/Microsoft.Toolkit.Uwp.SampleApp.csproj
index 2933c1f21..07dde256e 100644
--- a/Microsoft.Toolkit.Uwp.SampleApp/Microsoft.Toolkit.Uwp.SampleApp.csproj
+++ b/Microsoft.Toolkit.Uwp.SampleApp/Microsoft.Toolkit.Uwp.SampleApp.csproj
@@ -11,8 +11,8 @@
Microsoft.Toolkit.Uwp.SampleApp
en-US
UAP
- 10.0.18362.0
- 10.0.17134.0
+ 10.0.19041.0
+ 10.0.17763.0
14
512
{A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
@@ -412,10 +412,7 @@
-
-
-
diff --git a/Microsoft.Toolkit.Uwp.SampleApp/Models/Sample.cs b/Microsoft.Toolkit.Uwp.SampleApp/Models/Sample.cs
index d3cffd703..30a4f70d5 100644
--- a/Microsoft.Toolkit.Uwp.SampleApp/Models/Sample.cs
+++ b/Microsoft.Toolkit.Uwp.SampleApp/Models/Sample.cs
@@ -141,8 +141,6 @@ namespace Microsoft.Toolkit.Uwp.SampleApp
public string CodeFile { get; set; }
- public string JavaScriptCodeFile { get; set; }
-
public string XamlCodeFile { get; set; }
public bool DisableXamlEditorRendering { get; set; }
@@ -163,8 +161,6 @@ namespace Microsoft.Toolkit.Uwp.SampleApp
public bool HasCSharpCode => !string.IsNullOrEmpty(CodeFile);
- public bool HasJavaScriptCode => !string.IsNullOrEmpty(JavaScriptCodeFile);
-
public bool HasDocumentation => !string.IsNullOrEmpty(DocumentationUrl);
public bool IsSupported
@@ -191,17 +187,6 @@ namespace Microsoft.Toolkit.Uwp.SampleApp
}
}
- public async Task GetJavaScriptSourceAsync()
- {
- using (var codeStream = await StreamHelper.GetPackagedFileStreamAsync(JavaScriptCodeFile.StartsWith('/') ? JavaScriptCodeFile : $"SamplePages/{Name}/{JavaScriptCodeFile}"))
- {
- using (var streamReader = new StreamReader(codeStream.AsStream()))
- {
- return await streamReader.ReadToEndAsync();
- }
- }
- }
-
#pragma warning disable SA1009 // Doesn't like ValueTuples.
public async Task<(string contents, string path)> GetDocumentationAsync()
#pragma warning restore SA1009 // Doesn't like ValueTuples.
diff --git a/Microsoft.Toolkit.Uwp.SampleApp/Pages/SampleController.xaml b/Microsoft.Toolkit.Uwp.SampleApp/Pages/SampleController.xaml
index 99d1f4797..299c47875 100644
--- a/Microsoft.Toolkit.Uwp.SampleApp/Pages/SampleController.xaml
+++ b/Microsoft.Toolkit.Uwp.SampleApp/Pages/SampleController.xaml
@@ -195,12 +195,6 @@
IsFocusEngagementEnabled="False" />
-
-
-
-
diff --git a/Microsoft.Toolkit.Uwp.SampleApp/Pages/SampleController.xaml.cs b/Microsoft.Toolkit.Uwp.SampleApp/Pages/SampleController.xaml.cs
index 289912e9b..29e0f2540 100644
--- a/Microsoft.Toolkit.Uwp.SampleApp/Pages/SampleController.xaml.cs
+++ b/Microsoft.Toolkit.Uwp.SampleApp/Pages/SampleController.xaml.cs
@@ -271,14 +271,6 @@ namespace Microsoft.Toolkit.Uwp.SampleApp
InfoAreaPivot.Items.Add(CSharpPivotItem);
}
- if (CurrentSample.HasJavaScriptCode)
- {
- var code = await CurrentSample.GetJavaScriptSourceAsync();
-
- JavaScriptCodeRenderer.SetCode(code, "js");
- InfoAreaPivot.Items.Add(JavaScriptPivotItem);
- }
-
if (CurrentSample.HasDocumentation)
{
#pragma warning disable SA1008 // Opening parenthesis must be spaced correctly
@@ -421,14 +413,6 @@ namespace Microsoft.Toolkit.Uwp.SampleApp
return;
}
-
- if (CurrentSample.HasJavaScriptCode && InfoAreaPivot.SelectedItem == JavaScriptPivotItem)
- {
- var code = await CurrentSample.GetJavaScriptSourceAsync();
- JavaScriptCodeRenderer.SetCode(code, "js");
-
- return;
- }
}
private async void XamlCodeEditor_UpdateRequested(object sender, EventArgs e)
diff --git a/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/BluetoothLEHelper/BluetoothLEHelperCode.bind b/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/BluetoothLEHelper/BluetoothLEHelperCode.bind
index 378242324..4cab3096b 100644
--- a/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/BluetoothLEHelper/BluetoothLEHelperCode.bind
+++ b/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/BluetoothLEHelper/BluetoothLEHelperCode.bind
@@ -1,22 +1,18 @@
// Get a local copy of the context for easier reading
BluetoothLEHelper bluetoothLEHelper = BluetoothLEHelper.Context;
-// check if BluetoothLE APIs are available
-if (BluetoothLEHelper.IsBluetoothLESupported)
-{
- // Start the Enumeration
- bluetoothLEHelper.StartEnumeration();
+// Start the Enumeration
+bluetoothLEHelper.StartEnumeration();
- // At this point the user needs to select a device they want to connect to. This can be done by
- // creating a ListView and binding the bluetoothLEHelper collection to it. Once a device is found,
- // the Connect() method can be called to connect to the device and start interacting with its services
+// At this point the user needs to select a device they want to connect to. This can be done by
+// creating a ListView and binding the bluetoothLEHelper collection to it. Once a device is found,
+// the Connect() method can be called to connect to the device and start interacting with its services
- // Connect to a device if your choice
- ObservableBluetoothLEDevice device = bluetoothLEHelper.BluetoothLeDevices[];
- await device.ConnectAsync();
+// Connect to a device if your choice
+ObservableBluetoothLEDevice device = bluetoothLEHelper.BluetoothLeDevices[];
+await device.ConnectAsync();
- // At this point the device is connected and the Services property is populated.
+// At this point the device is connected and the Services property is populated.
- // See all the services
- var services = device.Services;
-}
+// See all the services
+var services = device.Services;
diff --git a/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/BluetoothLEHelper/BluetoothLEHelperPage.xaml b/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/BluetoothLEHelper/BluetoothLEHelperPage.xaml
index 4337bbf0c..c2e0aedcf 100644
--- a/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/BluetoothLEHelper/BluetoothLEHelperPage.xaml
+++ b/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/BluetoothLEHelper/BluetoothLEHelperPage.xaml
@@ -6,89 +6,76 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/BluetoothLEHelper/BluetoothLEHelperPage.xaml.cs b/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/BluetoothLEHelper/BluetoothLEHelperPage.xaml.cs
index 5ce8c5030..7ea42e374 100644
--- a/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/BluetoothLEHelper/BluetoothLEHelperPage.xaml.cs
+++ b/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/BluetoothLEHelper/BluetoothLEHelperPage.xaml.cs
@@ -20,19 +20,6 @@ namespace Microsoft.Toolkit.Uwp.SampleApp.SamplePages
{
this.InitializeComponent();
bluetoothLEHelper.EnumerationCompleted += BluetoothLEHelper_EnumerationCompleted;
- Load();
- }
-
- private void Load()
- {
- if (BluetoothLEHelper.IsBluetoothLESupported)
- {
- MainContent.Visibility = Visibility.Visible;
- }
- else
- {
- NotAvailableMessage.Visibility = Visibility.Visible;
- }
}
private async void BluetoothLEHelper_EnumerationCompleted(object sender, EventArgs e)
@@ -46,11 +33,6 @@ namespace Microsoft.Toolkit.Uwp.SampleApp.SamplePages
private void Enumeration_Click(object sender, RoutedEventArgs e)
{
- if (!BluetoothLEHelper.IsBluetoothLESupported)
- {
- return;
- }
-
if (!bluetoothLEHelper.IsEnumerating)
{
bluetoothLEHelper.StartEnumeration();
diff --git a/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/DropShadowPanel/DropShadowPanelPage.xaml b/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/DropShadowPanel/DropShadowPanelPage.xaml
index 94d793b17..bc49604e9 100644
--- a/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/DropShadowPanel/DropShadowPanelPage.xaml
+++ b/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/DropShadowPanel/DropShadowPanelPage.xaml
@@ -22,20 +22,5 @@
-
-
-
-
-
-
-
-
-
+
\ No newline at end of file
diff --git a/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/DropShadowPanel/DropShadowPanelPage.xaml.cs b/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/DropShadowPanel/DropShadowPanelPage.xaml.cs
index 8c8c9a67f..d5e37716d 100644
--- a/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/DropShadowPanel/DropShadowPanelPage.xaml.cs
+++ b/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/DropShadowPanel/DropShadowPanelPage.xaml.cs
@@ -2,11 +2,7 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-using Microsoft.Toolkit.Uwp.SampleApp.Models;
-using Microsoft.Toolkit.Uwp.UI.Controls;
-using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
-using Windows.UI.Xaml.Navigation;
namespace Microsoft.Toolkit.Uwp.SampleApp.SamplePages
{
@@ -21,15 +17,6 @@ namespace Microsoft.Toolkit.Uwp.SampleApp.SamplePages
public DropShadowPanelPage()
{
InitializeComponent();
- Load();
- }
-
- private void Load()
- {
- if (!DropShadowPanel.IsSupported)
- {
- WarningText.Visibility = Visibility.Visible;
- }
}
}
}
diff --git a/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/ImageEx/ImageExPage.xaml.cs b/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/ImageEx/ImageExPage.xaml.cs
index b783aa37a..bb2dd7350 100644
--- a/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/ImageEx/ImageExPage.xaml.cs
+++ b/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/ImageEx/ImageExPage.xaml.cs
@@ -69,25 +69,22 @@ namespace Microsoft.Toolkit.Uwp.SampleApp.SamplePages
AddImage(false, false, true);
});
- if (ImageExBase.IsLazyLoadingSupported)
+ SampleController.Current.RegisterNewCommand("Lazy loading sample (17763 or higher supported)", (sender, args) =>
{
- SampleController.Current.RegisterNewCommand("Lazy loading sample (17763 or higher supported)", (sender, args) =>
+ var imageExLazyLoadingControl = new ImageExLazyLoadingControl();
+ imageExLazyLoadingControl.CloseButtonClick += (s, a) =>
{
- var imageExLazyLoadingControl = new ImageExLazyLoadingControl();
- imageExLazyLoadingControl.CloseButtonClick += (s, a) =>
- {
- if (lazyLoadingControlHost != null)
- {
- lazyLoadingControlHost.Child = null;
- }
- };
-
if (lazyLoadingControlHost != null)
{
- lazyLoadingControlHost.Child = imageExLazyLoadingControl;
+ lazyLoadingControlHost.Child = null;
}
- });
- }
+ };
+
+ if (lazyLoadingControlHost != null)
+ {
+ lazyLoadingControlHost.Child = imageExLazyLoadingControl;
+ }
+ });
SampleController.Current.RegisterNewCommand("Clear image cache", async (sender, args) =>
{
diff --git a/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/Light/LightBehaviorPage.xaml b/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/Light/LightBehaviorPage.xaml
index 8eba95bed..276a31663 100644
--- a/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/Light/LightBehaviorPage.xaml
+++ b/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/Light/LightBehaviorPage.xaml
@@ -9,14 +9,6 @@
mc:Ignorable="d">
-
diff --git a/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/Light/LightBehaviorPage.xaml.cs b/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/Light/LightBehaviorPage.xaml.cs
index fd59ec7d5..a731da773 100644
--- a/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/Light/LightBehaviorPage.xaml.cs
+++ b/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/Light/LightBehaviorPage.xaml.cs
@@ -27,11 +27,6 @@ namespace Microsoft.Toolkit.Uwp.SampleApp.SamplePages
{
this.InitializeComponent();
- if (!AnimationExtensions.IsLightingSupported)
- {
- WarningText.Visibility = Visibility.Visible;
- }
-
SampleController.Current.RegisterNewCommand("Apply", (s, e) =>
{
_lightBehavior?.StartAnimation();
diff --git a/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/LiveTile/LiveTileCodeJavaScript.bind b/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/LiveTile/LiveTileCodeJavaScript.bind
deleted file mode 100644
index 464073359..000000000
--- a/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/LiveTile/LiveTileCodeJavaScript.bind
+++ /dev/null
@@ -1,138 +0,0 @@
-var square44x44Logo = new Windows.Foundation.Uri("ms-appx:///Assets/Square44x44Logo.png");
-var square150x150Logo = new Windows.Foundation.Uri("ms-appx:///Assets/Square150x150Logo.png");
-var wide310x150Logo = new Windows.Foundation.Uri("ms-appx:///Assets/Wide310x150Logo.png");
-var square310x310Logo = new Windows.Foundation.Uri("ms-appx:///Assets/Square310x310Logo.png");
-
-var generateTileBindingMedium = function (username, avatarLogoSource) {
- var tileBinding = new Microsoft.Toolkit.Uwp.Notifications.TileBinding();
-
- tileBinding.content = new Microsoft.Toolkit.Uwp.Notifications.TileBindingContentAdaptive();
-
- tileBinding.content.peekImage = new Microsoft.Toolkit.Uwp.Notifications.TilePeekImage();
- tileBinding.content.peekImage.source = avatarLogoSource;
- tileBinding.content.peekImage.hintCrop = Microsoft.Toolkit.Uwp.Notifications.TilePeekImageCrop.Circle;
-
- tileBinding.content.textStacking = Microsoft.Toolkit.Uwp.Notifications.TileTextStacking.center;
-
- var adaptativeText1 = new Microsoft.Toolkit.Uwp.Notifications.AdaptiveText();
- adaptativeText1.text = "Hi,";
- adaptativeText1.hintAlign = Microsoft.Toolkit.Uwp.Notifications.AdaptiveTextAlign.center;
- adaptativeText1.hintStyle = Microsoft.Toolkit.Uwp.Notifications.AdaptiveTextStyle.base;
-
- var adaptativeText2 = new Microsoft.Toolkit.Uwp.Notifications.AdaptiveText();
- adaptativeText2.text = username;
- adaptativeText2.hintAlign = Microsoft.Toolkit.Uwp.Notifications.AdaptiveTextAlign.center;
- adaptativeText2.hintStyle = Microsoft.Toolkit.Uwp.Notifications.AdaptiveTextStyle.captionSubtle;
-
- tileBinding.content.children.push(adaptativeText1);
- tileBinding.content.children.push(adaptativeText2);
-
- return tileBinding;
-};
-
-var generateTileBindingWide = function (username, avatarLogoSource) {
- var tileBinding = new Microsoft.Toolkit.Uwp.Notifications.TileBinding();
-
- tileBinding.content = new Microsoft.Toolkit.Uwp.Notifications.TileBindingContentAdaptive();
-
- var group = new Microsoft.Toolkit.Uwp.Notifications.AdaptiveGroup();
-
- var adaptativeSubgroup1 = new Microsoft.Toolkit.Uwp.Notifications.AdaptiveSubgroup();
- adaptativeSubgroup1.hintWeight = 33;
- var adaptativeImage = new Microsoft.Toolkit.Uwp.Notifications.AdaptiveImage();
- adaptativeImage.source = avatarLogoSource;
- adaptativeImage.hintCrop = Microsoft.Toolkit.Uwp.Notifications.AdaptiveImageCrop.circle;
- adaptativeSubgroup1.children.push(adaptativeImage);
-
- var adaptativeSubgroup2 = new Microsoft.Toolkit.Uwp.Notifications.AdaptiveSubgroup();
- adaptativeSubgroup2.hintTextStacking = Microsoft.Toolkit.Uwp.Notifications.AdaptiveSubgroupTextStacking.center;
- var adaptativeText1 = new Microsoft.Toolkit.Uwp.Notifications.AdaptiveText();
- adaptativeText1.text = "Hi,";
- adaptativeText1.hintStyle = Microsoft.Toolkit.Uwp.Notifications.AdaptiveTextStyle.title;
- var adaptativeText2 = new Microsoft.Toolkit.Uwp.Notifications.AdaptiveText();
- adaptativeText2.text = username;
- adaptativeText2.hintStyle = Microsoft.Toolkit.Uwp.Notifications.AdaptiveTextStyle.subtitleSubtle;
- adaptativeSubgroup2.children.push(adaptativeText1);
- adaptativeSubgroup2.children.push(adaptativeText2);
-
- group.children.push(adaptativeSubgroup1);
- group.children.push(adaptativeSubgroup2);
-
- tileBinding.content.children.push(group);
-
- return tileBinding;
-};
-
-var generateTileBindingLarge = function (username, avatarLogoSource) {
- var tileBinding = new Microsoft.Toolkit.Uwp.Notifications.TileBinding();
-
- tileBinding.content = new Microsoft.Toolkit.Uwp.Notifications.TileBindingContentAdaptive();
- tileBinding.content.textStacking = Microsoft.Toolkit.Uwp.Notifications.TileTextStacking.center;
-
- var group = new Microsoft.Toolkit.Uwp.Notifications.AdaptiveGroup();
-
- var adaptativeSubgroup1 = new Microsoft.Toolkit.Uwp.Notifications.AdaptiveSubgroup();
- adaptativeSubgroup1.hintWeight = 1;
-
- // we surround the image by two subgroups so that it doesn't take the full width
- var adaptativeSubgroup2 = new Microsoft.Toolkit.Uwp.Notifications.AdaptiveSubgroup();
- adaptativeSubgroup2.hintWeight = 2;
- var adaptativeImage = new Microsoft.Toolkit.Uwp.Notifications.AdaptiveImage();
- adaptativeImage.source = avatarLogoSource;
- adaptativeImage.hintCrop = Microsoft.Toolkit.Uwp.Notifications.AdaptiveImageCrop.circle;
- adaptativeSubgroup2.children.push(adaptativeImage);
-
- var adaptativeSubgroup3 = new Microsoft.Toolkit.Uwp.Notifications.AdaptiveSubgroup();
- adaptativeSubgroup3.hintWeight = 1;
-
- group.children.push(adaptativeSubgroup1);
- group.children.push(adaptativeSubgroup2);
- group.children.push(adaptativeSubgroup3);
-
- var adaptativeText1 = new Microsoft.Toolkit.Uwp.Notifications.AdaptiveText();
- adaptativeText1.text = "Hi,";
- adaptativeText1.hintAlign = Microsoft.Toolkit.Uwp.Notifications.AdaptiveTextAlign.center;
- adaptativeText1.hintStyle = Microsoft.Toolkit.Uwp.Notifications.AdaptiveTextStyle.title;
-
- var adaptativeText2 = new Microsoft.Toolkit.Uwp.Notifications.AdaptiveText();
- adaptativeText2.text = username;
- adaptativeText2.hintAlign = Microsoft.Toolkit.Uwp.Notifications.AdaptiveTextAlign.center;
- adaptativeText2.hintStyle = Microsoft.Toolkit.Uwp.Notifications.AdaptiveTextStyle.subtitleSubtle;
-
- tileBinding.content.children.push(group);
- tileBinding.content.children.push(adaptativeText1);
- tileBinding.content.children.push(adaptativeText2);
-
- return tileBinding;
-};
-
-var generateTileContent = function (username, avatarLogoSource) {
- var tileContent = new Microsoft.Toolkit.Uwp.Notifications.TileContent();
- tileContent.visual = new Microsoft.Toolkit.Uwp.Notifications.TileVisual();
- tileContent.visual.tileMedium = generateTileBindingMedium(username, avatarLogoSource);
- tileContent.visual.tileWide = generateTileBindingWide(username, avatarLogoSource);
- tileContent.visual.tileLarge = generateTileBindingLarge(username, avatarLogoSource);
-
- return tileContent;
-};
-
-var pinTile = function () {
- var tile = new Windows.UI.StartScreen.SecondaryTile(new Date().getTime());
-
- tile.displayName = "Xbox";
- tile.arguments = "args";
- tile.visualElements.square150x150Logo = square150x150Logo;
- tile.visualElements.wide310x150Logo = wide310x150Logo;
- tile.visualElements.square310x310Logo = square310x310Logo;
- tile.visualElements.showNameOnSquare150x150Logo = true;
- tile.visualElements.showNameOnSquare310x310Logo = true;
- tile.visualElements.showNameOnWide310x150Logo = true;
-
- tile.requestCreateAsync()
- .then(function () {
- // generate the tile notification content and update the tile
- var content = generateTileContent("MasterHip", "Assets/Photos/Owl.jpg");
- var tileNotification = new Windows.UI.Notifications.TileNotification(content.getXml());
- Windows.UI.Notifications.TileUpdateManager.createTileUpdaterForSecondaryTile(tile.TileId).update(tileNotification);
- });
-};
\ No newline at end of file
diff --git a/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/TextToolbar/TextToolbar.bind b/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/TextToolbar/TextToolbar.bind
index 826d35fea..711cc6114 100644
--- a/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/TextToolbar/TextToolbar.bind
+++ b/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/TextToolbar/TextToolbar.bind
@@ -8,7 +8,6 @@
xmlns:textToolbarSamples="using:Microsoft.Toolkit.Uwp.SampleApp.SamplePages.TextToolbarSamples"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:contract7Present="http://schemas.microsoft.com/winfx/2006/xaml/presentation?IsApiContractPresent(Windows.Foundation.UniversalApiContract,7)"
mc:Ignorable="d">
@@ -58,7 +57,7 @@
BorderThickness="1"
BorderBrush="{ThemeResource SystemControlForegroundChromeHighBrush}"
Foreground="{ThemeResource SystemControlForegroundBaseMediumBrush}"
- contract7Present:SelectionFlyout="{x:Null}"/>
+ SelectionFlyout="{x:Null}"/>
- Modify the XAML to change the Title and (mobile) Status bars.
+ Modify the XAML to change the Title.
\ No newline at end of file
diff --git a/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/ViewExtensions/ViewExtensionsPage.xaml b/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/ViewExtensions/ViewExtensionsPage.xaml
index ea5bd342e..49a539705 100644
--- a/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/ViewExtensions/ViewExtensionsPage.xaml
+++ b/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/ViewExtensions/ViewExtensionsPage.xaml
@@ -5,10 +5,6 @@
xmlns:extensions="using:Microsoft.Toolkit.Uwp.UI.Extensions"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
extensions:ApplicationViewExtensions.Title="View Extensions"
- extensions:StatusBarExtensions.BackgroundColor="Blue"
- extensions:StatusBarExtensions.BackgroundOpacity="0.8"
- extensions:StatusBarExtensions.ForegroundColor="White"
- extensions:StatusBarExtensions.IsVisible="True"
extensions:TitleBarExtensions.BackgroundColor="Blue"
extensions:TitleBarExtensions.ForegroundColor="White"
mc:Ignorable="d">
diff --git a/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/ViewExtensions/ViewExtensionsPage.xaml.cs b/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/ViewExtensions/ViewExtensionsPage.xaml.cs
index 580f36f85..5295aedf1 100644
--- a/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/ViewExtensions/ViewExtensionsPage.xaml.cs
+++ b/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/ViewExtensions/ViewExtensionsPage.xaml.cs
@@ -24,9 +24,6 @@ namespace Microsoft.Toolkit.Uwp.SampleApp.SamplePages
{
base.OnNavigatedFrom(e);
- // Reset app back to normal.
- StatusBarExtensions.SetIsVisible(this, false);
-
ApplicationViewExtensions.SetTitle(this, string.Empty);
var lightGreyBrush = (Color)Application.Current.Resources["Grey-04"];
diff --git a/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/WeatherLiveTileAndToast/WeatherLiveTileAndToastCode.bind b/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/WeatherLiveTileAndToast/WeatherLiveTileAndToastCode.bind
index 26603452a..7963c5a56 100644
--- a/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/WeatherLiveTileAndToast/WeatherLiveTileAndToastCode.bind
+++ b/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/WeatherLiveTileAndToast/WeatherLiveTileAndToastCode.bind
@@ -121,10 +121,9 @@ private static bool IsAdaptiveToastSupported()
{
switch (AnalyticsInfo.VersionInfo.DeviceFamily)
{
- // Desktop and Mobile started supporting adaptive toasts in API contract 3 (Anniversary Update)
case "Windows.Mobile":
case "Windows.Desktop":
- return ApiInformation.IsApiContractPresent("Windows.Foundation.UniversalApiContract", 3);
+ return true;
// Other device families do not support adaptive toasts
default:
diff --git a/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/WeatherLiveTileAndToast/WeatherLiveTileAndToastCodeJavaScript.bind b/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/WeatherLiveTileAndToast/WeatherLiveTileAndToastCodeJavaScript.bind
deleted file mode 100644
index 34461a181..000000000
--- a/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/WeatherLiveTileAndToast/WeatherLiveTileAndToastCodeJavaScript.bind
+++ /dev/null
@@ -1,271 +0,0 @@
-var square44x44Logo = new Windows.Foundation.Uri("ms-appx:///Assets/Square44x44Logo.png");
-var square150x150Logo = new Windows.Foundation.Uri("ms-appx:///Assets/Square150x150Logo.png");
-var wide310x150Logo = new Windows.Foundation.Uri("ms-appx:///Assets/Wide310x150Logo.png");
-var square310x310Logo = new Windows.Foundation.Uri("ms-appx:///Assets/Square310x310Logo.png");
-
-var generateLargeSubgroup = function (day, image, high, low) {
- // generate the normal subgroup
- var subgroup = generateSubgroup(day, image, high, low);
-
- // allow there to be padding around the image
- (subgroup.children[1]).hintRemoveMargin = null;
-
- return subgroup;
-};
-
-var generateSubgroup = function (day, img, tempHi, tempLo) {
- var adaptativeSubgroup = new Microsoft.Toolkit.Uwp.Notifications.AdaptiveSubgroup();
- adaptativeSubgroup.hintWeight = 1;
-
- // Day
- var dayText = new Microsoft.Toolkit.Uwp.Notifications.AdaptiveText();
- dayText.text = day;
- dayText.hintAlign = Microsoft.Toolkit.Uwp.Notifications.AdaptiveTextAlign.Center;
-
- // Image
- var adaptativeImage = new Microsoft.Toolkit.Uwp.Notifications.AdaptiveImage();
- adaptativeImage.source = img;
- adaptativeImage.hintRemoveMargin = true;
-
- // High temp
- var highTempText = new Microsoft.Toolkit.Uwp.Notifications.AdaptiveText();
- highTempText.text = tempHi + "�";
- highTempText.hintAlign = Microsoft.Toolkit.Uwp.Notifications.AdaptiveTextAlign.Center;
-
- // Low temp
- var lowTempText = new Microsoft.Toolkit.Uwp.Notifications.AdaptiveText();
- lowTempText.text = tempLo + "�";
- lowTempText.hintAlign = Microsoft.Toolkit.Uwp.Notifications.AdaptiveTextAlign.Center;
- lowTempText.hintStyle = Microsoft.Toolkit.Uwp.Notifications.AdaptiveTextStyle.CaptionSubtle;
-
- adaptativeSubgroup.children.push(dayText);
- adaptativeSubgroup.children.push(adaptativeImage);
- adaptativeSubgroup.children.push(highTempText);
- adaptativeSubgroup.children.push(lowTempText);
-
- return adaptativeSubgroup;
-};
-
-var generateLegacyToastText = function (day, weatherEmoji, tempHi, tempLo) {
- var adaptativeText = new Microsoft.Toolkit.Uwp.Notifications.AdaptiveText();
- adaptativeText.text = `${day} ${weatherEmoji} ${tempHi}� / ${tempLo}�`;
- return adaptativeText;
-};
-
-var isAdaptiveToastSupported = function () {
- switch (Windows.System.Profile.AnalyticsInfo.versionInfo.deviceFamily) {
- // desktop and Mobile started supporting adaptive toasts in API contract 3 (Anniversary Update)
- case "Windows.Mobile":
- case "Windows.Desktop":
- return Windows.Foundation.Metadata.ApiInformation.isApiContractPresent("Windows.Foundation.UniversalApiContract", 3);
-
- // other device families do not support adaptive toasts
- default:
- return false;
- }
-};
-
-var generateToastContent = function () {
- // start by constructing the visual portion of the toast
- var binding = new Microsoft.Toolkit.Uwp.Notifications.ToastBindingGeneric();
-
- // we'll always have this summary text on our toast notification
- // (it is required that your toast starts with a text element)
- var adaptativeText1 = new Microsoft.Toolkit.Uwp.Notifications.AdaptiveText();
- adaptativeText1.text = "Today will be mostly sunny with a high of 63 and a low of 42.";
- binding.children.push(adaptativeText1);
-
- // if Adaptive Toast Notifications are supported
- if (isAdaptiveToastSupported()) {
- var adaptativeGroup = new Microsoft.Toolkit.Uwp.Notifications.AdaptiveGroup();
-
- adaptativeGroup.children.push(generateSubgroup("Mon", "Mostly Cloudy.png", 63, 42));
- adaptativeGroup.children.push(generateSubgroup("Tue", "Cloudy.png", 57, 38));
- adaptativeGroup.children.push(generateSubgroup("Wed", "Sunny.png", 59, 43));
- adaptativeGroup.children.push(generateSubgroup("Thu", "Sunny.png", 62, 42));
- adaptativeGroup.children.push(generateSubgroup("Fri", "Sunny.png", 71, 66));
-
- // use the rich Tile-like visual layout
- binding.children.push(adaptativeGroup);
- } else {
- var adaptativeText2 = new Microsoft.Toolkit.Uwp.Notifications.AdaptiveText();
- adaptativeText2.text = "Monday ? 63� / 42�";
-
- var adaptativeText3 = new Microsoft.Toolkit.Uwp.Notifications.AdaptiveText();
- adaptativeText3.text = "Tuesday ? 57� / 38�"
-
- // we'll just add two simple lines of text
- binding.children.push(adaptativeText2);
- binding.children.push(adaptativeText3);
- }
-
- // construct the entire notification
- var toastContent = new Microsoft.Toolkit.Uwp.Notifications.ToastContent();
-
- toastContent.visual = new Microsoft.Toolkit.Uwp.Notifications.ToastVisual();
- // use our binding from above
- toastContent.visual.bindingGeneric = binding;
- // set the base URI for the images, so we don't redundantly specify the entire path
- toastContent.visual.baseUri = new Windows.Foundation.Uri("ms-appx:///Assets/NotificationAssets/");
-
- // include launch string so we know what to open when user clicks toast
- toastContent.launch = "action=viewForecast&zip=98008";
-
- return toastContent;
-};
-
-var generateTileBindingSmall = function () {
- var tileBinding = new Microsoft.Toolkit.Uwp.Notifications.TileBinding();
-
- tileBinding.content = new Microsoft.Toolkit.Uwp.Notifications.TileBindingContentAdaptive();
-
- tileBinding.content.textStacking = Microsoft.Toolkit.Uwp.Notifications.TileTextStacking.Center;
-
- var adaptativeText1 = new Microsoft.Toolkit.Uwp.Notifications.AdaptiveText();
- adaptativeText1.text = "Mon";
- adaptativeText1.hintStyle = Microsoft.Toolkit.Uwp.Notifications.AdaptiveTextStyle.Body;
- adaptativeText1.hintAlign = Microsoft.Toolkit.Uwp.Notifications.AdaptiveTextAlign.Center;
-
- var adaptativeText2 = new Microsoft.Toolkit.Uwp.Notifications.AdaptiveText();
- adaptativeText2.text = "63�";
- adaptativeText2.hintStyle = Microsoft.Toolkit.Uwp.Notifications.AdaptiveTextStyle.Base;
- adaptativeText2.hintAlign = Microsoft.Toolkit.Uwp.Notifications.AdaptiveTextAlign.Center;
-
- tileBinding.content.children.push(adaptativeText1);
- tileBinding.content.children.push(adaptativeText2);
-
- return tileBinding;
-};
-
-var generateTileBindingMedium = function () {
- var tileBinding = new Microsoft.Toolkit.Uwp.Notifications.TileBinding();
-
- tileBinding.content = new Microsoft.Toolkit.Uwp.Notifications.TileBindingContentAdaptive();
-
- var adaptativeGroup = new Microsoft.Toolkit.Uwp.Notifications.AdaptiveGroup()
- adaptativeGroup.children.push(generateSubgroup("Mon", "Mostly Cloudy.png", 63, 42));
- adaptativeGroup.children.push(generateSubgroup("Tue", "Cloudy.png", 57, 38));
-
- tileBinding.content.children.push(adaptativeGroup);
-
- return tileBinding;
-};
-
-var generateTileBindingWide = function () {
- var tileBinding = new Microsoft.Toolkit.Uwp.Notifications.TileBinding();
-
- tileBinding.content = new Microsoft.Toolkit.Uwp.Notifications.TileBindingContentAdaptive();
-
- var adaptativeGroup = new Microsoft.Toolkit.Uwp.Notifications.AdaptiveGroup();
-
- adaptativeGroup.children.push(generateSubgroup("Mon", "Mostly Cloudy.png", 63, 42));
- adaptativeGroup.children.push(generateSubgroup("Tue", "Cloudy.png", 57, 38));
- adaptativeGroup.children.push(generateSubgroup("Wed", "Sunny.png", 59, 43));
- adaptativeGroup.children.push(generateSubgroup("Thu", "Sunny.png", 62, 42));
- adaptativeGroup.children.push(generateSubgroup("Fri", "Sunny.png", 71, 66));
-
- tileBinding.content.children.push(adaptativeGroup);
-
- return tileBinding;
-};
-
-var generateTileBindingLarge = function () {
- var tileBinding = new Microsoft.Toolkit.Uwp.Notifications.TileBinding();
-
- tileBinding.content = new Microsoft.Toolkit.Uwp.Notifications.TileBindingContentAdaptive();
-
- // 1. group
- var adaptativeGroup1 = new Microsoft.Toolkit.Uwp.Notifications.AdaptiveGroup();
-
- var adaptativeSubgroup1 = new Microsoft.Toolkit.Uwp.Notifications.AdaptiveSubgroup();
- adaptativeSubgroup1.hintWeight = 30;
-
- var adaptativeImage1 = new Microsoft.Toolkit.Uwp.Notifications.AdaptiveImage();
- adaptativeImage1.source = "Mostly Cloudy.png";
- adaptativeSubgroup1.children.push(adaptativeImage1);
-
- var adaptativeSubgroup2 = new Microsoft.Toolkit.Uwp.Notifications.AdaptiveSubgroup();
-
- var adaptativeText1 = new Microsoft.Toolkit.Uwp.Notifications.AdaptiveText();
- adaptativeText1.text = "Monday";
- adaptativeText1.hintStyle = Microsoft.Toolkit.Uwp.Notifications.AdaptiveTextStyle.base;
-
- var adaptativeText2 = new Microsoft.Toolkit.Uwp.Notifications.AdaptiveText();
- adaptativeText2.text = "63� / 42�";
-
- var adaptativeText3 = new Microsoft.Toolkit.Uwp.Notifications.AdaptiveText();
- adaptativeText3.text = "20% chance of rain";
- adaptativeText3.hintStyle = Microsoft.Toolkit.Uwp.Notifications.AdaptiveTextStyle.captionSubtle;
-
- var adaptativeText4 = new Microsoft.Toolkit.Uwp.Notifications.AdaptiveText();
- adaptativeText4.text = "Winds 5 mph NE";
- adaptativeText4.hintStyle = Microsoft.Toolkit.Uwp.Notifications.AdaptiveTextStyle.captionSubtle;
-
- adaptativeSubgroup2.children.push(adaptativeText1);
- adaptativeSubgroup2.children.push(adaptativeText2);
- adaptativeSubgroup2.children.push(adaptativeText3);
- adaptativeSubgroup2.children.push(adaptativeText4);
-
- adaptativeGroup1.children.push(adaptativeSubgroup1);
- adaptativeGroup1.children.push(adaptativeSubgroup2);
-
- tileBinding.content.children.push(adaptativeGroup1);
-
- // 2. for spacing
- tileBinding.content.children.push(new Microsoft.Toolkit.Uwp.Notifications.AdaptiveText());
-
- // 3. group
- var adaptativeGroup2 = new Microsoft.Toolkit.Uwp.Notifications.AdaptiveGroup();
-
- adaptativeGroup2.children.push(generateLargeSubgroup("Tue", "Cloudy.png", 57, 38));
- adaptativeGroup2.children.push(generateLargeSubgroup("Wed", "Sunny.png", 59, 43));
- adaptativeGroup2.children.push(generateLargeSubgroup("Thu", "Sunny.png", 62, 42));
- adaptativeGroup2.children.push(generateLargeSubgroup("Fri", "Sunny.png", 71, 66));
-
- tileBinding.content.children.push(adaptativeGroup2);
-
- return tileBinding;
-};
-
-var generateTileContent = function () {
- var tileContent = new Microsoft.Toolkit.Uwp.Notifications.TileContent();
- tileContent.visual = new Microsoft.Toolkit.Uwp.Notifications.TileVisual();
-
- tileContent.visual.tileSmall = generateTileBindingSmall();
- tileContent.visual.tileMedium = generateTileBindingMedium();
- tileContent.visual.tileWide = generateTileBindingWide();
- tileContent.visual.tileLarge = generateTileBindingLarge();
-
- // set the base URI for the images, so we don't redundantly specify the entire path
- tileContent.visual.baseUri = new Windows.Foundation.Uri("ms-appx:///Assets/NotificationAssets/");
-
- return tileContent;
-};
-
-var pinTile = function () {
- var tile = new Windows.UI.StartScreen.SecondaryTile(new Date().getTime());
-
- tile.displayName = "WeatherSample";
- tile.arguments = "args";
- tile.visualElements.square150x150Logo = square150x150Logo;
- tile.visualElements.wide310x150Logo = wide310x150Logo;
- tile.visualElements.square310x310Logo = square310x310Logo;
- tile.visualElements.showNameOnSquare150x150Logo = true;
- tile.visualElements.showNameOnSquare310x310Logo = true;
- tile.visualElements.showNameOnWide310x150Logo = true;
-
- tile.requestCreateAsync()
- .then(function () {
- // generate the tile notification content and update the tile
- var content = generateTileContent();
- var tileNotification = new Windows.UI.Notifications.TileNotification(content.getXml());
- Windows.UI.Notifications.TileUpdateManager.createTileUpdaterForSecondaryTile(tile.TileId).update(tileNotification);
- });
-};
-
-var popToast = function () {
- // generate the toast notification content and pop the toast
- var content = generateToastContent();
- var toast = new Windows.UI.Notifications.ToastNotification(content.getXml());
- Windows.UI.Notifications.ToastNotificationManager.createToastNotifier().show(toast);
-};
\ No newline at end of file
diff --git a/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/WeatherLiveTileAndToast/WeatherLiveTileAndToastPage.xaml.cs b/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/WeatherLiveTileAndToast/WeatherLiveTileAndToastPage.xaml.cs
index d172b39aa..3abda74cf 100644
--- a/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/WeatherLiveTileAndToast/WeatherLiveTileAndToastPage.xaml.cs
+++ b/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/WeatherLiveTileAndToast/WeatherLiveTileAndToastPage.xaml.cs
@@ -5,14 +5,11 @@
using System;
using Microsoft.Toolkit.Uwp.Notifications;
using Microsoft.Toolkit.Uwp.SampleApp.Common;
-using Microsoft.Toolkit.Uwp.SampleApp.Models;
using NotificationsVisualizerLibrary;
-using Windows.Foundation.Metadata;
using Windows.System.Profile;
using Windows.UI.Notifications;
using Windows.UI.StartScreen;
using Windows.UI.Xaml;
-using Windows.UI.Xaml.Navigation;
namespace Microsoft.Toolkit.Uwp.SampleApp.SamplePages
{
@@ -119,10 +116,9 @@ namespace Microsoft.Toolkit.Uwp.SampleApp.SamplePages
{
switch (AnalyticsInfo.VersionInfo.DeviceFamily)
{
- // Desktop and Mobile started supporting adaptive toasts in API contract 3 (Anniversary Update)
case "Windows.Mobile":
case "Windows.Desktop":
- return ApiInformation.IsApiContractPresent("Windows.Foundation.UniversalApiContract", 3);
+ return true;
// Other device families do not support adaptive toasts
default:
diff --git a/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/samples.json b/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/samples.json
index 526cae34d..1a5c5303b 100644
--- a/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/samples.json
+++ b/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/samples.json
@@ -882,7 +882,6 @@
"About": "This shows how to update a Live Tile with a rich Adaptive notification.",
"CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.Notifications",
"CodeFile": "LiveTileCode.bind",
- "JavaScriptCodeFile": "LiveTileCodeJavaScript.bind",
"Icon": "/SamplePages/LiveTile/LiveTile.png",
"DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/notifications/NotificationsOverview.md"
},
@@ -893,7 +892,6 @@
"About": "This shows how to send a Toast notification.",
"CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.Notifications",
"CodeFile": "ToastCode.bind",
- "JavaScriptCodeFile": "ToastCodeJavaScript.bind",
"Icon": "/SamplePages/Toast/Toast.png",
"DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/notifications/NotificationsOverview.md"
},
@@ -904,7 +902,6 @@
"About": "This shows how to send a Weather Live Tile and Toast notification, displaying the forecast.",
"CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.Notifications",
"CodeFile": "WeatherLiveTileAndToastCode.bind",
- "JavaScriptCodeFile": "WeatherLiveTileAndToastCodeJavaScript.bind",
"Icon": "/SamplePages/WeatherLiveTileAndToast/WeatherLiveTileAndToast.png",
"DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/notifications/NotificationsOverview.md"
},
@@ -1139,7 +1136,7 @@
{
"Name": "ViewExtensions",
"Type": "ViewExtensionsPage",
- "About": "View extensions to set StatusBar and TitleBar properties.",
+ "About": "View extensions to set TitleBar properties.",
"CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI/Extensions",
"XamlCodeFile": "ViewExtensionsCode.bind",
"Icon": "/SamplePages/ViewExtensions/ViewExtensions.png",
diff --git a/Microsoft.Toolkit.Uwp.SampleApp/Shell.SamplePicker.cs b/Microsoft.Toolkit.Uwp.SampleApp/Shell.SamplePicker.cs
index be888c5b9..80cc95787 100644
--- a/Microsoft.Toolkit.Uwp.SampleApp/Shell.SamplePicker.cs
+++ b/Microsoft.Toolkit.Uwp.SampleApp/Shell.SamplePicker.cs
@@ -6,14 +6,12 @@ using System;
using System.Collections.Generic;
using System.Linq;
using System.Numerics;
-using System.Threading;
using System.Threading.Tasks;
using Microsoft.Toolkit.Uwp.Helpers;
using Microsoft.Toolkit.Uwp.SampleApp.Pages;
using Microsoft.Toolkit.Uwp.UI.Animations;
using Microsoft.Toolkit.Uwp.UI.Controls;
using Microsoft.Toolkit.Uwp.UI.Extensions;
-using Windows.Foundation.Metadata;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Data;
@@ -331,10 +329,7 @@ namespace Microsoft.Toolkit.Uwp.SampleApp
if (MoreInfoImage != null && MoreInfoContent.DataContext != null)
{
var animation = ConnectedAnimationService.GetForCurrentView().GetAnimation("sample_icon");
- if (ApiInformation.IsTypePresent("Windows.UI.Xaml.Media.Animation.DirectConnectedAnimationConfiguration"))
- {
- animation.Configuration = new DirectConnectedAnimationConfiguration();
- }
+ animation.Configuration = new DirectConnectedAnimationConfiguration();
_ = SamplePickerGridView.TryStartConnectedAnimationAsync(animation, MoreInfoContent.DataContext, "SampleIcon");
}
diff --git a/Microsoft.Toolkit.Uwp.SampleApp/Shell.xaml b/Microsoft.Toolkit.Uwp.SampleApp/Shell.xaml
index 2cf8264d6..7aa45fcdc 100644
--- a/Microsoft.Toolkit.Uwp.SampleApp/Shell.xaml
+++ b/Microsoft.Toolkit.Uwp.SampleApp/Shell.xaml
@@ -10,7 +10,6 @@
xmlns:behaviors="using:Microsoft.Toolkit.Uwp.UI.Animations.Behaviors"
xmlns:animations="using:Microsoft.Toolkit.Uwp.UI.Animations"
xmlns:controls="using:Microsoft.Toolkit.Uwp.UI.Controls"
- extensions:StatusBarExtensions.IsVisible="False"
extensions:TitleBarExtensions.BackgroundColor="{StaticResource Brand-Color}"
extensions:TitleBarExtensions.ButtonBackgroundColor="{StaticResource Brand-Color}"
extensions:TitleBarExtensions.ButtonForegroundColor="{StaticResource Titlebar-Foreground}"
diff --git a/Microsoft.Toolkit.Uwp.SampleApp/Styles/ThemeInjector.cs b/Microsoft.Toolkit.Uwp.SampleApp/Styles/ThemeInjector.cs
index 5e809a849..c0a595ac3 100644
--- a/Microsoft.Toolkit.Uwp.SampleApp/Styles/ThemeInjector.cs
+++ b/Microsoft.Toolkit.Uwp.SampleApp/Styles/ThemeInjector.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-using Windows.Foundation.Metadata;
using Windows.UI;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Media;
@@ -21,46 +20,43 @@ namespace Microsoft.Toolkit.Uwp.SampleApp.Styles
darkTheme = themes.ThemeDictionaries["Dark"] as ResourceDictionary;
lightTheme = themes.ThemeDictionaries["Light"] as ResourceDictionary;
- if (ApiInformation.IsTypePresent("Windows.UI.Xaml.Media.AcrylicBrush"))
+ AddAcrylic(new ThemeAcrylic
{
- AddAcrylic(new ThemeAcrylic
+ Name = "Background-AboutPage-SidePane",
+ DarkAcrylic = new AcrylicBrush
{
- Name = "Background-AboutPage-SidePane",
- DarkAcrylic = new AcrylicBrush
- {
- TintColor = Helpers.ColorHelper.ToColor("#FF333333"),
- TintOpacity = 0.8,
- BackgroundSource = AcrylicBackgroundSource.Backdrop,
- FallbackColor = Helpers.ColorHelper.ToColor("#FF333333")
- },
- LightAcrylic = new AcrylicBrush
- {
- TintColor = Colors.White,
- TintOpacity = 0.8,
- BackgroundSource = AcrylicBackgroundSource.Backdrop,
- FallbackColor = Colors.White
- }
- });
+ TintColor = Helpers.ColorHelper.ToColor("#FF333333"),
+ TintOpacity = 0.8,
+ BackgroundSource = AcrylicBackgroundSource.Backdrop,
+ FallbackColor = Helpers.ColorHelper.ToColor("#FF333333")
+ },
+ LightAcrylic = new AcrylicBrush
+ {
+ TintColor = Colors.White,
+ TintOpacity = 0.8,
+ BackgroundSource = AcrylicBackgroundSource.Backdrop,
+ FallbackColor = Colors.White
+ }
+ });
- AddAcrylic(new ThemeAcrylic
+ AddAcrylic(new ThemeAcrylic
+ {
+ Names = new[] { "Commands-Background" },
+ DarkAcrylic = new AcrylicBrush
{
- Names = new[] { "Commands-Background" },
- DarkAcrylic = new AcrylicBrush
- {
- TintColor = Helpers.ColorHelper.ToColor("#FF111111"),
- TintOpacity = 0.7,
- BackgroundSource = AcrylicBackgroundSource.Backdrop,
- FallbackColor = Helpers.ColorHelper.ToColor("#FF111111")
- },
- LightAcrylic = new AcrylicBrush
- {
- TintColor = Helpers.ColorHelper.ToColor("#FFDDDDDD"),
- TintOpacity = 0.6,
- BackgroundSource = AcrylicBackgroundSource.Backdrop,
- FallbackColor = Helpers.ColorHelper.ToColor("#FFDDDDDD")
- }
- });
- }
+ TintColor = Helpers.ColorHelper.ToColor("#FF111111"),
+ TintOpacity = 0.7,
+ BackgroundSource = AcrylicBackgroundSource.Backdrop,
+ FallbackColor = Helpers.ColorHelper.ToColor("#FF111111")
+ },
+ LightAcrylic = new AcrylicBrush
+ {
+ TintColor = Helpers.ColorHelper.ToColor("#FFDDDDDD"),
+ TintOpacity = 0.6,
+ BackgroundSource = AcrylicBackgroundSource.Backdrop,
+ FallbackColor = Helpers.ColorHelper.ToColor("#FFDDDDDD")
+ }
+ });
}
private static void AddAcrylic(ThemeAcrylic resource)
diff --git a/Microsoft.Toolkit.Uwp.SampleApp/readme.md b/Microsoft.Toolkit.Uwp.SampleApp/readme.md
index 846f1f665..52741e7ff 100644
--- a/Microsoft.Toolkit.Uwp.SampleApp/readme.md
+++ b/Microsoft.Toolkit.Uwp.SampleApp/readme.md
@@ -168,7 +168,7 @@ The value is a string which is the fully-qualified typename to check for the pre
```json
{
//...
- "About": "MySample needs 10.0.16299 or higher to work.",
+ "About": "MySample needs 10.0.18362 or higher to work.",
"ApiCheck": "Windows.UI.Xaml.Controls.NavigationView",
"BadgeUpdateVersionRequired": "Fall Creators Update required",
//...
diff --git a/Microsoft.Toolkit.Uwp.Samples.BackgroundTasks/Microsoft.Toolkit.Uwp.Samples.BackgroundTasks.csproj b/Microsoft.Toolkit.Uwp.Samples.BackgroundTasks/Microsoft.Toolkit.Uwp.Samples.BackgroundTasks.csproj
index 5a6580a8e..20a7e0713 100644
--- a/Microsoft.Toolkit.Uwp.Samples.BackgroundTasks/Microsoft.Toolkit.Uwp.Samples.BackgroundTasks.csproj
+++ b/Microsoft.Toolkit.Uwp.Samples.BackgroundTasks/Microsoft.Toolkit.Uwp.Samples.BackgroundTasks.csproj
@@ -11,8 +11,8 @@
Microsoft.Toolkit.Uwp.Samples.BackgroundTasks
fr-FR
UAP
- 10.0.18362.0
- 10.0.16299.0
+ 10.0.19041.0
+ 10.0.17763.0
14
512
{A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
diff --git a/Microsoft.Toolkit.Uwp.UI.Animations/ApiInformationHelper.cs b/Microsoft.Toolkit.Uwp.UI.Animations/ApiInformationHelper.cs
index d2b26d7cd..a81b7a5d8 100644
--- a/Microsoft.Toolkit.Uwp.UI.Animations/ApiInformationHelper.cs
+++ b/Microsoft.Toolkit.Uwp.UI.Animations/ApiInformationHelper.cs
@@ -8,19 +8,6 @@ namespace Microsoft.Toolkit.Uwp.UI.Animations
{
internal class ApiInformationHelper
{
- private static bool? _isAniversaryUpdateOrAbove;
- private static bool? _isCreatorsUpdateOrAbove;
- private static bool? _isFallCreatorsUpdateOrAbove;
-
- public static bool IsAniversaryUpdateOrAbove => (bool)(_isAniversaryUpdateOrAbove ??
- (_isAniversaryUpdateOrAbove = ApiInformation.IsApiContractPresent("Windows.Foundation.UniversalApiContract", 3)));
-
- public static bool IsCreatorsUpdateOrAbove => (bool)(_isCreatorsUpdateOrAbove ??
- (_isCreatorsUpdateOrAbove = ApiInformation.IsApiContractPresent("Windows.Foundation.UniversalApiContract", 4)));
-
- public static bool IsFallCreatorsUpdateOrAbove => (bool)(_isFallCreatorsUpdateOrAbove ??
- (_isFallCreatorsUpdateOrAbove = ApiInformation.IsApiContractPresent("Windows.Foundation.UniversalApiContract", 5)));
-
public static bool IsXamlRootAvailable { get; } = ApiInformation.IsPropertyPresent("Windows.UI.Xaml.UIElement", "XamlRoot");
}
}
diff --git a/Microsoft.Toolkit.Uwp.UI.Animations/Behaviors/Blur.cs b/Microsoft.Toolkit.Uwp.UI.Animations/Behaviors/Blur.cs
index ebdb1ab22..3a56da53c 100644
--- a/Microsoft.Toolkit.Uwp.UI.Animations/Behaviors/Blur.cs
+++ b/Microsoft.Toolkit.Uwp.UI.Animations/Behaviors/Blur.cs
@@ -9,17 +9,9 @@ namespace Microsoft.Toolkit.Uwp.UI.Animations.Behaviors
///
/// Performs an blur animation using composition.
///
- ///
- ///
- /// Blurs are only supported on Build 1607 and up. Assigning the blur behavior on an older
- /// version of Windows will not add any effect. You can use the
- /// property to check for whether blurs are supported on the device at runtime.
- ///
- ///
///
/// Microsoft.Xaml.Interactivity.Behavior{Windows.UI.Xaml.UIElement}
///
- ///
public class Blur : CompositionBehaviorBase
{
///
@@ -44,10 +36,7 @@ namespace Microsoft.Toolkit.Uwp.UI.Animations.Behaviors
///
public override void StartAnimation()
{
- if (AnimationExtensions.BlurEffect.IsSupported)
- {
- AssociatedObject?.Blur(duration: Duration, delay: Delay, value: (float)Value, easingType: EasingType, easingMode: EasingMode)?.Start();
- }
+ AssociatedObject?.Blur(duration: Duration, delay: Delay, value: (float)Value, easingType: EasingType, easingMode: EasingMode)?.Start();
}
}
}
diff --git a/Microsoft.Toolkit.Uwp.UI.Animations/Behaviors/FadeHeaderBehavior.cs b/Microsoft.Toolkit.Uwp.UI.Animations/Behaviors/FadeHeaderBehavior.cs
index d35769e43..c965f7834 100644
--- a/Microsoft.Toolkit.Uwp.UI.Animations/Behaviors/FadeHeaderBehavior.cs
+++ b/Microsoft.Toolkit.Uwp.UI.Animations/Behaviors/FadeHeaderBehavior.cs
@@ -5,7 +5,6 @@
using Microsoft.Toolkit.Uwp.UI.Animations.Expressions;
using Microsoft.Toolkit.Uwp.UI.Behaviors;
using Microsoft.Toolkit.Uwp.UI.Extensions;
-using Windows.Foundation.Metadata;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Hosting;
@@ -91,13 +90,6 @@ namespace Microsoft.Toolkit.Uwp.UI.Animations.Behaviors
/// true if the assignment was successful; otherwise, false.
private bool AssignFadeAnimation()
{
- // Confirm that Windows.UI.Xaml.Hosting.ElementCompositionPreview is available (Windows 10 10586 or later).
- if (!ApiInformation.IsMethodPresent("Windows.UI.Xaml.Hosting.ElementCompositionPreview", nameof(ElementCompositionPreview.GetScrollViewerManipulationPropertySet)))
- {
- // Just return true since it's not supported
- return true;
- }
-
if (AssociatedObject == null)
{
return false;
diff --git a/Microsoft.Toolkit.Uwp.UI.Animations/Behaviors/Light.cs b/Microsoft.Toolkit.Uwp.UI.Animations/Behaviors/Light.cs
index 8940f3eb6..556972c1d 100644
--- a/Microsoft.Toolkit.Uwp.UI.Animations/Behaviors/Light.cs
+++ b/Microsoft.Toolkit.Uwp.UI.Animations/Behaviors/Light.cs
@@ -13,7 +13,6 @@ namespace Microsoft.Toolkit.Uwp.UI.Animations.Behaviors
/// Applies a basic point light to a UIElement. You control the intensity by setting the distance of the light.
///
///
- ///
[Obsolete("The Light effect will be removed in a future major release. Please use XamlLight instead")]
public class Light : CompositionBehaviorBase
@@ -54,16 +53,13 @@ namespace Microsoft.Toolkit.Uwp.UI.Animations.Behaviors
///
public override void StartAnimation()
{
- if (AnimationExtensions.IsLightingSupported)
- {
- AssociatedObject?.Light(
- duration: Duration,
- delay: Delay,
- easingType: EasingType,
- easingMode: EasingMode,
- distance: (float)Distance,
- color: ((SolidColorBrush)Color).Color)?.Start();
- }
+ AssociatedObject?.Light(
+ duration: Duration,
+ delay: Delay,
+ easingType: EasingType,
+ easingMode: EasingMode,
+ distance: (float)Distance,
+ color: ((SolidColorBrush)Color).Color)?.Start();
}
}
}
diff --git a/Microsoft.Toolkit.Uwp.UI.Animations/Behaviors/QuickReturnHeaderBehavior.cs b/Microsoft.Toolkit.Uwp.UI.Animations/Behaviors/QuickReturnHeaderBehavior.cs
index 3cb2a030d..fe86fd75b 100644
--- a/Microsoft.Toolkit.Uwp.UI.Animations/Behaviors/QuickReturnHeaderBehavior.cs
+++ b/Microsoft.Toolkit.Uwp.UI.Animations/Behaviors/QuickReturnHeaderBehavior.cs
@@ -6,7 +6,6 @@ using Microsoft.Toolkit.Uwp.UI.Animations.Expressions;
using Microsoft.Toolkit.Uwp.UI.Behaviors;
using Microsoft.Toolkit.Uwp.UI.Extensions;
using Windows.Foundation;
-using Windows.Foundation.Metadata;
using Windows.UI.Composition;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
@@ -104,13 +103,6 @@ namespace Microsoft.Toolkit.Uwp.UI.Animations.Behaviors
{
StopAnimation();
- // Confirm that Windows.UI.Xaml.Hosting.ElementCompositionPreview is available (Windows 10 10586 or later).
- if (!ApiInformation.IsMethodPresent("Windows.UI.Xaml.Hosting.ElementCompositionPreview", nameof(ElementCompositionPreview.GetScrollViewerManipulationPropertySet)))
- {
- // Just return true since it's not supported
- return true;
- }
-
if (AssociatedObject == null)
{
return false;
diff --git a/Microsoft.Toolkit.Uwp.UI.Animations/Behaviors/Saturation.cs b/Microsoft.Toolkit.Uwp.UI.Animations/Behaviors/Saturation.cs
index 7cb5c6352..61e0050fc 100644
--- a/Microsoft.Toolkit.Uwp.UI.Animations/Behaviors/Saturation.cs
+++ b/Microsoft.Toolkit.Uwp.UI.Animations/Behaviors/Saturation.cs
@@ -38,15 +38,12 @@ namespace Microsoft.Toolkit.Uwp.UI.Animations.Behaviors
///
public override void StartAnimation()
{
- if (AnimationExtensions.SaturationEffect.IsSupported)
- {
- _frameworkElement?.Saturation(
- duration: Duration,
- delay: Delay,
- easingType: EasingType,
- easingMode: EasingMode,
- value: (float)Value)?.StartAsync();
- }
+ _frameworkElement?.Saturation(
+ duration: Duration,
+ delay: Delay,
+ easingType: EasingType,
+ easingMode: EasingMode,
+ value: (float)Value)?.StartAsync();
}
///
diff --git a/Microsoft.Toolkit.Uwp.UI.Animations/Behaviors/StickyHeaderBehavior.cs b/Microsoft.Toolkit.Uwp.UI.Animations/Behaviors/StickyHeaderBehavior.cs
index 6eae922af..6aa45714b 100644
--- a/Microsoft.Toolkit.Uwp.UI.Animations/Behaviors/StickyHeaderBehavior.cs
+++ b/Microsoft.Toolkit.Uwp.UI.Animations/Behaviors/StickyHeaderBehavior.cs
@@ -6,7 +6,6 @@ using Microsoft.Toolkit.Uwp.UI.Animations.Expressions;
using Microsoft.Toolkit.Uwp.UI.Behaviors;
using Microsoft.Toolkit.Uwp.UI.Extensions;
using Windows.Foundation;
-using Windows.Foundation.Metadata;
using Windows.UI.Composition;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
@@ -106,13 +105,6 @@ namespace Microsoft.Toolkit.Uwp.UI.Animations.Behaviors
{
StopAnimation();
- // Confirm that Windows.UI.Xaml.Hosting.ElementCompositionPreview is available (Windows 10 10586 or later).
- if (!ApiInformation.IsMethodPresent("Windows.UI.Xaml.Hosting.ElementCompositionPreview", nameof(ElementCompositionPreview.GetScrollViewerManipulationPropertySet)))
- {
- // Just return true since it's not supported
- return true;
- }
-
if (AssociatedObject == null)
{
return false;
diff --git a/Microsoft.Toolkit.Uwp.UI.Animations/CompositionAnimations/Animations/TranslationAnimation.cs b/Microsoft.Toolkit.Uwp.UI.Animations/CompositionAnimations/Animations/TranslationAnimation.cs
index d223a9493..1ce4a10ee 100644
--- a/Microsoft.Toolkit.Uwp.UI.Animations/CompositionAnimations/Animations/TranslationAnimation.cs
+++ b/Microsoft.Toolkit.Uwp.UI.Animations/CompositionAnimations/Animations/TranslationAnimation.cs
@@ -20,18 +20,5 @@ namespace Microsoft.Toolkit.Uwp.UI.Animations
{
Target = "Translation";
}
-
- ///
- public override CompositionAnimation GetCompositionAnimation(Compositor compositor)
- {
- if (ApiInformationHelper.IsCreatorsUpdateOrAbove)
- {
- return base.GetCompositionAnimation(compositor);
- }
- else
- {
- return null;
- }
- }
}
}
diff --git a/Microsoft.Toolkit.Uwp.UI.Animations/CompositionAnimations/Animations/TypedAnimationBase.cs b/Microsoft.Toolkit.Uwp.UI.Animations/CompositionAnimations/Animations/TypedAnimationBase.cs
index 4c3029168..fed315658 100644
--- a/Microsoft.Toolkit.Uwp.UI.Animations/CompositionAnimations/Animations/TypedAnimationBase.cs
+++ b/Microsoft.Toolkit.Uwp.UI.Animations/CompositionAnimations/Animations/TypedAnimationBase.cs
@@ -69,11 +69,7 @@ namespace Microsoft.Toolkit.Uwp.UI.Animations
animation.Target = Target;
animation.Duration = Duration;
animation.DelayTime = Delay;
-
- if (ApiInformationHelper.IsCreatorsUpdateOrAbove)
- {
- animation.DelayBehavior = SetInitialValueBeforeDelay ? AnimationDelayBehavior.SetInitialValueBeforeDelay : AnimationDelayBehavior.SetInitialValueAfterDelay;
- }
+ animation.DelayBehavior = SetInitialValueBeforeDelay ? AnimationDelayBehavior.SetInitialValueBeforeDelay : AnimationDelayBehavior.SetInitialValueAfterDelay;
if (KeyFrames.Count == 0)
{
diff --git a/Microsoft.Toolkit.Uwp.UI.Animations/ConnectedAnimations/Connected.cs b/Microsoft.Toolkit.Uwp.UI.Animations/ConnectedAnimations/Connected.cs
index 999ea1d40..f3ae5aba7 100644
--- a/Microsoft.Toolkit.Uwp.UI.Animations/ConnectedAnimations/Connected.cs
+++ b/Microsoft.Toolkit.Uwp.UI.Animations/ConnectedAnimations/Connected.cs
@@ -378,11 +378,6 @@ namespace Microsoft.Toolkit.Uwp.UI.Animations
private static void OnKeyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
- if (!ApiInformationHelper.IsCreatorsUpdateOrAbove)
- {
- return;
- }
-
var element = d as FrameworkElement;
if (element == null)
{
@@ -406,11 +401,6 @@ namespace Microsoft.Toolkit.Uwp.UI.Animations
private static void OnAnchorElementChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
- if (!ApiInformationHelper.IsCreatorsUpdateOrAbove)
- {
- return;
- }
-
var element = d as FrameworkElement;
if (element == null)
{
@@ -434,11 +424,6 @@ namespace Microsoft.Toolkit.Uwp.UI.Animations
private static void OnListItemKeyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
- if (!ApiInformationHelper.IsCreatorsUpdateOrAbove)
- {
- return;
- }
-
var element = d as Windows.UI.Xaml.Controls.ListViewBase;
if (element == null)
{
@@ -462,11 +447,6 @@ namespace Microsoft.Toolkit.Uwp.UI.Animations
private static void OnListItemElementNameChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
- if (!ApiInformationHelper.IsCreatorsUpdateOrAbove)
- {
- return;
- }
-
var element = d as Windows.UI.Xaml.Controls.ListViewBase;
if (element == null)
{
@@ -520,7 +500,7 @@ namespace Microsoft.Toolkit.Uwp.UI.Animations
private static void AddListViewBaseItemAnimationDetails(Page page, Windows.UI.Xaml.Controls.ListViewBase listViewBase)
{
- if (ApiInformationHelper.IsCreatorsUpdateOrAbove && listViewBase != null)
+ if (listViewBase != null)
{
var elementName = GetListItemElementName(listViewBase);
var key = GetListItemKey(listViewBase);
diff --git a/Microsoft.Toolkit.Uwp.UI.Animations/ConnectedAnimations/ConnectedAnimationHelper.cs b/Microsoft.Toolkit.Uwp.UI.Animations/ConnectedAnimations/ConnectedAnimationHelper.cs
index 31c18fe0a..35e33bb2f 100644
--- a/Microsoft.Toolkit.Uwp.UI.Animations/ConnectedAnimations/ConnectedAnimationHelper.cs
+++ b/Microsoft.Toolkit.Uwp.UI.Animations/ConnectedAnimations/ConnectedAnimationHelper.cs
@@ -5,7 +5,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
-using Windows.Foundation.Metadata;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Media.Animation;
@@ -34,11 +33,6 @@ namespace Microsoft.Toolkit.Uwp.UI.Animations
throw new ArgumentNullException(nameof(frame));
}
- if (!ApiInformationHelper.IsCreatorsUpdateOrAbove)
- {
- return;
- }
-
frame.Navigating += Frame_Navigating;
frame.Navigated += Frame_Navigated;
}
@@ -69,7 +63,7 @@ namespace Microsoft.Toolkit.Uwp.UI.Animations
{
ConnectedAnimation animation = null;
- if (props.IsListAnimation && parameter != null && ApiInformationHelper.IsCreatorsUpdateOrAbove)
+ if (props.IsListAnimation && parameter != null)
{
foreach (var listAnimProperty in props.ListAnimProperties)
{
@@ -97,8 +91,7 @@ namespace Microsoft.Toolkit.Uwp.UI.Animations
}
if (animation != null &&
- e.NavigationMode == Windows.UI.Xaml.Navigation.NavigationMode.Back &&
- ApiInformation.IsTypePresent("Windows.UI.Xaml.Media.Animation.DirectConnectedAnimationConfiguration"))
+ e.NavigationMode == Windows.UI.Xaml.Navigation.NavigationMode.Back)
{
UseDirectConnectedAnimationConfiguration(animation);
}
@@ -147,7 +140,7 @@ namespace Microsoft.Toolkit.Uwp.UI.Animations
var animationHandled = false;
if (connectedAnimation != null)
{
- if (props.IsListAnimation && parameter != null && ApiInformationHelper.IsCreatorsUpdateOrAbove)
+ if (props.IsListAnimation && parameter != null)
{
foreach (var listAnimProperty in props.ListAnimProperties)
{
@@ -174,7 +167,7 @@ namespace Microsoft.Toolkit.Uwp.UI.Animations
}
else if (!props.IsListAnimation)
{
- if (ApiInformationHelper.IsCreatorsUpdateOrAbove && coordinatedAnimationElements.TryGetValue(props.Element, out var coordinatedElements))
+ if (coordinatedAnimationElements.TryGetValue(props.Element, out var coordinatedElements))
{
connectedAnimation.TryStart(props.Element, coordinatedElements);
}
diff --git a/Microsoft.Toolkit.Uwp.UI.Animations/Effects/AnimationEffect.cs b/Microsoft.Toolkit.Uwp.UI.Animations/Effects/AnimationEffect.cs
index 3fe6bcff5..724e1e35f 100644
--- a/Microsoft.Toolkit.Uwp.UI.Animations/Effects/AnimationEffect.cs
+++ b/Microsoft.Toolkit.Uwp.UI.Animations/Effects/AnimationEffect.cs
@@ -19,14 +19,6 @@ namespace Microsoft.Toolkit.Uwp.UI.Animations.Effects
{
private static string[] _effectProperties;
- ///
- /// Gets a value indicating whether this instance is supported.
- ///
- ///
- /// true if this instance is supported; otherwise, false.
- ///
- public abstract bool IsSupported { get; }
-
///
/// Gets the name of the effect.
///
@@ -80,11 +72,6 @@ namespace Microsoft.Toolkit.Uwp.UI.Animations.Effects
return null;
}
- if (!IsSupported)
- {
- return null;
- }
-
var visual = animationSet.Visual;
var associatedObject = animationSet.Element as FrameworkElement;
diff --git a/Microsoft.Toolkit.Uwp.UI.Animations/Effects/Blur.cs b/Microsoft.Toolkit.Uwp.UI.Animations/Effects/Blur.cs
index 836341315..aa60fd5e0 100644
--- a/Microsoft.Toolkit.Uwp.UI.Animations/Effects/Blur.cs
+++ b/Microsoft.Toolkit.Uwp.UI.Animations/Effects/Blur.cs
@@ -3,7 +3,6 @@
// See the LICENSE file in the project root for more information.
using Microsoft.Graphics.Canvas.Effects;
-using Windows.Foundation.Metadata;
using Windows.UI.Composition;
namespace Microsoft.Toolkit.Uwp.UI.Animations.Effects
@@ -14,15 +13,6 @@ namespace Microsoft.Toolkit.Uwp.UI.Animations.Effects
///
public class Blur : AnimationEffect
{
- ///
- /// Gets a value indicating whether blur is supported.
- ///
- ///
- /// true if this instance is supported; otherwise, false.
- ///
- public override bool IsSupported
- => ApiInformation.IsApiContractPresent("Windows.Foundation.UniversalApiContract", 3);
-
///
/// Gets the name of the effect.
///
diff --git a/Microsoft.Toolkit.Uwp.UI.Animations/Effects/Saturation.cs b/Microsoft.Toolkit.Uwp.UI.Animations/Effects/Saturation.cs
index e13fa57c1..30289f925 100644
--- a/Microsoft.Toolkit.Uwp.UI.Animations/Effects/Saturation.cs
+++ b/Microsoft.Toolkit.Uwp.UI.Animations/Effects/Saturation.cs
@@ -3,7 +3,6 @@
// See the LICENSE file in the project root for more information.
using Microsoft.Graphics.Canvas.Effects;
-using Windows.Foundation.Metadata;
using Windows.UI.Composition;
namespace Microsoft.Toolkit.Uwp.UI.Animations.Effects
@@ -14,15 +13,6 @@ namespace Microsoft.Toolkit.Uwp.UI.Animations.Effects
///
public class Saturation : AnimationEffect
{
- ///
- /// Gets a value indicating whether Saturation is supported.
- ///
- ///
- /// true if this instance is supported; otherwise, false.
- ///
- public override bool IsSupported
- => ApiInformation.IsApiContractPresent("Windows.Foundation.UniversalApiContract", 3);
-
///
/// Gets the name of the effect.
///
diff --git a/Microsoft.Toolkit.Uwp.UI.Animations/Extensions/AnimationExtensions.Blur.cs b/Microsoft.Toolkit.Uwp.UI.Animations/Extensions/AnimationExtensions.Blur.cs
index c18d3e789..879e7a281 100644
--- a/Microsoft.Toolkit.Uwp.UI.Animations/Extensions/AnimationExtensions.Blur.cs
+++ b/Microsoft.Toolkit.Uwp.UI.Animations/Extensions/AnimationExtensions.Blur.cs
@@ -3,7 +3,6 @@
// See the LICENSE file in the project root for more information.
using Microsoft.Toolkit.Uwp.UI.Animations.Effects;
-using Windows.Foundation.Metadata;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Media.Animation;
@@ -22,17 +21,6 @@ namespace Microsoft.Toolkit.Uwp.UI.Animations
///
public static Blur BlurEffect { get; } = new Blur();
- ///
- /// Gets a value indicating whether the platform supports blur.
- ///
- ///
- /// A check should always be made to IsBlurSupported prior to calling Blur,
- /// since older operating systems will not support blurs.
- ///
- ///
- public static bool IsBlurSupported =>
- ApiInformation.IsApiContractPresent("Windows.Foundation.UniversalApiContract", 3); // SDK >= 14393
-
///
/// Animates the Gaussian blur of the UIElement.
///
@@ -45,7 +33,6 @@ namespace Microsoft.Toolkit.Uwp.UI.Animations
///
/// An Animation Set.
///
- ///
public static AnimationSet Blur(
this FrameworkElement associatedObject,
double value = 0d,
@@ -75,7 +62,6 @@ namespace Microsoft.Toolkit.Uwp.UI.Animations
///
/// An Animation Set.
///
- ///
public static AnimationSet Blur(
this AnimationSet animationSet,
double value = 0d,
diff --git a/Microsoft.Toolkit.Uwp.UI.Animations/Extensions/AnimationExtensions.Light.cs b/Microsoft.Toolkit.Uwp.UI.Animations/Extensions/AnimationExtensions.Light.cs
index 0949dd235..88573df78 100644
--- a/Microsoft.Toolkit.Uwp.UI.Animations/Extensions/AnimationExtensions.Light.cs
+++ b/Microsoft.Toolkit.Uwp.UI.Animations/Extensions/AnimationExtensions.Light.cs
@@ -27,32 +27,6 @@ namespace Microsoft.Toolkit.Uwp.UI.Animations
///
private static Dictionary pointLights = new Dictionary();
- ///
- /// Gets a value indicating whether this instance is lighting supported.
- ///
- ///
- /// true if this instance is lighting supported; otherwise, false.
- ///
- public static bool IsLightingSupported
- {
- get
- {
- bool lightingSupported = true;
-
- if (!Windows.Foundation.Metadata.ApiInformation.IsMethodPresent("Windows.UI.Xaml.Hosting.ElementCompositionPreview", "SetElementChildVisual"))
- {
- lightingSupported = false;
- }
-
- if (!Windows.Foundation.Metadata.ApiInformation.IsTypePresent("Windows.UI.Composition.CompositionSurfaceBrush"))
- {
- lightingSupported = false;
- }
-
- return lightingSupported;
- }
- }
-
///
/// Animates a point light and it's distance.
///
@@ -93,7 +67,6 @@ namespace Microsoft.Toolkit.Uwp.UI.Animations
/// The color of the spotlight.
/// The easing function
/// The easing mode
- ///
///
/// An Animation Set.
///
@@ -107,11 +80,6 @@ namespace Microsoft.Toolkit.Uwp.UI.Animations
EasingType easingType = EasingType.Default,
EasingMode easingMode = EasingMode.EaseOut)
{
- if (!IsLightingSupported)
- {
- return null;
- }
-
if (animationSet == null)
{
return null;
diff --git a/Microsoft.Toolkit.Uwp.UI.Animations/Implicit.cs b/Microsoft.Toolkit.Uwp.UI.Animations/Implicit.cs
index 59fe6c42f..a8a28187e 100644
--- a/Microsoft.Toolkit.Uwp.UI.Animations/Implicit.cs
+++ b/Microsoft.Toolkit.Uwp.UI.Animations/Implicit.cs
@@ -118,11 +118,6 @@ namespace Microsoft.Toolkit.Uwp.UI.Animations
private static void ShowAnimationsChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
- if (!ApiInformationHelper.IsCreatorsUpdateOrAbove)
- {
- return;
- }
-
if (e.OldValue is AnimationCollection oldCollection)
{
oldCollection.AnimationCollectionChanged -= ShowCollectionChanged;
@@ -139,11 +134,6 @@ namespace Microsoft.Toolkit.Uwp.UI.Animations
private static void HideAnimationsChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
- if (!ApiInformationHelper.IsCreatorsUpdateOrAbove)
- {
- return;
- }
-
if (e.OldValue is AnimationCollection oldCollection)
{
oldCollection.AnimationCollectionChanged -= HideCollectionChanged;
@@ -176,11 +166,6 @@ namespace Microsoft.Toolkit.Uwp.UI.Animations
private static void ShowCollectionChanged(object sender, EventArgs e)
{
- if (!ApiInformationHelper.IsCreatorsUpdateOrAbove)
- {
- return;
- }
-
var collection = (AnimationCollection)sender;
if (collection.Parent == null)
{
@@ -192,11 +177,6 @@ namespace Microsoft.Toolkit.Uwp.UI.Animations
private static void HideCollectionChanged(object sender, EventArgs e)
{
- if (!ApiInformationHelper.IsCreatorsUpdateOrAbove)
- {
- return;
- }
-
var collection = (AnimationCollection)sender;
if (collection.Parent == null)
{
@@ -220,7 +200,7 @@ namespace Microsoft.Toolkit.Uwp.UI.Animations
private static CompositionAnimationGroup GetCompositionAnimationGroup(AnimationCollection collection, UIElement element)
{
- if (ApiInformationHelper.IsCreatorsUpdateOrAbove && collection.ContainsTranslationAnimation)
+ if (collection.ContainsTranslationAnimation)
{
ElementCompositionPreview.SetIsTranslationEnabled(element, true);
}
@@ -230,7 +210,7 @@ namespace Microsoft.Toolkit.Uwp.UI.Animations
private static ImplicitAnimationCollection GetImplicitAnimationCollection(AnimationCollection collection, UIElement element)
{
- if (ApiInformationHelper.IsCreatorsUpdateOrAbove && collection.ContainsTranslationAnimation)
+ if (collection.ContainsTranslationAnimation)
{
ElementCompositionPreview.SetIsTranslationEnabled(element, true);
}
diff --git a/Microsoft.Toolkit.Uwp.UI.Animations/Microsoft.Toolkit.Uwp.UI.Animations.csproj b/Microsoft.Toolkit.Uwp.UI.Animations/Microsoft.Toolkit.Uwp.UI.Animations.csproj
index e2542fcca..df6558d94 100644
--- a/Microsoft.Toolkit.Uwp.UI.Animations/Microsoft.Toolkit.Uwp.UI.Animations.csproj
+++ b/Microsoft.Toolkit.Uwp.UI.Animations/Microsoft.Toolkit.Uwp.UI.Animations.csproj
@@ -1,7 +1,7 @@
- uap10.0.16299
+ uap10.0.17763
Windows Community Toolkit Animations
This library provides helpers and extensions on top of Windows Composition and XAML storyboards. It is part of the Windows Community Toolkit.
diff --git a/Microsoft.Toolkit.Uwp.UI.Animations/ReorderGridAnimation.cs b/Microsoft.Toolkit.Uwp.UI.Animations/ReorderGridAnimation.cs
index b8e86ad15..f05d5b1d4 100644
--- a/Microsoft.Toolkit.Uwp.UI.Animations/ReorderGridAnimation.cs
+++ b/Microsoft.Toolkit.Uwp.UI.Animations/ReorderGridAnimation.cs
@@ -3,7 +3,6 @@
// See the LICENSE file in the project root for more information.
using System;
-using Windows.Foundation.Metadata;
using Windows.UI.Composition;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
@@ -19,16 +18,6 @@ namespace Microsoft.Toolkit.Uwp.UI.Animations
private static readonly DependencyProperty ReorderAnimationProperty =
DependencyProperty.RegisterAttached("ReorderAnimation", typeof(bool), typeof(ImplicitAnimationCollection), new PropertyMetadata(null));
- ///
- /// Gets a value indicating whether the platform supports the animation.
- ///
- ///
- /// On platforms not supporting the animation, this class has no effect.
- ///
- public static bool IsSupported =>
- Windows.ApplicationModel.DesignMode.DesignModeEnabled ? false :
- ApiInformation.IsApiContractPresent("Windows.Foundation.UniversalApiContract", 3); // SDK >= 14393
-
///
/// Identifies the Duration attached dependency property.
///
@@ -57,7 +46,7 @@ namespace Microsoft.Toolkit.Uwp.UI.Animations
private static void OnDurationChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
- if (IsSupported == false)
+ if (Windows.ApplicationModel.DesignMode.DesignModeEnabled)
{
return;
}
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls.DataGrid.Design/Microsoft.Toolkit.Uwp.UI.Controls.DataGrid.Design.csproj b/Microsoft.Toolkit.Uwp.UI.Controls.DataGrid.Design/Microsoft.Toolkit.Uwp.UI.Controls.DataGrid.Design.csproj
index 2250fc69b..77f8ff582 100644
--- a/Microsoft.Toolkit.Uwp.UI.Controls.DataGrid.Design/Microsoft.Toolkit.Uwp.UI.Controls.DataGrid.Design.csproj
+++ b/Microsoft.Toolkit.Uwp.UI.Controls.DataGrid.Design/Microsoft.Toolkit.Uwp.UI.Controls.DataGrid.Design.csproj
@@ -12,21 +12,21 @@
v4.7.2
512
- $(AssetTargetFallback);uap10.0.16299
+ $(AssetTargetFallback);uap10.0.17763
8.1
true
- ..\Microsoft.Toolkit.Uwp.UI.Controls.DataGrid\bin\Debug\uap10.0.16299\Design\
+ ..\Microsoft.Toolkit.Uwp.UI.Controls.DataGrid\bin\Debug\uap10.0.17763\Design\
full
false
DEBUG;TRACE
x86
- ..\Microsoft.Toolkit.Uwp.UI.Controls.DataGrid\bin\Release\uap10.0.16299\Design\
+ ..\Microsoft.Toolkit.Uwp.UI.Controls.DataGrid\bin\Release\uap10.0.17763\Design\
pdbonly
x86
true
@@ -113,7 +113,7 @@
-
+
Microsoft.Toolkit.Uwp.UI.Controls.DataGrid.xml
Designer
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls.DataGrid/DataGrid/DataGrid.cs b/Microsoft.Toolkit.Uwp.UI.Controls.DataGrid/DataGrid/DataGrid.cs
index 703734b2d..abfe33de4 100644
--- a/Microsoft.Toolkit.Uwp.UI.Controls.DataGrid/DataGrid/DataGrid.cs
+++ b/Microsoft.Toolkit.Uwp.UI.Controls.DataGrid/DataGrid/DataGrid.cs
@@ -5834,7 +5834,7 @@ namespace Microsoft.Toolkit.Uwp.UI.Controls
private void DataGrid_PointerMoved(object sender, PointerRoutedEventArgs e)
{
// Don't process if this is a generated replay of the event.
- if (TypeHelper.IsRS3OrHigher && e.IsGenerated)
+ if (e.IsGenerated)
{
return;
}
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls.DataGrid/DataGrid/DataGrid.xaml b/Microsoft.Toolkit.Uwp.UI.Controls.DataGrid/DataGrid/DataGrid.xaml
index 021cef538..9793d66dd 100644
--- a/Microsoft.Toolkit.Uwp.UI.Controls.DataGrid/DataGrid/DataGrid.xaml
+++ b/Microsoft.Toolkit.Uwp.UI.Controls.DataGrid/DataGrid/DataGrid.xaml
@@ -12,8 +12,6 @@
@@ -335,11 +333,7 @@
-
-
-
-
- uap10.0.16299
+ uap10.0.17763
Windows Community Toolkit Controls DataGrid
This library provides a XAML DataGrid control. It is part of the Windows Community Toolkit.
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls.DataGrid/Utilities/TypeHelper.cs b/Microsoft.Toolkit.Uwp.UI.Controls.DataGrid/Utilities/TypeHelper.cs
index df98d5e16..a1728c350 100644
--- a/Microsoft.Toolkit.Uwp.UI.Controls.DataGrid/Utilities/TypeHelper.cs
+++ b/Microsoft.Toolkit.Uwp.UI.Controls.DataGrid/Utilities/TypeHelper.cs
@@ -19,7 +19,6 @@ namespace Microsoft.Toolkit.Uwp.Utilities
internal const char RightIndexerToken = ']';
private static bool isAPIsAvailableInitialized = false;
- private static bool isRS3OrHigher = false;
private static bool isXamlRootAvailable = false;
// Methods
@@ -459,19 +458,6 @@ namespace Microsoft.Toolkit.Uwp.Utilities
return instance == null ? null : instance.GetType();
}
- internal static bool IsRS3OrHigher
- {
- get
- {
- if (!isAPIsAvailableInitialized)
- {
- InitializeAPIsAvailable();
- }
-
- return isRS3OrHigher;
- }
- }
-
internal static bool IsXamlRootAvailable
{
get
@@ -487,7 +473,6 @@ namespace Microsoft.Toolkit.Uwp.Utilities
internal static void InitializeAPIsAvailable()
{
- isRS3OrHigher = Windows.Foundation.Metadata.ApiInformation.IsApiContractPresent("Windows.Foundation.UniversalApiContract", 5);
isXamlRootAvailable = Windows.Foundation.Metadata.ApiInformation.IsPropertyPresent("Windows.UI.Xaml.UIElement", "XamlRoot");
isAPIsAvailableInitialized = true;
}
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls.Design/Microsoft.Toolkit.Uwp.UI.Controls.Design.csproj b/Microsoft.Toolkit.Uwp.UI.Controls.Design/Microsoft.Toolkit.Uwp.UI.Controls.Design.csproj
index 84484c191..1201d3233 100644
--- a/Microsoft.Toolkit.Uwp.UI.Controls.Design/Microsoft.Toolkit.Uwp.UI.Controls.Design.csproj
+++ b/Microsoft.Toolkit.Uwp.UI.Controls.Design/Microsoft.Toolkit.Uwp.UI.Controls.Design.csproj
@@ -13,21 +13,21 @@
512
$(NoWarn);0618
- $(AssetTargetFallback);uap10.0.16299
+ $(AssetTargetFallback);uap10.0.17763
8.1
true
- ..\Microsoft.Toolkit.Uwp.UI.Controls\bin\Debug\uap10.0.16299\Design\
+ ..\Microsoft.Toolkit.Uwp.UI.Controls\bin\Debug\uap10.0.17763\Design\
full
false
DEBUG;TRACE
x86
- ..\Microsoft.Toolkit.Uwp.UI.Controls\bin\Release\uap10.0.16299\Design\
+ ..\Microsoft.Toolkit.Uwp.UI.Controls\bin\Release\uap10.0.17763\Design\
pdbonly
x86
true
@@ -136,7 +136,7 @@
-
+
Microsoft.Toolkit.Uwp.UI.Controls.xml
Designer
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls.Layout/Microsoft.Toolkit.Uwp.UI.Controls.Layout.csproj b/Microsoft.Toolkit.Uwp.UI.Controls.Layout/Microsoft.Toolkit.Uwp.UI.Controls.Layout.csproj
index b9b96f32d..7496c876c 100644
--- a/Microsoft.Toolkit.Uwp.UI.Controls.Layout/Microsoft.Toolkit.Uwp.UI.Controls.Layout.csproj
+++ b/Microsoft.Toolkit.Uwp.UI.Controls.Layout/Microsoft.Toolkit.Uwp.UI.Controls.Layout.csproj
@@ -1,8 +1,8 @@
- uap10.0.17134
- 10.0.18362.0
+ uap10.0.17763
+ 10.0.19041.0
Windows Community Toolkit Layout
This library provides XAML layout controls. It is part of the Windows Community Toolkit.
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls.Markdown.Design/Microsoft.Toolkit.Uwp.UI.Controls.Markdown.Design.csproj b/Microsoft.Toolkit.Uwp.UI.Controls.Markdown.Design/Microsoft.Toolkit.Uwp.UI.Controls.Markdown.Design.csproj
index a0fee8312..a03aff9ca 100644
--- a/Microsoft.Toolkit.Uwp.UI.Controls.Markdown.Design/Microsoft.Toolkit.Uwp.UI.Controls.Markdown.Design.csproj
+++ b/Microsoft.Toolkit.Uwp.UI.Controls.Markdown.Design/Microsoft.Toolkit.Uwp.UI.Controls.Markdown.Design.csproj
@@ -13,21 +13,21 @@
512
$(NoWarn);0618
- $(AssetTargetFallback);uap10.0.16299
+ $(AssetTargetFallback);uap10.0.17763
8.1
true
- ..\Microsoft.Toolkit.Uwp.UI.Controls.Markdown\bin\Debug\uap10.0.16299\Design\
+ ..\Microsoft.Toolkit.Uwp.UI.Controls.Markdown\bin\Debug\uap10.0.17763\Design\
full
false
DEBUG;TRACE
x86
- ..\Microsoft.Toolkit.Uwp.UI.Controls.Markdown\bin\Release\uap10.0.16299\Design\
+ ..\Microsoft.Toolkit.Uwp.UI.Controls.Markdown\bin\Release\uap10.0.17763\Design\
pdbonly
x86
true
@@ -114,7 +114,7 @@
-
+
Microsoft.Toolkit.Uwp.UI.Controls.Markdown.xml
Designer
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls.Markdown/MarkdownTextBlock/MarkdownTextBlock.Methods.cs b/Microsoft.Toolkit.Uwp.UI.Controls.Markdown/MarkdownTextBlock/MarkdownTextBlock.Methods.cs
index dac3a1817..5066137f8 100644
--- a/Microsoft.Toolkit.Uwp.UI.Controls.Markdown/MarkdownTextBlock/MarkdownTextBlock.Methods.cs
+++ b/Microsoft.Toolkit.Uwp.UI.Controls.Markdown/MarkdownTextBlock/MarkdownTextBlock.Methods.cs
@@ -276,12 +276,9 @@ namespace Microsoft.Toolkit.Uwp.UI.Controls
ImageSource GetImageSource(Uri imageUrl)
{
- if (_isSvgImageSupported)
+ if (Path.GetExtension(imageUrl.AbsolutePath)?.ToLowerInvariant() == ".svg")
{
- if (Path.GetExtension(imageUrl.AbsolutePath)?.ToLowerInvariant() == ".svg")
- {
- return new SvgImageSource(imageUrl);
- }
+ return new SvgImageSource(imageUrl);
}
return new BitmapImage(imageUrl);
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls.Markdown/MarkdownTextBlock/MarkdownTextBlock.Properties.cs b/Microsoft.Toolkit.Uwp.UI.Controls.Markdown/MarkdownTextBlock/MarkdownTextBlock.Properties.cs
index 568df9e1f..5489e350b 100644
--- a/Microsoft.Toolkit.Uwp.UI.Controls.Markdown/MarkdownTextBlock/MarkdownTextBlock.Properties.cs
+++ b/Microsoft.Toolkit.Uwp.UI.Controls.Markdown/MarkdownTextBlock/MarkdownTextBlock.Properties.cs
@@ -7,11 +7,9 @@ using System.Collections.Generic;
using ColorCode.Styling;
using Microsoft.Toolkit.Uwp.UI.Controls.Markdown.Render;
using Microsoft.Toolkit.Uwp.UI.Helpers;
-using Windows.Foundation.Metadata;
using Windows.UI.Text;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
-using Windows.UI.Xaml.Documents;
using Windows.UI.Xaml.Media;
namespace Microsoft.Toolkit.Uwp.UI.Controls
@@ -21,9 +19,6 @@ namespace Microsoft.Toolkit.Uwp.UI.Controls
///
public partial class MarkdownTextBlock
{
- // SvgImageSource was introduced in Creators Update (15063)
- private static readonly bool _isSvgImageSupported = ApiInformation.IsApiContractPresent("Windows.Foundation.UniversalApiContract", 4);
-
// Used to attach the URL to hyperlinks.
private static readonly DependencyProperty HyperlinkUrlProperty =
DependencyProperty.RegisterAttached("HyperlinkUrl", typeof(string), typeof(MarkdownTextBlock), new PropertyMetadata(null));
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls.Markdown/Microsoft.Toolkit.Uwp.UI.Controls.Markdown.csproj b/Microsoft.Toolkit.Uwp.UI.Controls.Markdown/Microsoft.Toolkit.Uwp.UI.Controls.Markdown.csproj
index 9fe9742d1..7fc82cb0b 100644
--- a/Microsoft.Toolkit.Uwp.UI.Controls.Markdown/Microsoft.Toolkit.Uwp.UI.Controls.Markdown.csproj
+++ b/Microsoft.Toolkit.Uwp.UI.Controls.Markdown/Microsoft.Toolkit.Uwp.UI.Controls.Markdown.csproj
@@ -1,6 +1,6 @@
- uap10.0.16299
+ uap10.0.17763
Windows Community Toolkit Controls Markdown
This library provides a XAML MarkdownTextBlock control, an efficient and extensible control that can parse and render markdown. It is part of the Windows Community Toolkit.
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls.Markdown/Render/MarkdownRenderer.Inlines.cs b/Microsoft.Toolkit.Uwp.UI.Controls.Markdown/Render/MarkdownRenderer.Inlines.cs
index e83ea316c..d1c50feab 100644
--- a/Microsoft.Toolkit.Uwp.UI.Controls.Markdown/Render/MarkdownRenderer.Inlines.cs
+++ b/Microsoft.Toolkit.Uwp.UI.Controls.Markdown/Render/MarkdownRenderer.Inlines.cs
@@ -388,14 +388,7 @@ namespace Microsoft.Toolkit.Uwp.UI.Controls.Markdown.Render
Span span = new Span();
- if (TextDecorationsSupported)
- {
- span.TextDecorations = TextDecorations.Strikethrough;
- }
- else
- {
- span.FontFamily = new FontFamily("Consolas");
- }
+ span.TextDecorations = TextDecorations.Strikethrough;
var childContext = new InlineRenderContext(span.Inlines, context)
{
@@ -405,22 +398,6 @@ namespace Microsoft.Toolkit.Uwp.UI.Controls.Markdown.Render
// Render the children into the inline.
RenderInlineChildren(element.Inlines, childContext);
- if (!TextDecorationsSupported)
- {
- AlterChildRuns(span, (parentSpan, run) =>
- {
- var text = run.Text;
- var builder = new StringBuilder(text.Length * 2);
- foreach (var c in text)
- {
- builder.Append((char)0x0336);
- builder.Append(c);
- }
-
- run.Text = builder.ToString();
- });
- }
-
// Add it to the current inlines
localContext.InlineCollection.Add(span);
}
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls.Markdown/Render/MarkdownRenderer.Properties.cs b/Microsoft.Toolkit.Uwp.UI.Controls.Markdown/Render/MarkdownRenderer.Properties.cs
index c4e8a7d38..f90b8b00a 100644
--- a/Microsoft.Toolkit.Uwp.UI.Controls.Markdown/Render/MarkdownRenderer.Properties.cs
+++ b/Microsoft.Toolkit.Uwp.UI.Controls.Markdown/Render/MarkdownRenderer.Properties.cs
@@ -3,7 +3,6 @@
// See the LICENSE file in the project root for more information.
using System.Reflection;
-using Windows.Foundation.Metadata;
using Windows.UI.Text;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
@@ -16,11 +15,6 @@ namespace Microsoft.Toolkit.Uwp.UI.Controls.Markdown.Render
///
public partial class MarkdownRenderer
{
- private static bool? _textDecorationsSupported = null;
-
- private static bool TextDecorationsSupported => (bool)(_textDecorationsSupported ??
- (_textDecorationsSupported = ApiInformation.IsTypePresent("Windows.UI.Text.TextDecorations")));
-
///
/// Super Hack to retain inertia and passing the Scroll data onto the Parent ScrollViewer.
///
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls/CameraPreview/CameraPreview.cs b/Microsoft.Toolkit.Uwp.UI.Controls/CameraPreview/CameraPreview.cs
index 2e02ec4c0..8dec9a4d4 100644
--- a/Microsoft.Toolkit.Uwp.UI.Controls/CameraPreview/CameraPreview.cs
+++ b/Microsoft.Toolkit.Uwp.UI.Controls/CameraPreview/CameraPreview.cs
@@ -145,15 +145,8 @@ namespace Microsoft.Toolkit.Uwp.UI.Controls
};
}
- if (Windows.Foundation.Metadata.ApiInformation.IsMethodPresent("Windows.Media.Core.MediaSource", "CreateFromMediaFrameSource", 1))
- {
- _mediaPlayer.Source = MediaSource.CreateFromMediaFrameSource(frameSource);
- _mediaPlayerElementControl.SetMediaPlayer(_mediaPlayer);
- }
- else
- {
- InvokePreviewFailed("CameraPreview is only supported on the April 2018 Windows 10 Update or later");
- }
+ _mediaPlayer.Source = MediaSource.CreateFromMediaFrameSource(frameSource);
+ _mediaPlayerElementControl.SetMediaPlayer(_mediaPlayer);
}
}
catch (Exception ex)
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls/DropShadowPanel/DropShadowPanel.Properties.cs b/Microsoft.Toolkit.Uwp.UI.Controls/DropShadowPanel/DropShadowPanel.Properties.cs
index 5f76c3667..a29c19e68 100644
--- a/Microsoft.Toolkit.Uwp.UI.Controls/DropShadowPanel/DropShadowPanel.Properties.cs
+++ b/Microsoft.Toolkit.Uwp.UI.Controls/DropShadowPanel/DropShadowPanel.Properties.cs
@@ -2,8 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-using Windows.ApplicationModel;
-using Windows.Foundation.Metadata;
using Windows.UI;
using Windows.UI.Composition;
using Windows.UI.Xaml;
@@ -58,15 +56,6 @@ namespace Microsoft.Toolkit.Uwp.UI.Controls
public static readonly DependencyProperty IsMaskedProperty =
DependencyProperty.Register(nameof(IsMasked), typeof(bool), typeof(DropShadowPanel), new PropertyMetadata(true, OnIsMaskedChanged));
- ///
- /// Gets a value indicating whether the platform supports drop shadows.
- ///
- ///
- /// On platforms not supporting drop shadows, this control has no effect.
- ///
- public static bool IsSupported =>
- (!DesignTimeHelpers.IsRunningInLegacyDesignerMode) && ApiInformation.IsTypePresent("Windows.UI.Composition.DropShadow"); // SDK >= 14393
-
///
/// Gets DropShadow. Exposes the underlying composition object to allow custom Windows.UI.Composition animations.
///
@@ -202,7 +191,7 @@ namespace Microsoft.Toolkit.Uwp.UI.Controls
private static void OnBlurRadiusChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
- if (IsSupported && d is DropShadowPanel panel)
+ if (!DesignTimeHelpers.IsRunningInLegacyDesignerMode && d is DropShadowPanel panel)
{
panel.OnBlurRadiusChanged((double)e.NewValue);
}
@@ -210,7 +199,7 @@ namespace Microsoft.Toolkit.Uwp.UI.Controls
private static void OnColorChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
- if (IsSupported && d is DropShadowPanel panel)
+ if (!DesignTimeHelpers.IsRunningInLegacyDesignerMode && d is DropShadowPanel panel)
{
panel.OnColorChanged((Color)e.NewValue);
}
@@ -218,7 +207,7 @@ namespace Microsoft.Toolkit.Uwp.UI.Controls
private static void OnOffsetXChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
- if (IsSupported && d is DropShadowPanel panel)
+ if (!DesignTimeHelpers.IsRunningInLegacyDesignerMode && d is DropShadowPanel panel)
{
panel.OnOffsetXChanged((double)e.NewValue);
}
@@ -226,7 +215,7 @@ namespace Microsoft.Toolkit.Uwp.UI.Controls
private static void OnOffsetYChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
- if (IsSupported && d is DropShadowPanel panel)
+ if (!DesignTimeHelpers.IsRunningInLegacyDesignerMode && d is DropShadowPanel panel)
{
panel.OnOffsetYChanged((double)e.NewValue);
}
@@ -234,7 +223,7 @@ namespace Microsoft.Toolkit.Uwp.UI.Controls
private static void OnOffsetZChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
- if (IsSupported && d is DropShadowPanel panel)
+ if (!DesignTimeHelpers.IsRunningInLegacyDesignerMode && d is DropShadowPanel panel)
{
panel.OnOffsetZChanged((double)e.NewValue);
}
@@ -242,7 +231,7 @@ namespace Microsoft.Toolkit.Uwp.UI.Controls
private static void OnShadowOpacityChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
- if (IsSupported && d is DropShadowPanel panel)
+ if (!DesignTimeHelpers.IsRunningInLegacyDesignerMode && d is DropShadowPanel panel)
{
panel.OnShadowOpacityChanged((double)e.NewValue);
}
@@ -250,7 +239,7 @@ namespace Microsoft.Toolkit.Uwp.UI.Controls
private static void OnIsMaskedChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
- if (IsSupported && d is DropShadowPanel panel)
+ if (!DesignTimeHelpers.IsRunningInLegacyDesignerMode && d is DropShadowPanel panel)
{
panel.UpdateShadowMask();
}
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls/DropShadowPanel/DropShadowPanel.cs b/Microsoft.Toolkit.Uwp.UI.Controls/DropShadowPanel/DropShadowPanel.cs
index 9178516e5..3e189f4d8 100644
--- a/Microsoft.Toolkit.Uwp.UI.Controls/DropShadowPanel/DropShadowPanel.cs
+++ b/Microsoft.Toolkit.Uwp.UI.Controls/DropShadowPanel/DropShadowPanel.cs
@@ -34,7 +34,7 @@ namespace Microsoft.Toolkit.Uwp.UI.Controls
{
this.DefaultStyleKey = typeof(DropShadowPanel);
- if (IsSupported)
+ if (!DesignTimeHelpers.IsRunningInLegacyDesignerMode)
{
Compositor compositor = ElementCompositionPreview.GetElementVisual(this).Compositor;
@@ -50,7 +50,7 @@ namespace Microsoft.Toolkit.Uwp.UI.Controls
///
protected override void OnApplyTemplate()
{
- if (!IsSupported)
+ if (DesignTimeHelpers.IsRunningInLegacyDesignerMode)
{
return;
}
@@ -93,7 +93,7 @@ namespace Microsoft.Toolkit.Uwp.UI.Controls
private void OnSizeChanged(object sender, SizeChangedEventArgs e)
{
- if (IsSupported)
+ if (!DesignTimeHelpers.IsRunningInLegacyDesignerMode)
{
UpdateShadowSize();
}
@@ -103,7 +103,7 @@ namespace Microsoft.Toolkit.Uwp.UI.Controls
{
UpdateShadowMask();
- if (IsSupported)
+ if (!DesignTimeHelpers.IsRunningInLegacyDesignerMode)
{
UpdateShadowSize();
}
@@ -127,7 +127,7 @@ namespace Microsoft.Toolkit.Uwp.UI.Controls
private void OnOffsetXChanged(double newValue)
{
- if (IsSupported && _dropShadow != null)
+ if (!DesignTimeHelpers.IsRunningInLegacyDesignerMode && _dropShadow != null)
{
UpdateShadowOffset((float)newValue, _dropShadow.Offset.Y, _dropShadow.Offset.Z);
}
@@ -135,7 +135,7 @@ namespace Microsoft.Toolkit.Uwp.UI.Controls
private void OnOffsetYChanged(double newValue)
{
- if (IsSupported && _dropShadow != null)
+ if (!DesignTimeHelpers.IsRunningInLegacyDesignerMode && _dropShadow != null)
{
UpdateShadowOffset(_dropShadow.Offset.X, (float)newValue, _dropShadow.Offset.Z);
}
@@ -143,7 +143,7 @@ namespace Microsoft.Toolkit.Uwp.UI.Controls
private void OnOffsetZChanged(double newValue)
{
- if (IsSupported && _dropShadow != null)
+ if (!DesignTimeHelpers.IsRunningInLegacyDesignerMode && _dropShadow != null)
{
UpdateShadowOffset(_dropShadow.Offset.X, _dropShadow.Offset.Y, (float)newValue);
}
@@ -159,7 +159,7 @@ namespace Microsoft.Toolkit.Uwp.UI.Controls
private void UpdateShadowMask()
{
- if (!IsSupported)
+ if (DesignTimeHelpers.IsRunningInLegacyDesignerMode)
{
return;
}
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls/ImageEx/ImageExBase.Members.cs b/Microsoft.Toolkit.Uwp.UI.Controls/ImageEx/ImageExBase.Members.cs
index a472dae24..a32c1f936 100644
--- a/Microsoft.Toolkit.Uwp.UI.Controls/ImageEx/ImageExBase.Members.cs
+++ b/Microsoft.Toolkit.Uwp.UI.Controls/ImageEx/ImageExBase.Members.cs
@@ -3,7 +3,6 @@
// See the LICENSE file in the project root for more information.
using System;
-using Windows.Foundation.Metadata;
using Windows.UI.Composition;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Media;
@@ -56,11 +55,6 @@ namespace Microsoft.Toolkit.Uwp.UI.Controls
///
public static readonly DependencyProperty EnableLazyLoadingProperty = DependencyProperty.Register(nameof(EnableLazyLoading), typeof(bool), typeof(ImageExBase), new PropertyMetadata(false));
- ///
- /// Gets a value indicating whether is supported
- ///
- public static bool IsLazyLoadingSupported { get; } = ApiInformation.IsEventPresent("Windows.UI.Xaml.FrameworkElement", nameof(EffectiveViewportChanged));
-
///
/// Returns a mask that represents the alpha channel of an image as a
///
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls/ImageEx/ImageExBase.Source.cs b/Microsoft.Toolkit.Uwp.UI.Controls/ImageEx/ImageExBase.Source.cs
index 41acbb865..2b13c6811 100644
--- a/Microsoft.Toolkit.Uwp.UI.Controls/ImageEx/ImageExBase.Source.cs
+++ b/Microsoft.Toolkit.Uwp.UI.Controls/ImageEx/ImageExBase.Source.cs
@@ -49,21 +49,14 @@ namespace Microsoft.Toolkit.Uwp.UI.Controls
if (e.OldValue == null || e.NewValue == null || !e.OldValue.Equals(e.NewValue))
{
- if (IsLazyLoadingSupported)
+ if (e.NewValue == null || !control.EnableLazyLoading || control._isInViewport)
{
- if (e.NewValue == null || !control.EnableLazyLoading || control._isInViewport)
- {
- control._lazyLoadingSource = null;
- control.SetSource(e.NewValue);
- }
- else
- {
- control._lazyLoadingSource = e.NewValue;
- }
+ control._lazyLoadingSource = null;
+ control.SetSource(e.NewValue);
}
else
{
- control.SetSource(e.NewValue);
+ control._lazyLoadingSource = e.NewValue;
}
}
}
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls/ImageEx/ImageExBase.cs b/Microsoft.Toolkit.Uwp.UI.Controls/ImageEx/ImageExBase.cs
index 80c2e695f..a62f6bffa 100644
--- a/Microsoft.Toolkit.Uwp.UI.Controls/ImageEx/ImageExBase.cs
+++ b/Microsoft.Toolkit.Uwp.UI.Controls/ImageEx/ImageExBase.cs
@@ -80,10 +80,7 @@ namespace Microsoft.Toolkit.Uwp.UI.Controls
{
LockObj = new object();
- if (IsLazyLoadingSupported)
- {
- EffectiveViewportChanged += ImageExBase_EffectiveViewportChanged;
- }
+ EffectiveViewportChanged += ImageExBase_EffectiveViewportChanged;
}
///
@@ -177,21 +174,14 @@ namespace Microsoft.Toolkit.Uwp.UI.Controls
ImageExInitialized?.Invoke(this, EventArgs.Empty);
- if (IsLazyLoadingSupported)
+ if (Source == null || !EnableLazyLoading || _isInViewport)
{
- if (Source == null || !EnableLazyLoading || _isInViewport)
- {
- _lazyLoadingSource = null;
- SetSource(Source);
- }
- else
- {
- _lazyLoadingSource = Source;
- }
+ _lazyLoadingSource = null;
+ SetSource(Source);
}
else
{
- SetSource(Source);
+ _lazyLoadingSource = Source;
}
AttachImageOpened(OnImageOpened);
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls/InAppNotification/InAppNotification.xaml b/Microsoft.Toolkit.Uwp.UI.Controls/InAppNotification/InAppNotification.xaml
index 5277f9b09..b345dc7ba 100644
--- a/Microsoft.Toolkit.Uwp.UI.Controls/InAppNotification/InAppNotification.xaml
+++ b/Microsoft.Toolkit.Uwp.UI.Controls/InAppNotification/InAppNotification.xaml
@@ -1,7 +1,5 @@
@@ -35,13 +33,8 @@
-
-
-
-
-
-
+
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls/Menu/Menu.xaml b/Microsoft.Toolkit.Uwp.UI.Controls/Menu/Menu.xaml
index 221644775..e28da50ce 100644
--- a/Microsoft.Toolkit.Uwp.UI.Controls/Menu/Menu.xaml
+++ b/Microsoft.Toolkit.Uwp.UI.Controls/Menu/Menu.xaml
@@ -1,9 +1,7 @@
+ xmlns:local="using:Microsoft.Toolkit.Uwp.UI.Controls">
@@ -11,8 +9,7 @@
-
-
- uap10.0.16299
+ uap10.0.17763
Windows Community Toolkit Controls
This library provides XAML templated controls. It is part of the Windows Community Toolkit.
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls/TileControl/TileControl.cs b/Microsoft.Toolkit.Uwp.UI.Controls/TileControl/TileControl.cs
index cdc4af642..00912da89 100644
--- a/Microsoft.Toolkit.Uwp.UI.Controls/TileControl/TileControl.cs
+++ b/Microsoft.Toolkit.Uwp.UI.Controls/TileControl/TileControl.cs
@@ -13,13 +13,11 @@ namespace Microsoft.Toolkit.Uwp.UI.Controls
using Microsoft.Toolkit.Uwp.UI.Animations.Expressions;
using Microsoft.Toolkit.Uwp.UI.Extensions;
using Windows.Foundation;
- using Windows.Foundation.Metadata;
using Windows.UI.Composition;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Hosting;
using Windows.UI.Xaml.Media;
- using Windows.UI.Xaml.Shapes;
///
/// Orientation of the scroll
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls/TokenizingTextBox/TokenizingTextBoxItem.AutoSuggestBox.xaml b/Microsoft.Toolkit.Uwp.UI.Controls/TokenizingTextBox/TokenizingTextBoxItem.AutoSuggestBox.xaml
index 61506d754..ab242e8c6 100644
--- a/Microsoft.Toolkit.Uwp.UI.Controls/TokenizingTextBox/TokenizingTextBoxItem.AutoSuggestBox.xaml
+++ b/Microsoft.Toolkit.Uwp.UI.Controls/TokenizingTextBox/TokenizingTextBoxItem.AutoSuggestBox.xaml
@@ -314,7 +314,7 @@
-
+