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 7fc82cb0be3..ede2fce9ac4 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
@@ -46,4 +46,20 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/SmokeTests/App.xaml b/SmokeTests/App.xaml
new file mode 100644
index 00000000000..7270ce6e109
--- /dev/null
+++ b/SmokeTests/App.xaml
@@ -0,0 +1,7 @@
+
+
+
diff --git a/SmokeTests/App.xaml.cs b/SmokeTests/App.xaml.cs
new file mode 100644
index 00000000000..2b5b157eca0
--- /dev/null
+++ b/SmokeTests/App.xaml.cs
@@ -0,0 +1,106 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Runtime.InteropServices.WindowsRuntime;
+using Windows.ApplicationModel;
+using Windows.ApplicationModel.Activation;
+using Windows.Foundation;
+using Windows.Foundation.Collections;
+using Windows.UI.Xaml;
+using Windows.UI.Xaml.Controls;
+using Windows.UI.Xaml.Controls.Primitives;
+using Windows.UI.Xaml.Data;
+using Windows.UI.Xaml.Input;
+using Windows.UI.Xaml.Media;
+using Windows.UI.Xaml.Navigation;
+
+namespace SmokeTest
+{
+ ///
+ /// Provides application-specific behavior to supplement the default Application class.
+ ///
+ public sealed partial class App : Application
+ {
+ ///
+ /// Initializes the singleton application object. This is the first line of authored code
+ /// executed, and as such is the logical equivalent of main() or WinMain().
+ ///
+ public App()
+ {
+ this.InitializeComponent();
+ this.Suspending += OnSuspending;
+ }
+
+ ///
+ /// Invoked when the application is launched normally by the end user. Other entry points
+ /// will be used such as when the application is launched to open a specific file.
+ ///
+ /// Details about the launch request and process.
+ protected override void OnLaunched(LaunchActivatedEventArgs e)
+ {
+ Frame rootFrame = Window.Current.Content as Frame;
+
+ // Do not repeat app initialization when the Window already has content,
+ // just ensure that the window is active
+ if (rootFrame == null)
+ {
+ // Create a Frame to act as the navigation context and navigate to the first page
+ rootFrame = new Frame();
+
+ rootFrame.NavigationFailed += OnNavigationFailed;
+
+ if (e.PreviousExecutionState == ApplicationExecutionState.Terminated)
+ {
+ // TODO: Load state from previously suspended application
+ }
+
+ // Place the frame in the current Window
+ Window.Current.Content = rootFrame;
+ }
+
+ if (e.PrelaunchActivated == false)
+ {
+ if (rootFrame.Content == null)
+ {
+ // When the navigation stack isn't restored navigate to the first page,
+ // configuring the new page by passing required information as a navigation
+ // parameter
+ rootFrame.Navigate(typeof(MainPage), e.Arguments);
+ }
+
+ // Ensure the current window is active
+ Window.Current.Activate();
+ }
+ }
+
+ ///
+ /// Invoked when Navigation to a certain page fails
+ ///
+ /// The Frame which failed navigation
+ /// Details about the navigation failure
+ private void OnNavigationFailed(object sender, NavigationFailedEventArgs e)
+ {
+ throw new Exception("Failed to load Page " + e.SourcePageType.FullName);
+ }
+
+ ///
+ /// Invoked when application execution is being suspended. Application state is saved
+ /// without knowing whether the application will be terminated or resumed with the contents
+ /// of memory still intact.
+ ///
+ /// The source of the suspend request.
+ /// Details about the suspend request.
+ private void OnSuspending(object sender, SuspendingEventArgs e)
+ {
+ var deferral = e.SuspendingOperation.GetDeferral();
+
+ // TODO: Save application state and stop any background activity
+ deferral.Complete();
+ }
+ }
+}
diff --git a/SmokeTests/Assets/LockScreenLogo.scale-200.png b/SmokeTests/Assets/LockScreenLogo.scale-200.png
new file mode 100644
index 00000000000..735f57adb5d
Binary files /dev/null and b/SmokeTests/Assets/LockScreenLogo.scale-200.png differ
diff --git a/SmokeTests/Assets/SplashScreen.scale-200.png b/SmokeTests/Assets/SplashScreen.scale-200.png
new file mode 100644
index 00000000000..023e7f1feda
Binary files /dev/null and b/SmokeTests/Assets/SplashScreen.scale-200.png differ
diff --git a/SmokeTests/Assets/Square150x150Logo.scale-200.png b/SmokeTests/Assets/Square150x150Logo.scale-200.png
new file mode 100644
index 00000000000..af49fec1a54
Binary files /dev/null and b/SmokeTests/Assets/Square150x150Logo.scale-200.png differ
diff --git a/SmokeTests/Assets/Square44x44Logo.scale-200.png b/SmokeTests/Assets/Square44x44Logo.scale-200.png
new file mode 100644
index 00000000000..ce342a2ec8a
Binary files /dev/null and b/SmokeTests/Assets/Square44x44Logo.scale-200.png differ
diff --git a/SmokeTests/Assets/Square44x44Logo.targetsize-24_altform-unplated.png b/SmokeTests/Assets/Square44x44Logo.targetsize-24_altform-unplated.png
new file mode 100644
index 00000000000..f6c02ce97e0
Binary files /dev/null and b/SmokeTests/Assets/Square44x44Logo.targetsize-24_altform-unplated.png differ
diff --git a/SmokeTests/Assets/StoreLogo.png b/SmokeTests/Assets/StoreLogo.png
new file mode 100644
index 00000000000..7385b56c0e4
Binary files /dev/null and b/SmokeTests/Assets/StoreLogo.png differ
diff --git a/SmokeTests/Assets/Wide310x150Logo.scale-200.png b/SmokeTests/Assets/Wide310x150Logo.scale-200.png
new file mode 100644
index 00000000000..288995b397f
Binary files /dev/null and b/SmokeTests/Assets/Wide310x150Logo.scale-200.png differ
diff --git a/SmokeTests/Microsoft.Toolkit.HighPerformance/MainPage.xaml b/SmokeTests/Microsoft.Toolkit.HighPerformance/MainPage.xaml
new file mode 100644
index 00000000000..93e3da28729
--- /dev/null
+++ b/SmokeTests/Microsoft.Toolkit.HighPerformance/MainPage.xaml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
diff --git a/SmokeTests/Microsoft.Toolkit.HighPerformance/MainPage.xaml.cs b/SmokeTests/Microsoft.Toolkit.HighPerformance/MainPage.xaml.cs
new file mode 100644
index 00000000000..59b8503fb57
--- /dev/null
+++ b/SmokeTests/Microsoft.Toolkit.HighPerformance/MainPage.xaml.cs
@@ -0,0 +1,23 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// 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.HighPerformance.Helpers;
+
+namespace SmokeTest
+{
+ public sealed partial class MainPage
+ {
+ public MainPage()
+ {
+ InitializeComponent();
+ }
+
+ private void Button_Click(object sender, Windows.UI.Xaml.RoutedEventArgs e)
+ {
+ const uint value = 0xAAAA5555u;
+
+ textBlock.Text = BitHelper.HasLookupFlag(value, 0).ToString();
+ }
+ }
+}
diff --git a/SmokeTests/Microsoft.Toolkit.Mvvm/MainPage.xaml b/SmokeTests/Microsoft.Toolkit.Mvvm/MainPage.xaml
new file mode 100644
index 00000000000..32be0d468df
--- /dev/null
+++ b/SmokeTests/Microsoft.Toolkit.Mvvm/MainPage.xaml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
diff --git a/SmokeTests/Microsoft.Toolkit.Mvvm/MainPage.xaml.cs b/SmokeTests/Microsoft.Toolkit.Mvvm/MainPage.xaml.cs
new file mode 100644
index 00000000000..c410705c539
--- /dev/null
+++ b/SmokeTests/Microsoft.Toolkit.Mvvm/MainPage.xaml.cs
@@ -0,0 +1,25 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// 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.Mvvm.Input;
+
+namespace SmokeTest
+{
+ public sealed partial class MainPage
+ {
+ public RelayCommand TestCommand { get; }
+
+ public MainPage()
+ {
+ TestCommand = new RelayCommand(ExecuteRelayCommand);
+
+ InitializeComponent();
+ }
+
+ private void ExecuteRelayCommand()
+ {
+ textBlock.Text = "Clicked";
+ }
+ }
+}
diff --git a/SmokeTests/Microsoft.Toolkit.Parsers/MainPage.xaml b/SmokeTests/Microsoft.Toolkit.Parsers/MainPage.xaml
new file mode 100644
index 00000000000..66720038a08
--- /dev/null
+++ b/SmokeTests/Microsoft.Toolkit.Parsers/MainPage.xaml
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/SmokeTests/Microsoft.Toolkit.Parsers/MainPage.xaml.cs b/SmokeTests/Microsoft.Toolkit.Parsers/MainPage.xaml.cs
new file mode 100644
index 00000000000..353892f6782
--- /dev/null
+++ b/SmokeTests/Microsoft.Toolkit.Parsers/MainPage.xaml.cs
@@ -0,0 +1,37 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// 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.Parsers.Markdown;
+using Windows.UI.Xaml.Controls;
+
+namespace SmokeTest
+{
+ public sealed partial class MainPage
+ {
+ public MainPage()
+ {
+ InitializeComponent();
+
+ Loaded += MarkdownParserPage_Loaded;
+ }
+
+ private void MarkdownParserPage_Loaded(object sender, Windows.UI.Xaml.RoutedEventArgs e)
+ {
+ UpdateMDResult();
+ }
+
+ private void RawMarkdown_TextChanged(object sender, TextChangedEventArgs e)
+ {
+ UpdateMDResult();
+ }
+
+ private void UpdateMDResult()
+ {
+ var document = new MarkdownDocument();
+ document.Parse(RawMarkdown.Text);
+
+ MarkdownResult.Text = $"Root type is: {document.Type.ToString()}";
+ }
+ }
+}
diff --git a/SmokeTests/Microsoft.Toolkit.Services/MainPage.xaml b/SmokeTests/Microsoft.Toolkit.Services/MainPage.xaml
new file mode 100644
index 00000000000..60770b69d53
--- /dev/null
+++ b/SmokeTests/Microsoft.Toolkit.Services/MainPage.xaml
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+
+
diff --git a/SmokeTests/Microsoft.Toolkit.Services/MainPage.xaml.cs b/SmokeTests/Microsoft.Toolkit.Services/MainPage.xaml.cs
new file mode 100644
index 00000000000..2b3e1475ebb
--- /dev/null
+++ b/SmokeTests/Microsoft.Toolkit.Services/MainPage.xaml.cs
@@ -0,0 +1,29 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+using System;
+using Microsoft.Toolkit.Services.Twitter;
+
+namespace SmokeTest
+{
+ public sealed partial class MainPage
+ {
+ public MainPage()
+ {
+ InitializeComponent();
+ }
+
+ private void ConnectButton_OnClick(object sender, Windows.UI.Xaml.RoutedEventArgs e)
+ {
+ try
+ {
+ TwitterService.Instance.Initialize(string.Empty, string.Empty, string.Empty);
+ }
+ catch (Exception ex)
+ {
+ textBlock.Text = ex.ToString();
+ }
+ }
+ }
+}
diff --git a/SmokeTests/Microsoft.Toolkit.Uwp.Connectivity/MainPage.xaml b/SmokeTests/Microsoft.Toolkit.Uwp.Connectivity/MainPage.xaml
new file mode 100644
index 00000000000..587cbfb5b5c
--- /dev/null
+++ b/SmokeTests/Microsoft.Toolkit.Uwp.Connectivity/MainPage.xaml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
diff --git a/SmokeTests/Microsoft.Toolkit.Uwp.Connectivity/MainPage.xaml.cs b/SmokeTests/Microsoft.Toolkit.Uwp.Connectivity/MainPage.xaml.cs
new file mode 100644
index 00000000000..6b3923de2ea
--- /dev/null
+++ b/SmokeTests/Microsoft.Toolkit.Uwp.Connectivity/MainPage.xaml.cs
@@ -0,0 +1,21 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// 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.Connectivity;
+
+namespace SmokeTest
+{
+ public sealed partial class MainPage
+ {
+ public MainPage()
+ {
+ InitializeComponent();
+ }
+
+ private void Button_Click(object sender, Windows.UI.Xaml.RoutedEventArgs e)
+ {
+ textBlock.Text = NetworkHelper.Instance.ConnectionInformation.IsInternetAvailable.ToString();
+ }
+ }
+}
diff --git a/SmokeTests/Microsoft.Toolkit.Uwp.DeveloperTools/MainPage.xaml b/SmokeTests/Microsoft.Toolkit.Uwp.DeveloperTools/MainPage.xaml
new file mode 100644
index 00000000000..51879b465d6
--- /dev/null
+++ b/SmokeTests/Microsoft.Toolkit.Uwp.DeveloperTools/MainPage.xaml
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/SmokeTests/Microsoft.Toolkit.Uwp.DeveloperTools/MainPage.xaml.cs b/SmokeTests/Microsoft.Toolkit.Uwp.DeveloperTools/MainPage.xaml.cs
new file mode 100644
index 00000000000..65e09322217
--- /dev/null
+++ b/SmokeTests/Microsoft.Toolkit.Uwp.DeveloperTools/MainPage.xaml.cs
@@ -0,0 +1,14 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+namespace SmokeTest
+{
+ public sealed partial class MainPage
+ {
+ public MainPage()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/SmokeTests/Microsoft.Toolkit.Uwp.Input.GazeInteraction/MainPage.xaml b/SmokeTests/Microsoft.Toolkit.Uwp.Input.GazeInteraction/MainPage.xaml
new file mode 100644
index 00000000000..2bae73064fe
--- /dev/null
+++ b/SmokeTests/Microsoft.Toolkit.Uwp.Input.GazeInteraction/MainPage.xaml
@@ -0,0 +1,35 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/SmokeTests/Microsoft.Toolkit.Uwp.Input.GazeInteraction/MainPage.xaml.cs b/SmokeTests/Microsoft.Toolkit.Uwp.Input.GazeInteraction/MainPage.xaml.cs
new file mode 100644
index 00000000000..b0463bab15f
--- /dev/null
+++ b/SmokeTests/Microsoft.Toolkit.Uwp.Input.GazeInteraction/MainPage.xaml.cs
@@ -0,0 +1,67 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+using System.Collections.ObjectModel;
+using Windows.Devices.Input.Preview;
+using Windows.Foundation;
+using Windows.UI.Xaml;
+using Windows.UI.Xaml.Controls;
+
+namespace SmokeTest
+{
+ public sealed partial class MainPage
+ {
+ private GazeInputSourcePreview gazeInputSourcePreview;
+
+ public ObservableCollection GazeHistory { get; } = new ObservableCollection();
+
+ public int TracePointDiameter { get; set; }
+
+ public int MaxGazeHistorySize { get; set; }
+
+ public bool ShowIntermediatePoints { get; set; }
+
+ public MainPage()
+ {
+ InitializeComponent();
+
+ ShowIntermediatePoints = false;
+ MaxGazeHistorySize = 100;
+
+ gazeInputSourcePreview = GazeInputSourcePreview.GetForCurrentView();
+ gazeInputSourcePreview.GazeMoved += GazeInputSourcePreview_GazeMoved;
+ }
+
+ private void UpdateGazeHistory(GazePointPreview pt)
+ {
+ if (!pt.EyeGazePosition.HasValue)
+ {
+ return;
+ }
+
+ var transform = (Window.Current.Content as Frame).TransformToVisual(this);
+ var point = transform.TransformPoint(pt.EyeGazePosition.Value);
+ GazeHistory.Add(point);
+ if (GazeHistory.Count > MaxGazeHistorySize)
+ {
+ GazeHistory.RemoveAt(0);
+ }
+ }
+
+ private void GazeInputSourcePreview_GazeMoved(GazeInputSourcePreview sender, GazeMovedPreviewEventArgs args)
+ {
+ if (!ShowIntermediatePoints)
+ {
+ UpdateGazeHistory(args.CurrentPoint);
+ return;
+ }
+
+ var points = args.GetIntermediatePoints();
+ foreach (var pt in points)
+ {
+ UpdateGazeHistory(pt);
+ }
+ }
+ }
+}
diff --git a/SmokeTests/Microsoft.Toolkit.Uwp.Notifications/MainPage.xaml b/SmokeTests/Microsoft.Toolkit.Uwp.Notifications/MainPage.xaml
new file mode 100644
index 00000000000..c8cf83782fc
--- /dev/null
+++ b/SmokeTests/Microsoft.Toolkit.Uwp.Notifications/MainPage.xaml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
diff --git a/SmokeTests/Microsoft.Toolkit.Uwp.Notifications/MainPage.xaml.cs b/SmokeTests/Microsoft.Toolkit.Uwp.Notifications/MainPage.xaml.cs
new file mode 100644
index 00000000000..f331fc0074f
--- /dev/null
+++ b/SmokeTests/Microsoft.Toolkit.Uwp.Notifications/MainPage.xaml.cs
@@ -0,0 +1,44 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// 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.Notifications;
+using Windows.UI.Notifications;
+
+namespace SmokeTest
+{
+ public sealed partial class MainPage
+ {
+ public MainPage()
+ {
+ InitializeComponent();
+ }
+
+ private void Button_Click(object sender, Windows.UI.Xaml.RoutedEventArgs e)
+ {
+ ToastContent content = GenerateToastContent();
+ ToastNotificationManager.CreateToastNotifier().Show(new ToastNotification(content.GetXml()));
+ }
+
+ public static ToastContent GenerateToastContent()
+ {
+ var builder = new ToastContentBuilder().SetToastScenario(ToastScenario.Reminder)
+ .AddToastActivationInfo("action=viewEvent&eventId=1983", ToastActivationType.Foreground)
+ .AddText("Adaptive Tiles Meeting")
+ .AddText("Conf Room 2001 / Building 135")
+ .AddText("10:00 AM - 10:30 AM")
+ .AddComboBox(
+ "snoozeTime",
+ "15",
+ ("1", "1 minute"),
+ ("15", "15 minutes"),
+ ("60", "1 hour"),
+ ("240", "4 hours"),
+ ("1440", "1 day"))
+ .AddButton(new ToastButtonSnooze() { SelectionBoxId = "snoozeTime" })
+ .AddButton(new ToastButtonDismiss());
+
+ return builder.Content;
+ }
+ }
+}
diff --git a/SmokeTests/Microsoft.Toolkit.Uwp.UI.Animations/MainPage.xaml b/SmokeTests/Microsoft.Toolkit.Uwp.UI.Animations/MainPage.xaml
new file mode 100644
index 00000000000..3a218c300f1
--- /dev/null
+++ b/SmokeTests/Microsoft.Toolkit.Uwp.UI.Animations/MainPage.xaml
@@ -0,0 +1,49 @@
+
+
+
+
+
+
+
+
diff --git a/SmokeTests/Microsoft.Toolkit.Uwp.UI.Animations/MainPage.xaml.cs b/SmokeTests/Microsoft.Toolkit.Uwp.UI.Animations/MainPage.xaml.cs
new file mode 100644
index 00000000000..63bc98ac0a2
--- /dev/null
+++ b/SmokeTests/Microsoft.Toolkit.Uwp.UI.Animations/MainPage.xaml.cs
@@ -0,0 +1,25 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+using System;
+using Windows.UI.Xaml.Controls;
+
+namespace SmokeTest
+{
+ public sealed partial class MainPage
+ {
+ private Random _random = new Random();
+
+ public MainPage()
+ {
+ InitializeComponent();
+ }
+
+ private void Button_Click(object sender, Windows.UI.Xaml.RoutedEventArgs e)
+ {
+ Canvas.SetTop(Element, _random.NextDouble() * this.ActualHeight);
+ Canvas.SetLeft(Element, _random.NextDouble() * this.ActualWidth);
+ }
+ }
+}
diff --git a/SmokeTests/Microsoft.Toolkit.Uwp.UI.Controls.DataGrid/MainPage.xaml b/SmokeTests/Microsoft.Toolkit.Uwp.UI.Controls.DataGrid/MainPage.xaml
new file mode 100644
index 00000000000..a398c7279bf
--- /dev/null
+++ b/SmokeTests/Microsoft.Toolkit.Uwp.UI.Controls.DataGrid/MainPage.xaml
@@ -0,0 +1,97 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/SmokeTests/Microsoft.Toolkit.Uwp.UI.Controls.DataGrid/MainPage.xaml.cs b/SmokeTests/Microsoft.Toolkit.Uwp.UI.Controls.DataGrid/MainPage.xaml.cs
new file mode 100644
index 00000000000..94684b0bb5f
--- /dev/null
+++ b/SmokeTests/Microsoft.Toolkit.Uwp.UI.Controls.DataGrid/MainPage.xaml.cs
@@ -0,0 +1,499 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ComponentModel;
+using System.IO;
+using System.Linq;
+using Microsoft.Toolkit.Uwp.UI.Controls;
+using Windows.UI.Xaml.Data;
+
+namespace SmokeTest
+{
+ public sealed partial class MainPage
+ {
+ private DataGridDataSource viewModel = new DataGridDataSource();
+
+ public MainPage()
+ {
+ InitializeComponent();
+
+ dataGrid.ItemsSource = viewModel.GetData();
+ }
+
+ private void DataGrid_Sorting(object sender, Microsoft.Toolkit.Uwp.UI.Controls.DataGridColumnEventArgs e)
+ {
+ // Clear previous sorted column if we start sorting a different column
+ string previousSortedColumn = viewModel.CachedSortedColumn;
+ if (previousSortedColumn != string.Empty)
+ {
+ foreach (DataGridColumn dataGridColumn in dataGrid.Columns)
+ {
+ if (dataGridColumn.Tag != null && dataGridColumn.Tag.ToString() == previousSortedColumn &&
+ (e.Column.Tag == null || previousSortedColumn != e.Column.Tag.ToString()))
+ {
+ dataGridColumn.SortDirection = null;
+ }
+ }
+ }
+
+ // Toggle clicked column's sorting method
+ if (e.Column.Tag != null)
+ {
+ if (e.Column.SortDirection == null)
+ {
+ dataGrid.ItemsSource = viewModel.SortData(e.Column.Tag.ToString(), true);
+ e.Column.SortDirection = DataGridSortDirection.Ascending;
+ }
+ else if (e.Column.SortDirection == DataGridSortDirection.Ascending)
+ {
+ dataGrid.ItemsSource = viewModel.SortData(e.Column.Tag.ToString(), false);
+ e.Column.SortDirection = DataGridSortDirection.Descending;
+ }
+ else
+ {
+ dataGrid.ItemsSource = viewModel.FilterData(DataGridDataSource.FilterOptions.All);
+ e.Column.SortDirection = null;
+ }
+ }
+ }
+
+ private void DataGrid_LoadingRowGroup(object sender, DataGridRowGroupHeaderEventArgs e)
+ {
+ ICollectionViewGroup group = e.RowGroupHeader.CollectionViewGroup;
+ DataGridDataItem item = group.GroupItems[0] as DataGridDataItem;
+ e.RowGroupHeader.PropertyValue = item.Range;
+ }
+ }
+
+ public class DataGridDataItem : INotifyDataErrorInfo, IComparable
+ {
+ private Dictionary> _errors = new Dictionary>();
+ private uint _rank;
+ private string _mountain;
+ private uint _height;
+ private string _range;
+ private string _parentMountain;
+
+ public event EventHandler ErrorsChanged;
+
+ public uint Rank
+ {
+ get
+ {
+ return _rank;
+ }
+
+ set
+ {
+ if (_rank != value)
+ {
+ _rank = value;
+ }
+ }
+ }
+
+ public string Mountain
+ {
+ get
+ {
+ return _mountain;
+ }
+
+ set
+ {
+ if (_mountain != value)
+ {
+ _mountain = value;
+
+ bool isMountainValid = !_errors.Keys.Contains("Mountain");
+ if (_mountain == string.Empty && isMountainValid)
+ {
+ List errors = new List();
+ errors.Add("Mountain name cannot be empty");
+ _errors.Add("Mountain", errors);
+ this.ErrorsChanged?.Invoke(this, new DataErrorsChangedEventArgs("Mountain"));
+ }
+ else if (_mountain != string.Empty && !isMountainValid)
+ {
+ _errors.Remove("Mountain");
+ this.ErrorsChanged?.Invoke(this, new DataErrorsChangedEventArgs("Mountain"));
+ }
+ }
+ }
+ }
+
+ public uint Height_m
+ {
+ get
+ {
+ return _height;
+ }
+
+ set
+ {
+ if (_height != value)
+ {
+ _height = value;
+ }
+ }
+ }
+
+ public string Range
+ {
+ get
+ {
+ return _range;
+ }
+
+ set
+ {
+ if (_range != value)
+ {
+ _range = value;
+
+ bool isRangeValid = !_errors.Keys.Contains("Range");
+ if (_range == string.Empty && isRangeValid)
+ {
+ List errors = new List();
+ errors.Add("Range name cannot be empty");
+ _errors.Add("Range", errors);
+ this.ErrorsChanged?.Invoke(this, new DataErrorsChangedEventArgs("Range"));
+ }
+ else if (_range != string.Empty && !isRangeValid)
+ {
+ _errors.Remove("Range");
+ this.ErrorsChanged?.Invoke(this, new DataErrorsChangedEventArgs("Range"));
+ }
+ }
+ }
+ }
+
+ public string Parent_mountain
+ {
+ get
+ {
+ return _parentMountain;
+ }
+
+ set
+ {
+ if (_parentMountain != value)
+ {
+ _parentMountain = value;
+
+ bool isParentValid = !_errors.Keys.Contains("Parent_mountain");
+ if (_parentMountain == string.Empty && isParentValid)
+ {
+ List errors = new List();
+ errors.Add("Parent_mountain name cannot be empty");
+ _errors.Add("Parent_mountain", errors);
+ this.ErrorsChanged?.Invoke(this, new DataErrorsChangedEventArgs("Parent_mountain"));
+ }
+ else if (_parentMountain != string.Empty && !isParentValid)
+ {
+ _errors.Remove("Parent_mountain");
+ this.ErrorsChanged?.Invoke(this, new DataErrorsChangedEventArgs("Parent_mountain"));
+ }
+ }
+ }
+ }
+
+ public string Coordinates { get; set; }
+
+ public uint Prominence { get; set; }
+
+ public uint First_ascent { get; set; }
+
+ public string Ascents { get; set; }
+
+ bool INotifyDataErrorInfo.HasErrors
+ {
+ get
+ {
+ return _errors.Keys.Count > 0;
+ }
+ }
+
+ IEnumerable INotifyDataErrorInfo.GetErrors(string propertyName)
+ {
+ if (propertyName == null)
+ {
+ propertyName = string.Empty;
+ }
+
+ if (_errors.Keys.Contains(propertyName))
+ {
+ return _errors[propertyName];
+ }
+ else
+ {
+ return null;
+ }
+ }
+
+ int IComparable.CompareTo(object obj)
+ {
+ int lnCompare = Range.CompareTo((obj as DataGridDataItem).Range);
+
+ if (lnCompare == 0)
+ {
+ return Parent_mountain.CompareTo((obj as DataGridDataItem).Parent_mountain);
+ }
+ else
+ {
+ return lnCompare;
+ }
+ }
+ }
+
+ public class DataGridDataSource
+ {
+ private const string File = @"1,Mount Everest,8848,Mahalangur Himalaya,27d59m17sN 86d55m31sE,8848,none,1953,>>145 (121)
+2, K2/Qogir,8611,Baltoro Karakoram,35d52m53sN 76d30m48sE,4017,Mount Everest,1954,45 (44)
+3,Kangchenjunga,8586,Kangchenjunga Himalaya,27d42m12sN 88d08m51sE*,3922,Mount Everest,1955,38 (24)
+4,Lhotse,8516,Mahalangur Himalaya,27d57m42sN 86d55m59sE,610,Mount Everest,1956,26 (26)
+5,Makalu,8485,Mahalangur Himalaya,27d53m23sN 87d5m20sE,2386,Mount Everest,1955,45 (52)
+6,Cho Oyu,8188, Mahalangur Himalaya,28d05m39sN 86d39m39sE,2340,Mount Everest,1954,79 (28)
+7,Dhaulagiri I,8167, Dhaulagiri Himalaya,28d41m48sN 83d29m35sE,3357,K2,1960,51 (39)
+8,Manaslu,8163,Manaslu Himalaya,28d33m00sN 84d33m35sE,3092,Cho Oyu,1956,49 (45)
+9,Nanga Parbat,8126, Nanga Parbat Himalaya,35d14m14sN 74d35m21sE,4608,Dhaulagiri,1953,52 (67)
+10,Annapurna I,8091, Annapurna Himalaya,28d35m44sN 83d49m13sE,2984,Cho Oyu,1950,36 (47)
+11,Gasherbrum I,8080, Baltoro Karakoram,35d43m28sN 76d41m47sE,2155,K2,1958,31 (16)
+12,Broad Peak/K3,8051,Baltoro Karakoram,35d48m38sN 76d34m06sE,1701,Gasherbrum I,1957,39 (19)
+13,Gasherbrum II/K4,8034,Baltoro Karakoram,35d45m28sN 76d39m12sE,1523,Gasherbrum I,1956,54 (12)
+14,Shishapangma,8027,Jugal Himalaya,28d21m12sN 85d46m43sE,2897,Cho Oyu,1964,43 (19)
+15,Gyachung Kang,7952, Mahalangur Himalaya,28d05m53sN 86d44m42sE,700,Cho Oyu,1964,5 (3)
+15,Gasherbrum III,7946, Baltoro Karakoram,35d45m33sN 76d38m30sE,355,Gasherbrum II,1975,2 (2)
+16,Annapurna II,7937, Annapurna Himalaya,28d32m05sN 84d07m19sE,2437,Annapurna I,1960,6 (19)
+17,Gasherbrum IV,7932, Baltoro Karakoram,35d45m38sN 76d36m58sE,715,Gasherbrum III,1958,4 (11)
+18,Himalchuli,7893,Manaslu Himalaya,28d26m12sN 84d38m23sE*,1633,Manaslu,1960,6 (12)
+19,Distaghil Sar,7884, Hispar Karakoram,36d19m33sN 75d11m16sE,2525,K2,1960,3 (5)
+20,Ngadi Chuli,7871, Manaslu Himalaya,28d30m12sN 84d34m00sE,1020,Manaslu,1970,2 (6)";
+
+ private static ObservableCollection _items;
+ private static List _mountains;
+ private static CollectionViewSource groupedItems;
+ private string _cachedSortedColumn = string.Empty;
+
+ // Loading data
+ public IEnumerable GetData()
+ {
+ _items = new ObservableCollection();
+
+ using (StringReader sr = new StringReader(File))
+ {
+ string line;
+
+ while ((line = sr.ReadLine()) != null)
+ {
+ string[] values = line.Split(',');
+
+ _items.Add(
+ new DataGridDataItem()
+ {
+ Rank = uint.Parse(values[0]),
+ Mountain = values[1],
+ Height_m = uint.Parse(values[2]),
+ Range = values[3],
+ Coordinates = values[4],
+ Prominence = uint.Parse(values[5]),
+ Parent_mountain = values[6],
+ First_ascent = uint.Parse(values[7]),
+ Ascents = values[8]
+ });
+ }
+ }
+
+ return _items;
+ }
+
+ // Load mountains into separate collection for use in combobox column
+ public IEnumerable GetMountains()
+ {
+ if (_items == null || !_items.Any())
+ {
+ GetData();
+ }
+
+ _mountains = _items?.OrderBy(x => x.Mountain).Select(x => x.Mountain).Distinct().ToList();
+
+ return _mountains;
+ }
+
+ // Sorting implementation using LINQ
+ public string CachedSortedColumn
+ {
+ get
+ {
+ return _cachedSortedColumn;
+ }
+
+ set
+ {
+ _cachedSortedColumn = value;
+ }
+ }
+
+ public ObservableCollection SortData(string sortBy, bool ascending)
+ {
+ _cachedSortedColumn = sortBy;
+ switch (sortBy)
+ {
+ case "Rank":
+ if (ascending)
+ {
+ return new ObservableCollection(from item in _items
+ orderby item.Rank ascending
+ select item);
+ }
+ else
+ {
+ return new ObservableCollection(from item in _items
+ orderby item.Rank descending
+ select item);
+ }
+
+ case "Parent_mountain":
+ if (ascending)
+ {
+ return new ObservableCollection(from item in _items
+ orderby item.Parent_mountain ascending
+ select item);
+ }
+ else
+ {
+ return new ObservableCollection(from item in _items
+ orderby item.Parent_mountain descending
+ select item);
+ }
+
+ case "Mountain":
+ if (ascending)
+ {
+ return new ObservableCollection(from item in _items
+ orderby item.Mountain ascending
+ select item);
+ }
+ else
+ {
+ return new ObservableCollection(from item in _items
+ orderby item.Mountain descending
+ select item);
+ }
+
+ case "Height_m":
+ if (ascending)
+ {
+ return new ObservableCollection(from item in _items
+ orderby item.Height_m ascending
+ select item);
+ }
+ else
+ {
+ return new ObservableCollection(from item in _items
+ orderby item.Height_m descending
+ select item);
+ }
+
+ case "Range":
+ if (ascending)
+ {
+ return new ObservableCollection(from item in _items
+ orderby item.Range ascending
+ select item);
+ }
+ else
+ {
+ return new ObservableCollection(from item in _items
+ orderby item.Range descending
+ select item);
+ }
+ }
+
+ return _items;
+ }
+
+ // Grouping implementation using LINQ
+ public CollectionViewSource GroupData()
+ {
+ ObservableCollection> groups = new ObservableCollection>();
+ var query = from item in _items
+ orderby item
+ group item by item.Range into g
+ select new { GroupName = g.Key, Items = g };
+ foreach (var g in query)
+ {
+ GroupInfoCollection info = new GroupInfoCollection();
+ info.Key = g.GroupName;
+ foreach (var item in g.Items)
+ {
+ info.Add(item);
+ }
+
+ groups.Add(info);
+ }
+
+ groupedItems = new CollectionViewSource();
+ groupedItems.IsSourceGrouped = true;
+ groupedItems.Source = groups;
+
+ return groupedItems;
+ }
+
+ public class GroupInfoCollection : ObservableCollection
+ {
+ public object Key { get; set; }
+
+ public new IEnumerator GetEnumerator()
+ {
+ return (IEnumerator)base.GetEnumerator();
+ }
+ }
+
+ // Filtering implementation using LINQ
+ public enum FilterOptions
+ {
+ All = -1,
+ Rank_Low = 0,
+ Rank_High = 1,
+ Height_Low = 2,
+ Height_High = 3
+ }
+
+ public ObservableCollection FilterData(FilterOptions filterBy)
+ {
+ switch (filterBy)
+ {
+ case FilterOptions.All:
+ return new ObservableCollection(_items);
+
+ case FilterOptions.Rank_Low:
+ return new ObservableCollection(from item in _items
+ where item.Rank < 50
+ select item);
+
+ case FilterOptions.Rank_High:
+ return new ObservableCollection(from item in _items
+ where item.Rank > 50
+ select item);
+
+ case FilterOptions.Height_High:
+ return new ObservableCollection(from item in _items
+ where item.Height_m > 8000
+ select item);
+
+ case FilterOptions.Height_Low:
+ return new ObservableCollection(from item in _items
+ where item.Height_m < 8000
+ select item);
+ }
+
+ return _items;
+ }
+ }
+}
diff --git a/SmokeTests/Microsoft.Toolkit.Uwp.UI.Controls.Layout/MainPage.xaml b/SmokeTests/Microsoft.Toolkit.Uwp.UI.Controls.Layout/MainPage.xaml
new file mode 100644
index 00000000000..4cb117351cd
--- /dev/null
+++ b/SmokeTests/Microsoft.Toolkit.Uwp.UI.Controls.Layout/MainPage.xaml
@@ -0,0 +1,41 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/SmokeTests/Microsoft.Toolkit.Uwp.UI.Controls.Layout/MainPage.xaml.cs b/SmokeTests/Microsoft.Toolkit.Uwp.UI.Controls.Layout/MainPage.xaml.cs
new file mode 100644
index 00000000000..2be17a0892c
--- /dev/null
+++ b/SmokeTests/Microsoft.Toolkit.Uwp.UI.Controls.Layout/MainPage.xaml.cs
@@ -0,0 +1,40 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+using System;
+using System.Collections.ObjectModel;
+using Windows.UI;
+
+namespace SmokeTest
+{
+ public sealed partial class MainPage
+ {
+ public ObservableCollection- Items { get; } = new ObservableCollection
- ();
+
+ private readonly Random _random;
+
+ public class Item
+ {
+ public int Index { get; internal set; }
+
+ public int Width { get; internal set; }
+
+ public int Height { get; internal set; }
+
+ public Color Color { get; internal set; }
+ }
+
+ public MainPage()
+ {
+ InitializeComponent();
+
+ _random = new Random(DateTime.Now.Millisecond);
+ for (int i = 0; i < _random.Next(1000, 5000); i++)
+ {
+ var item = new Item { Index = i, Width = _random.Next(50, 250), Height = _random.Next(50, 250), Color = Color.FromArgb(255, (byte)_random.Next(0, 255), (byte)_random.Next(0, 255), (byte)_random.Next(0, 255)) };
+ Items.Add(item);
+ }
+ }
+ }
+}
diff --git a/SmokeTests/Microsoft.Toolkit.Uwp.UI.Controls.Markdown/MainPage.xaml b/SmokeTests/Microsoft.Toolkit.Uwp.UI.Controls.Markdown/MainPage.xaml
new file mode 100644
index 00000000000..0bdf5a0e6bb
--- /dev/null
+++ b/SmokeTests/Microsoft.Toolkit.Uwp.UI.Controls.Markdown/MainPage.xaml
@@ -0,0 +1,50 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/SmokeTests/Microsoft.Toolkit.Uwp.UI.Controls.Markdown/MainPage.xaml.cs b/SmokeTests/Microsoft.Toolkit.Uwp.UI.Controls.Markdown/MainPage.xaml.cs
new file mode 100644
index 00000000000..65e09322217
--- /dev/null
+++ b/SmokeTests/Microsoft.Toolkit.Uwp.UI.Controls.Markdown/MainPage.xaml.cs
@@ -0,0 +1,14 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+namespace SmokeTest
+{
+ public sealed partial class MainPage
+ {
+ public MainPage()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/SmokeTests/Microsoft.Toolkit.Uwp.UI.Controls/MainPage.xaml b/SmokeTests/Microsoft.Toolkit.Uwp.UI.Controls/MainPage.xaml
new file mode 100644
index 00000000000..d628d8c1bc0
--- /dev/null
+++ b/SmokeTests/Microsoft.Toolkit.Uwp.UI.Controls/MainPage.xaml
@@ -0,0 +1,123 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/SmokeTests/Microsoft.Toolkit.Uwp.UI.Controls/MainPage.xaml.cs b/SmokeTests/Microsoft.Toolkit.Uwp.UI.Controls/MainPage.xaml.cs
new file mode 100644
index 00000000000..65e09322217
--- /dev/null
+++ b/SmokeTests/Microsoft.Toolkit.Uwp.UI.Controls/MainPage.xaml.cs
@@ -0,0 +1,14 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+namespace SmokeTest
+{
+ public sealed partial class MainPage
+ {
+ public MainPage()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/SmokeTests/Microsoft.Toolkit.Uwp.UI.Media/MainPage.xaml b/SmokeTests/Microsoft.Toolkit.Uwp.UI.Media/MainPage.xaml
new file mode 100644
index 00000000000..e1c1c4e71f9
--- /dev/null
+++ b/SmokeTests/Microsoft.Toolkit.Uwp.UI.Media/MainPage.xaml
@@ -0,0 +1,31 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/SmokeTests/Microsoft.Toolkit.Uwp.UI.Media/MainPage.xaml.cs b/SmokeTests/Microsoft.Toolkit.Uwp.UI.Media/MainPage.xaml.cs
new file mode 100644
index 00000000000..65e09322217
--- /dev/null
+++ b/SmokeTests/Microsoft.Toolkit.Uwp.UI.Media/MainPage.xaml.cs
@@ -0,0 +1,14 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+namespace SmokeTest
+{
+ public sealed partial class MainPage
+ {
+ public MainPage()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/SmokeTests/Microsoft.Toolkit.Uwp.UI/MainPage.xaml b/SmokeTests/Microsoft.Toolkit.Uwp.UI/MainPage.xaml
new file mode 100644
index 00000000000..cef24c59c88
--- /dev/null
+++ b/SmokeTests/Microsoft.Toolkit.Uwp.UI/MainPage.xaml
@@ -0,0 +1,35 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/SmokeTests/Microsoft.Toolkit.Uwp.UI/MainPage.xaml.cs b/SmokeTests/Microsoft.Toolkit.Uwp.UI/MainPage.xaml.cs
new file mode 100644
index 00000000000..d1fe446c34f
--- /dev/null
+++ b/SmokeTests/Microsoft.Toolkit.Uwp.UI/MainPage.xaml.cs
@@ -0,0 +1,60 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+using System;
+using System.Diagnostics;
+using System.Linq;
+using Microsoft.Toolkit.Uwp.UI.Behaviors;
+using Microsoft.Xaml.Interactivity;
+using Windows.UI.Xaml.Media.Imaging;
+
+namespace SmokeTest
+{
+ public sealed partial class MainPage
+ {
+ public MainPage()
+ {
+ InitializeComponent();
+
+ Loaded += this.MainPage_Loaded;
+ }
+
+ private void MainPage_Loaded(object sender, Windows.UI.Xaml.RoutedEventArgs e)
+ {
+ var behaviors = Interaction.GetBehaviors(EffectElementHost);
+ var viewportBehavior = behaviors.OfType().FirstOrDefault();
+ if (viewportBehavior != null)
+ {
+ viewportBehavior.EnteredViewport += EffectElementHost_EnteredViewport;
+ viewportBehavior.EnteringViewport += EffectElementHost_EnteringViewport;
+ viewportBehavior.ExitedViewport += EffectElementHost_ExitedViewport;
+ viewportBehavior.ExitingViewport += EffectElementHost_ExitingViewport;
+ }
+ }
+
+ private void EffectElementHost_EnteredViewport(object sender, EventArgs e)
+ {
+ Debug.WriteLine("Entered viewport");
+ }
+
+ private void EffectElementHost_EnteringViewport(object sender, EventArgs e)
+ {
+ Debug.WriteLine("Entering viewport");
+
+ EffectElement.Source = new BitmapImage(new Uri("ms-appx:///Assets/ToolkitLogo.png"));
+ }
+
+ private void EffectElementHost_ExitedViewport(object sender, EventArgs e)
+ {
+ Debug.WriteLine("Exited viewport");
+
+ EffectElement.Source = null;
+ }
+
+ private void EffectElementHost_ExitingViewport(object sender, EventArgs e)
+ {
+ Debug.WriteLine("Exiting viewport");
+ }
+ }
+}
diff --git a/SmokeTests/Microsoft.Toolkit.Uwp/MainPage.xaml b/SmokeTests/Microsoft.Toolkit.Uwp/MainPage.xaml
new file mode 100644
index 00000000000..29c3770cfcc
--- /dev/null
+++ b/SmokeTests/Microsoft.Toolkit.Uwp/MainPage.xaml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
diff --git a/SmokeTests/Microsoft.Toolkit.Uwp/MainPage.xaml.cs b/SmokeTests/Microsoft.Toolkit.Uwp/MainPage.xaml.cs
new file mode 100644
index 00000000000..b4350416943
--- /dev/null
+++ b/SmokeTests/Microsoft.Toolkit.Uwp/MainPage.xaml.cs
@@ -0,0 +1,67 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+using System;
+using Microsoft.Toolkit.Uwp.Helpers;
+using Windows.Graphics.Imaging;
+using Windows.Media;
+using Windows.System;
+using Windows.UI.Xaml.Media.Imaging;
+
+namespace SmokeTest
+{
+ public sealed partial class MainPage
+ {
+ private CameraHelper _cameraHelper;
+ private DispatcherQueue _dispatcherQueue;
+
+ public MainPage()
+ {
+ InitializeComponent();
+ _dispatcherQueue = DispatcherQueue.GetForCurrentThread();
+ image.Source = new SoftwareBitmapSource();
+ }
+
+ private async void Button_Click(object sender, Windows.UI.Xaml.RoutedEventArgs e)
+ {
+ if (_cameraHelper != null)
+ {
+ _cameraHelper.FrameArrived -= CameraHelper_FrameArrived;
+ await _cameraHelper.CleanUpAsync();
+ }
+
+ _cameraHelper = new CameraHelper();
+ var result = await _cameraHelper.InitializeAndStartCaptureAsync();
+
+ if (result == CameraHelperResult.Success)
+ {
+ _cameraHelper.FrameArrived += CameraHelper_FrameArrived;
+ }
+ else
+ {
+ var errorMessage = result.ToString();
+ }
+ }
+
+ private void CameraHelper_FrameArrived(object sender, FrameEventArgs e)
+ {
+ VideoFrame currentVideoFrame = e.VideoFrame;
+
+ SoftwareBitmap softwareBitmap = currentVideoFrame.SoftwareBitmap;
+
+ if (softwareBitmap.BitmapPixelFormat != BitmapPixelFormat.Bgra8 || softwareBitmap.BitmapAlphaMode == BitmapAlphaMode.Straight)
+ {
+ softwareBitmap = SoftwareBitmap.Convert(softwareBitmap, BitmapPixelFormat.Bgra8, BitmapAlphaMode.Premultiplied);
+ }
+
+ _dispatcherQueue.TryEnqueue(async () =>
+ {
+ if (image.Source is SoftwareBitmapSource softwareBitmapSource)
+ {
+ await softwareBitmapSource.SetBitmapAsync(softwareBitmap);
+ }
+ });
+ }
+ }
+}
diff --git a/SmokeTests/Microsoft.Toolkit/MainPage.xaml b/SmokeTests/Microsoft.Toolkit/MainPage.xaml
new file mode 100644
index 00000000000..d30f1e9bb2c
--- /dev/null
+++ b/SmokeTests/Microsoft.Toolkit/MainPage.xaml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/SmokeTests/Microsoft.Toolkit/MainPage.xaml.cs b/SmokeTests/Microsoft.Toolkit/MainPage.xaml.cs
new file mode 100644
index 00000000000..3faaabb3568
--- /dev/null
+++ b/SmokeTests/Microsoft.Toolkit/MainPage.xaml.cs
@@ -0,0 +1,21 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// 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.Extensions;
+
+namespace SmokeTest
+{
+ public sealed partial class MainPage
+ {
+ public MainPage()
+ {
+ InitializeComponent();
+ }
+
+ private void Button_Click(object sender, Windows.UI.Xaml.RoutedEventArgs e)
+ {
+ textBlock.Text = textBox.Text?.IsEmail().ToString() ?? "False";
+ }
+ }
+}
diff --git a/SmokeTests/Package.appxmanifest b/SmokeTests/Package.appxmanifest
new file mode 100644
index 00000000000..b579cd51b5e
--- /dev/null
+++ b/SmokeTests/Package.appxmanifest
@@ -0,0 +1,56 @@
+
+
+
+
+
+
+
+
+
+ SmokeTest
+ alzollin
+ Assets\StoreLogo.png
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/SmokeTests/Properties/AssemblyInfo.cs b/SmokeTests/Properties/AssemblyInfo.cs
new file mode 100644
index 00000000000..8fb601dfd8a
--- /dev/null
+++ b/SmokeTests/Properties/AssemblyInfo.cs
@@ -0,0 +1,31 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("SmokeTest")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("SmokeTest")]
+[assembly: AssemblyCopyright("Copyright © 2020")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: ComVisible(false)]
\ No newline at end of file
diff --git a/SmokeTests/Properties/Default.rd.xml b/SmokeTests/Properties/Default.rd.xml
new file mode 100644
index 00000000000..af00722cdf9
--- /dev/null
+++ b/SmokeTests/Properties/Default.rd.xml
@@ -0,0 +1,31 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/SmokeTests/SmokeTest.csproj b/SmokeTests/SmokeTest.csproj
new file mode 100644
index 00000000000..bbcfbdd57ab
--- /dev/null
+++ b/SmokeTests/SmokeTest.csproj
@@ -0,0 +1,129 @@
+
+
+
+
+
+
+ Microsoft.Toolkit.Uwp.UI.Controls
+
+
+
+ Debug
+ x86
+ {A6E4CB52-1025-4BBA-9C65-BB871D1FB53F}
+ AppContainerExe
+ Properties
+ SmokeTest
+ SmokeTest.$(CurrentProject)
+ en-US
+ UAP
+ 10.0.$(DefaultTargetPlatformVersion).0
+ 10.0.$(DefaultTargetPlatformMinVersion).0
+ 14
+ 512
+ {A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
+ true
+ false
+ $(Platform)
+ Always
+ StoreUpload
+ $(Platform)
+ ;2008;SA0001;SA1601
+ true
+ prompt
+ false
+
+
+ SmokeTest_$(CurrentProject)
+ obj\$(CurrentProject)\
+ bin\$(CurrentProject)\$(Platform)\$(Configuration)\
+
+
+ true
+ DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP
+ full
+
+
+ TRACE;NETFX_CORE;WINDOWS_UWP
+ true
+ pdbonly
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ PackageReference
+
+
+
+ Designer
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ App.xaml
+
+
+
+ MSBuild:Compile
+ Designer
+
+
+
+
+
+ MSBuild:Compile
+ Designer
+
+
+
+
+ 6.2.10
+
+
+
+
+
+ 2.4.3
+
+
+
+
+
+
+ 14.0
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/SmokeTests/SmokeTest.sln b/SmokeTests/SmokeTest.sln
new file mode 100644
index 00000000000..63b5bc21c10
--- /dev/null
+++ b/SmokeTests/SmokeTest.sln
@@ -0,0 +1,51 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 16
+VisualStudioVersion = 16.0.30413.136
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SmokeTest", "SmokeTest.csproj", "{A6E4CB52-1025-4BBA-9C65-BB871D1FB53F}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|ARM = Debug|ARM
+ Debug|ARM64 = Debug|ARM64
+ Debug|x64 = Debug|x64
+ Debug|x86 = Debug|x86
+ Release|ARM = Release|ARM
+ Release|ARM64 = Release|ARM64
+ Release|x64 = Release|x64
+ Release|x86 = Release|x86
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {A6E4CB52-1025-4BBA-9C65-BB871D1FB53F}.Debug|ARM.ActiveCfg = Debug|ARM
+ {A6E4CB52-1025-4BBA-9C65-BB871D1FB53F}.Debug|ARM.Build.0 = Debug|ARM
+ {A6E4CB52-1025-4BBA-9C65-BB871D1FB53F}.Debug|ARM.Deploy.0 = Debug|ARM
+ {A6E4CB52-1025-4BBA-9C65-BB871D1FB53F}.Debug|ARM64.ActiveCfg = Debug|ARM64
+ {A6E4CB52-1025-4BBA-9C65-BB871D1FB53F}.Debug|ARM64.Build.0 = Debug|ARM64
+ {A6E4CB52-1025-4BBA-9C65-BB871D1FB53F}.Debug|ARM64.Deploy.0 = Debug|ARM64
+ {A6E4CB52-1025-4BBA-9C65-BB871D1FB53F}.Debug|x64.ActiveCfg = Debug|x64
+ {A6E4CB52-1025-4BBA-9C65-BB871D1FB53F}.Debug|x64.Build.0 = Debug|x64
+ {A6E4CB52-1025-4BBA-9C65-BB871D1FB53F}.Debug|x64.Deploy.0 = Debug|x64
+ {A6E4CB52-1025-4BBA-9C65-BB871D1FB53F}.Debug|x86.ActiveCfg = Debug|x86
+ {A6E4CB52-1025-4BBA-9C65-BB871D1FB53F}.Debug|x86.Build.0 = Debug|x86
+ {A6E4CB52-1025-4BBA-9C65-BB871D1FB53F}.Debug|x86.Deploy.0 = Debug|x86
+ {A6E4CB52-1025-4BBA-9C65-BB871D1FB53F}.Release|ARM.ActiveCfg = Release|ARM
+ {A6E4CB52-1025-4BBA-9C65-BB871D1FB53F}.Release|ARM.Build.0 = Release|ARM
+ {A6E4CB52-1025-4BBA-9C65-BB871D1FB53F}.Release|ARM.Deploy.0 = Release|ARM
+ {A6E4CB52-1025-4BBA-9C65-BB871D1FB53F}.Release|ARM64.ActiveCfg = Release|ARM64
+ {A6E4CB52-1025-4BBA-9C65-BB871D1FB53F}.Release|ARM64.Build.0 = Release|ARM64
+ {A6E4CB52-1025-4BBA-9C65-BB871D1FB53F}.Release|ARM64.Deploy.0 = Release|ARM64
+ {A6E4CB52-1025-4BBA-9C65-BB871D1FB53F}.Release|x64.ActiveCfg = Release|x64
+ {A6E4CB52-1025-4BBA-9C65-BB871D1FB53F}.Release|x64.Build.0 = Release|x64
+ {A6E4CB52-1025-4BBA-9C65-BB871D1FB53F}.Release|x64.Deploy.0 = Release|x64
+ {A6E4CB52-1025-4BBA-9C65-BB871D1FB53F}.Release|x86.ActiveCfg = Release|x86
+ {A6E4CB52-1025-4BBA-9C65-BB871D1FB53F}.Release|x86.Build.0 = Release|x86
+ {A6E4CB52-1025-4BBA-9C65-BB871D1FB53F}.Release|x86.Deploy.0 = Release|x86
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {8A672016-FF33-4C67-9309-5230BCE67EF6}
+ EndGlobalSection
+EndGlobal
diff --git a/SmokeTests/SmokeTests.proj b/SmokeTests/SmokeTests.proj
new file mode 100644
index 00000000000..4ae1f8184b2
--- /dev/null
+++ b/SmokeTests/SmokeTests.proj
@@ -0,0 +1,60 @@
+
+
+
+
+ x86
+ Release
+ Microsoft.Toolkit;Microsoft.Toolkit.HighPerformance;Microsoft.Toolkit.Parsers;Microsoft.Toolkit.Mvvm;Microsoft.Toolkit.Services;Microsoft.Toolkit.Uwp;Microsoft.Toolkit.Uwp.Connectivity;Microsoft.Toolkit.Uwp.DeveloperTools;Microsoft.Toolkit.Uwp.Input.GazeInteraction;Microsoft.Toolkit.Uwp.Notifications;Microsoft.Toolkit.Uwp.UI;Microsoft.Toolkit.Uwp.UI.Animations;Microsoft.Toolkit.Uwp.UI.Controls;Microsoft.Toolkit.Uwp.UI.Controls.DataGrid;Microsoft.Toolkit.Uwp.UI.Controls.Layout;Microsoft.Toolkit.Uwp.UI.Media;Microsoft.Toolkit.Uwp.UI.Controls.Markdown
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ x86;x64;ARM;ARM64
+ bin
+ %(ToolkitPackage.Identity)
+
+
+
+ %(BuildPlatform.Identity)
+
+
+
+
+
+ %(BuildConfiguration.Identity)
+
+
+
+ Platform=%(ProjectsPerConfig.Platform);Configuration=%(ProjectsPerConfig.Configuration)
+
+
+
+
+
+
+ ../bin/nupkg/*.nupkg
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/SmokeTests/nuget.config b/SmokeTests/nuget.config
new file mode 100644
index 00000000000..ac69f6288a4
--- /dev/null
+++ b/SmokeTests/nuget.config
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/azure-pipelines.yml b/azure-pipelines.yml
index 75d381267ec..16784b4146b 100644
--- a/azure-pipelines.yml
+++ b/azure-pipelines.yml
@@ -52,6 +52,9 @@ jobs:
- powershell: .\build\build.ps1 -target=Package
displayName: Package
+ - powershell: .\build\build.ps1 -target=SmokeTest
+ displayName: SmokeTest
+
- task: PublishTestResults@2
inputs:
testResultsFormat: 'VSTest'
@@ -89,3 +92,16 @@ jobs:
pathToPublish: .\bin\nupkg
artifactType: container
artifactName: Packages
+
+ - task: CopyFiles@2
+ inputs:
+ sourceFolder: .\SmokeTests\AppPackages
+ contents: '**\*.msixbundle'
+ targetFolder: $(build.artifactstagingdirectory)\SmokeTestBundles
+
+ - task: PublishBuildArtifacts@1
+ displayName: Publish Smoke Test Artifacts
+ inputs:
+ pathToPublish: $(build.artifactstagingdirectory)\SmokeTestBundles
+ artifactType: container
+ artifactName: SmokeTestBundles
diff --git a/build/build.cake b/build/build.cake
index 2e3e7a234fe..edefaa1eea7 100644
--- a/build/build.cake
+++ b/build/build.cake
@@ -283,6 +283,13 @@ Task("Test")
}
}).DeferOnError();
+Task("SmokeTest")
+ .Description("Runs all Smoke Tests")
+ .Does(() =>
+{
+ NuGetRestore(baseDir + "/SmokeTests/SmokeTest.csproj");
+ MSBuild(baseDir + "/SmokeTests/SmokeTests.proj");
+}).DeferOnError();
Task("MSTestUITest")
.Description("Runs UITests using MSTest")