{"action":"created","comment":{"url":"https://api.github.com/repos/Microsoft/WindowsCommunityToolkit/pulls/comments/193915141","pull_request_review_id":126988625,"id":193915141,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5MzkxNTE0MQ==","diff_hunk":"@@ -0,0 +1,601 @@\n+// Licensed to the .NET Foundation under one or more agreements.\n+// The .NET Foundation licenses this file to you under the MIT license.\n+// See the LICENSE file in the project root for more information.\n+\n+using System;\n+using System.Collections.ObjectModel;\n+using System.ComponentModel;\n+using System.Linq;\n+using System.Runtime.CompilerServices;\n+using System.Threading.Tasks;\n+using Microsoft.Toolkit.Uwp.SampleApp.Common;\n+using Microsoft.Toolkit.Uwp.SampleApp.Controls;\n+using Microsoft.Toolkit.Uwp.SampleApp.Models;\n+using Microsoft.Toolkit.Uwp.UI.Controls;\n+using Microsoft.Toolkit.Uwp.UI.Extensions;\n+using Windows.System;\n+using Windows.System.Profile;\n+using Windows.UI.Core;\n+using Windows.UI.Xaml;\n+using Windows.UI.Xaml.Controls;\n+using Windows.UI.Xaml.Media.Imaging;\n+using Windows.UI.Xaml.Navigation;\n+\n+namespace Microsoft.Toolkit.Uwp.SampleApp\n+{\n+    /// <summary>\n+    /// A wrapper for the Sample Page.\n+    /// </summary>\n+    public sealed partial class SampleController : Page, INotifyPropertyChanged\n+    {\n+        public static SampleController Current { get; private set; }\n+\n+        public SampleController()\n+        {\n+            this.InitializeComponent();\n+            Current = this;\n+\n+            // Prevent Pop in on wider screens.\n+            if (((FrameworkElement)Window.Current.Content).ActualWidth > 700)\n+            {\n+                SidePaneState = PaneState.Normal;\n+            }\n+\n+            Shell.Current.ThemeChanged += Current_ThemeChanged;\n+\n+            ThemePicker.SelectedIndex = (int)Shell.Current.GetCurrentTheme();\n+            ThemePicker.SelectionChanged += ThemePicker_SelectionChanged;\n+\n+            DocumentationTextblock.RequestedTheme = Shell.Current.GetCurrentTheme();\n+            DocumentationTextblock.SetRenderer<SampleAppMarkdownRenderer>();\n+\n+            ProcessSampleEditorTime();\n+            XamlCodeEditor.UpdateRequested += XamlCodeEditor_UpdateRequested;\n+        }\n+\n+        public void OpenClosePane()\n+        {\n+            if (CanChangePaneState)\n+            {\n+                if (SidePaneState == PaneState.Closed)\n+                {\n+                    SidePaneState = PaneState.Normal;\n+                }\n+                else\n+                {\n+                    SidePaneState = PaneState.Closed;\n+                }\n+            }\n+        }\n+\n+        public void ExpandCollapsePane()\n+        {\n+            if (CanChangePaneState)\n+            {\n+                if (SidePaneState == PaneState.Full)\n+                {\n+                    SidePaneState = PaneState.Normal;\n+                }\n+                else\n+                {\n+                    SidePaneState = PaneState.Full;\n+                }\n+            }\n+        }\n+\n+        public void RegisterNewCommand(string name, RoutedEventHandler action)\n+        {\n+            Commands.Add(new SampleCommand(name, () =>\n+            {\n+                try\n+                {\n+                    action.Invoke(this, new RoutedEventArgs());\n+                }\n+                catch (Exception ex)\n+                {\n+                    ExceptionNotification.Show(ex.Message, 3000);\n+                }\n+            }));\n+        }\n+\n+        public async Task RefreshXamlRenderAsync()\n+        {\n+            if (CurrentSample != null)\n+            {\n+                var code = string.Empty;\n+                if (InfoAreaPivot.SelectedItem == PropertiesPivotItem)\n+                {\n+                    code = CurrentSample.BindedXamlCode;\n+                }\n+                else\n+                {\n+                    code = CurrentSample.UpdatedXamlCode;\n+                }\n+\n+                if (!string.IsNullOrWhiteSpace(code))\n+                {\n+                    await UpdateXamlRenderAsync(code);\n+                }\n+            }\n+        }\n+\n+        protected override async void OnNavigatedTo(NavigationEventArgs e)\n+        {\n+            base.OnNavigatedTo(e);\n+            if (e.Parameter is Sample sample)\n+            {\n+                CurrentSample = sample;\n+            }\n+\n+            if (CurrentSample != null)\n+            {\n+                if (!string.IsNullOrWhiteSpace(CurrentSample.Type))\n+                {\n+                    try\n+                    {\n+                        var pageInstance = Activator.CreateInstance(CurrentSample.PageType);\n+                        SampleContent.Content = pageInstance;\n+                    }\n+                    catch\n+                    {\n+                        ExceptionNotification.Show(\"Sample Page failed to load.\");\n+                    }\n+\n+                    if (SamplePage != null)\n+                    {\n+                        SamplePage.Loaded += SamplePage_Loaded;\n+                    }\n+                }\n+                else\n+                {\n+                    _onlyDocumentation = true;\n+                }\n+\n+                DataContext = CurrentSample;\n+\n+                await Samples.PushRecentSample(CurrentSample);\n+\n+                var propertyDesc = CurrentSample.PropertyDescriptor;\n+\n+                InfoAreaPivot.Items.Clear();\n+\n+                if (propertyDesc != null)\n+                {\n+                    _xamlRenderer.DataContext = propertyDesc.Expando;\n+                }\n+\n+                if (propertyDesc != null && propertyDesc.Options.Count > 0)\n+                {\n+                    InfoAreaPivot.Items.Add(PropertiesPivotItem);\n+                }\n+\n+                if (CurrentSample.HasXAMLCode)\n+                {\n+                    if (AnalyticsInfo.VersionInfo.GetDeviceFormFactor() != DeviceFormFactor.Desktop || CurrentSample.DisableXamlEditorRendering)\n+                    {\n+                        // Only makes sense (and works) for now to show Live Xaml on Desktop, so fallback to old system here otherwise.\n+                        XamlReadOnlyCodeRenderer.SetCode(CurrentSample.UpdatedXamlCode, \"xaml\");\n+\n+                        InfoAreaPivot.Items.Add(XamlReadOnlyPivotItem);\n+                    }\n+                    else\n+                    {\n+                        XamlCodeEditor.Text = CurrentSample.UpdatedXamlCode;\n+\n+                        InfoAreaPivot.Items.Add(XamlPivotItem);\n+\n+                        _xamlCodeRendererSupported = true;\n+                    }\n+\n+                    InfoAreaPivot.SelectedIndex = 0;\n+                }\n+\n+                if (CurrentSample.HasCSharpCode)\n+                {\n+                    var code = await CurrentSample.GetCSharpSourceAsync();\n+\n+                    CSharpCodeRenderer.SetCode(code, \"c#\");\n+                    InfoAreaPivot.Items.Add(CSharpPivotItem);\n+                }\n+\n+                if (CurrentSample.HasJavaScriptCode)\n+                {\n+                    var code = await CurrentSample.GetJavaScriptSourceAsync();\n+\n+                    JavaScriptCodeRenderer.SetCode(code, \"js\");\n+                    InfoAreaPivot.Items.Add(JavaScriptPivotItem);\n+                }\n+\n+                if (CurrentSample.HasDocumentation)\n+                {\n+                    var (contents, path) = await CurrentSample.GetDocumentationAsync();\n+                    documentationPath = path;\n+                    if (!string.IsNullOrWhiteSpace(contents))\n+                    {\n+                        DocumentationTextblock.Text = contents;\n+                        InfoAreaPivot.Items.Add(DocumentationPivotItem);\n+                    }\n+                }\n+\n+                // Hide the Github button if there isn't a CodeUrl.\n+                if (string.IsNullOrEmpty(CurrentSample.CodeUrl))\n+                {\n+                    GithubButton.Visibility = Visibility.Collapsed;\n+                }\n+\n+                if (InfoAreaPivot.Items.Count == 0)\n+                {\n+                    SidePaneState = PaneState.None;\n+                    _hasDocumentation = false;\n+                }\n+                else\n+                {\n+                    SidePaneState = _onlyDocumentation ? PaneState.Full : PaneState.Normal;\n+                }\n+\n+                Shell.Current.SetTitles($\"{CurrentSample.CategoryName} > {CurrentSample.Name}\");\n+            }\n+            else\n+            {\n+                ExceptionNotification.Show(\"Sample does not exist\");\n+            }\n+\n+            if (!CanChangePaneState)\n+            {\n+                SampleTitleBar.Children.Remove(NarrowInfoButton);\n+                PaneStates.States.Clear();\n+                WindowStates.States.Clear();\n+            }\n+        }\n+\n+        protected override void OnNavigatedFrom(NavigationEventArgs e)\n+        {\n+            base.OnNavigatedFrom(e);\n+            if (SamplePage is ISampleNavigation nav)\n+            {\n+                nav.NavigatingAway();\n+            }\n+\n+            XamlCodeEditor = null;\n+\n+            // Not great, but need to collect up after WebView. (Does this work?)\n+            GC.Collect();\n+        }\n+\n+        private void SamplePage_Loaded(object sender, RoutedEventArgs e)\n+        {\n+            if (CurrentSample != null && CurrentSample.HasXAMLCode)\n+            {\n+                this._lastRenderedProperties = true;\n+\n+                // Called to load the sample initially as we don't get an Item Pivot Selection Changed with Sample Loaded yet.\n+                var t = UpdateXamlRenderAsync(CurrentSample.BindedXamlCode);\n+            }\n+        }\n+\n+        private async void InfoAreaPivot_OnSelectionChanged(object sender, SelectionChangedEventArgs e)\n+        {\n+            if (InfoAreaPivot.SelectedItem != null)\n+            {\n+                if (DataContext is Sample sample)\n+                {\n+                    TrackingManager.TrackEvent(\"PropertyGrid\", (InfoAreaPivot.SelectedItem as FrameworkElement)?.Name, sample.Name);\n+                }\n+            }\n+\n+            if (CurrentSample == null)\n+            {\n+                return;\n+            }\n+\n+            if (InfoAreaPivot.SelectedItem == PropertiesPivotItem)\n+            {\n+                // If we switch to the Properties Panel, we want to use a binded version of the Xaml Code.\n+                if (CurrentSample.HasXAMLCode)\n+                {\n+                    _lastRenderedProperties = true;\n+\n+                    var t = UpdateXamlRenderAsync(CurrentSample.BindedXamlCode);\n+                }\n+\n+                return;\n+            }\n+\n+            if (CurrentSample.HasXAMLCode && InfoAreaPivot.SelectedItem == XamlPivotItem && _lastRenderedProperties)\n+            {\n+                // Use this flag so we don't re-render the XAML tab if we're switching from tabs other than the properties one.\n+                _lastRenderedProperties = false;\n+\n+                // If we switch to the Live Preview, then we want to use the Value based Text\n+                XamlCodeEditor.Text = CurrentSample.UpdatedXamlCode;\n+\n+                var t = UpdateXamlRenderAsync(CurrentSample.UpdatedXamlCode);\n+                await XamlCodeEditor.ResetPosition();\n+\n+                XamlCodeEditor.Focus(FocusState.Programmatic);\n+                return;\n+            }\n+\n+            if (CurrentSample.HasXAMLCode && InfoAreaPivot.SelectedItem == XamlReadOnlyPivotItem)\n+            {\n+                // Update Read-Only XAML tab on non-desktop devices to show changes to Properties\n+                XamlReadOnlyCodeRenderer.SetCode(CurrentSample.UpdatedXamlCode, \"xaml\");\n+            }\n+\n+            if (CurrentSample.HasCSharpCode && InfoAreaPivot.SelectedItem == CSharpPivotItem)\n+            {\n+                var code = await CurrentSample.GetCSharpSourceAsync();\n+                CSharpCodeRenderer.SetCode(code, \"c#\");\n+\n+                return;\n+            }\n+\n+            if (CurrentSample.HasJavaScriptCode && InfoAreaPivot.SelectedItem == JavaScriptPivotItem)\n+            {\n+                var code = await CurrentSample.GetJavaScriptSourceAsync();\n+                JavaScriptCodeRenderer.SetCode(code, \"js\");\n+\n+                return;\n+            }\n+        }\n+\n+        private async void XamlCodeEditor_UpdateRequested(object sender, EventArgs e)\n+        {\n+            await Dispatcher.RunAsync(CoreDispatcherPriority.Low, () =>\n+            {\n+                var t = UpdateXamlRenderAsync(XamlCodeEditor.Text);\n+            });\n+        }\n+\n+        private async void DocumentationTextblock_OnLinkClicked(object sender, LinkClickedEventArgs e)\n+        {\n+            TrackingManager.TrackEvent(\"Link\", e.Link);\n+            if (Uri.TryCreate(e.Link, UriKind.Absolute, out Uri result))\n+            {\n+                await Launcher.LaunchUriAsync(new Uri(e.Link));\n+            }\n+        }\n+\n+        private async void DocumentationTextblock_ImageResolving(object sender, ImageResolvingEventArgs e)\n+        {\n+            var deferral = e.GetDeferral();\n+            BitmapImage image = null;\n+\n+            // Determine if the link is not absolute, meaning it is relative.\n+            if (!Uri.TryCreate(e.Url, UriKind.Absolute, out Uri url))\n+            {\n+                url = new Uri(documentationPath + e.Url);\n+            }\n+\n+            if (url.Scheme == \"ms-appx\")\n+            {\n+                image = new BitmapImage(url);\n+            }\n+            else\n+            {\n+                var imageStream = await CurrentSample.GetImageStream(url);\n+\n+                if (imageStream != null)\n+                {\n+                    image = new BitmapImage();\n+                    await image.SetSourceAsync(imageStream);\n+                }\n+            }\n+\n+            // Handle only if no exceptions occur.\n+            if (image != null)\n+            {\n+                e.Image = image;\n+                e.Handled = true;\n+            }\n+\n+            deferral.Complete();\n+        }\n+\n+        private async void GitHub_OnClick(object sender, RoutedEventArgs e)\n+        {\n+            var url = CurrentSample.CodeUrl;\n+            TrackingManager.TrackEvent(\"Link\", url);\n+            try\n+            {\n+                await Launcher.LaunchUriAsync(new Uri(url));\n+            }\n+            catch { }\n+        }\n+\n+        private async Task UpdateXamlRenderAsync(string text)\n+        {\n+            // Hide any Previous Errors\n+            XamlCodeEditor.ClearErrors();\n+\n+            // Try and Render Xaml to a UIElement\n+            UIElement element = null;\n+            try\n+            {\n+                element = _xamlRenderer.Render(text);\n+            }\n+            catch (Exception ex)\n+            {\n+                ExceptionNotification.Show(ex.Message, 3000);\n+            }\n+\n+            if (element != null)\n+            {\n+                // Add element to main panel\n+                if (SamplePage == null)\n+                {\n+                    return;\n+                }\n+\n+                var root = SamplePage.FindDescendantByName(\"XamlRoot\");\n+\n+                if (root is Panel)\n+                {\n+                    // If we've defined a 'XamlRoot' element to host us as a panel, use that.\n+                    (root as Panel).Children.Clear();\n+                    (root as Panel).Children.Add(element);\n+                }\n+                else\n+                {\n+                    // Otherwise, just replace the entire page's content\n+                    SamplePage.Content = element;\n+                }\n+\n+                // Tell the page we've finished with an update to the XAML contents, after the control has rendered.\n+                await Dispatcher.RunAsync(CoreDispatcherPriority.Low, () =>\n+                {\n+                    (SamplePage as IXamlRenderListener)?.OnXamlRendered(element as FrameworkElement);\n+                });\n+            }\n+            else if (_xamlRenderer.Errors.Count > 0)\n+            {\n+                var error = _xamlRenderer.Errors.First();\n+\n+                XamlCodeEditor.ReportError(error);\n+            }\n+        }\n+\n+        private Visibility GreaterThanZero(int value)\n+        {\n+            return value > 0 ? Visibility.Visible : Visibility.Collapsed;\n+        }\n+\n+        private Visibility Not(bool value)\n+        {\n+            return value ? Visibility.Collapsed : Visibility.Visible;\n+        }\n+\n+        private void UpdateProperty([CallerMemberName] string propertyName = \"\")\n+        {\n+            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));\n+        }\n+\n+        private void ProcessSampleEditorTime()\n+        {\n+            if (CurrentSample != null &&\n+                CurrentSample.HasXAMLCode &&\n+                _xamlCodeRendererSupported)\n+            {\n+                if (XamlCodeEditor.TimeSampleEditedFirst != DateTime.MinValue &&\n+                    XamlCodeEditor.TimeSampleEditedLast != DateTime.MinValue)\n+                {\n+                    int secondsEdditingSample = (int)Math.Floor((XamlCodeEditor.TimeSampleEditedLast - XamlCodeEditor.TimeSampleEditedFirst).TotalSeconds);\n+                    TrackingManager.TrackEvent(\"xamleditor\", \"edited\", CurrentSample.Name, secondsEdditingSample);\n+                }\n+                else\n+                {\n+                    TrackingManager.TrackEvent(\"xamleditor\", \"not_edited\", CurrentSample.Name);\n+                }\n+            }\n+\n+            XamlCodeEditor.ResetTimer();\n+        }\n+\n+        private void WindowStates_CurrentStateChanged(object sender, VisualStateChangedEventArgs e)\n+        {\n+            switch (e.NewState.Name)\n+            {\n+                case nameof(NarrowState):\n+                    if (CanChangePaneState)\n+                    {\n+                        SidePaneState = PaneState.Closed;\n+                    }\n+\n+                    // Update Read-Only XAML tab when switching back to show changes to TwoWay Bound Properties\n+                    if (CurrentSample?.HasXAMLCode == true && InfoAreaPivot.SelectedItem == XamlReadOnlyPivotItem)\n+                    {\n+                        XamlReadOnlyCodeRenderer.SetCode(CurrentSample.UpdatedXamlCode, \"xaml\");\n+                    }\n+\n+                    break;\n+\n+                case nameof(WideState):\n+                    if (CanChangePaneState)\n+                    {\n+                        SidePaneState = PaneState.Normal;\n+                    }\n+\n+                    break;\n+            }\n+        }\n+\n+        private void PaneStates_CurrentStateChanged(object sender, VisualStateChangedEventArgs e)\n+        {\n+            if (e.OldState?.Name == nameof(Full) && WindowStates.CurrentState?.Name == nameof(NarrowState))\n+            {\n+                // Restart the State, full state changed things.\n+                VisualStateManager.GoToState(this, NarrowState.Name, false);\n+            }\n+        }\n+\n+        private void Current_ThemeChanged(object sender, ThemeChangedArgs e)\n+        {\n+            if (e.CustomSet)\n+            {\n+                DocumentationTextblock.RequestedTheme = e.Theme;\n+            }\n+        }\n+\n+        private void ThemePicker_SelectionChanged(object sender, SelectionChangedEventArgs e)\n+        {\n+            try\n+            {\n+                Shell.Current.SetCurrentTheme((ElementTheme)ThemePicker.SelectedIndex);\n+            }\n+            catch (Exception ex)\n+            {\n+                ExceptionNotification.Show(ex.Message);\n+            }\n+        }\n+\n+        public Sample CurrentSample { get; private set; }\n+\n+        public ObservableCollection<SampleCommand> Commands { get; } = new ObservableCollection<SampleCommand>();\n+\n+        public bool DisplayWaitRing\n+        {\n+            set { waitRing.Visibility = value ? Visibility.Visible : Visibility.Collapsed; }\n+        }\n+\n+        public PaneState SidePaneState\n+        {\n+            get => _paneState;\n+            set\n+            {\n+                _paneState = value;\n+                UpdateProperty();\n+            }\n+        }\n+\n+        public bool UseBackground\n+        {\n+            get\n+            {\n+                return _useBackground;\n+            }\n+\n+            set\n+            {\n+                _useBackground = value;\n+                UpdateProperty(nameof(UseBackground));\n+            }\n+        }\n+\n+        private Page SamplePage => SampleContent.Content as Page;","path":"Microsoft.Toolkit.Uwp.SampleApp/Pages/SampleController.xaml.cs","position":596,"original_position":584,"commit_id":"70082651cbf218e6606c57d06e2df7e22d7108ce","original_commit_id":"48617020de9cc894bbaa41f7ae8db2858b5606ed","user":{"login":"WilliamABradley","id":6026537,"node_id":"MDQ6VXNlcjYwMjY1Mzc=","avatar_url":"https://avatars0.githubusercontent.com/u/6026537?v=4","gravatar_id":"","url":"https://api.github.com/users/WilliamABradley","html_url":"https://github.com/WilliamABradley","followers_url":"https://api.github.com/users/WilliamABradley/followers","following_url":"https://api.github.com/users/WilliamABradley/following{/other_user}","gists_url":"https://api.github.com/users/WilliamABradley/gists{/gist_id}","starred_url":"https://api.github.com/users/WilliamABradley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WilliamABradley/subscriptions","organizations_url":"https://api.github.com/users/WilliamABradley/orgs","repos_url":"https://api.github.com/users/WilliamABradley/repos","events_url":"https://api.github.com/users/WilliamABradley/events{/privacy}","received_events_url":"https://api.github.com/users/WilliamABradley/received_events","type":"User","site_admin":false},"body":"If you put them at the top, the public ones complain they aren't ahead of private members.","created_at":"2018-06-07T23:16:53Z","updated_at":"2018-06-07T23:16:54Z","html_url":"https://github.com/Microsoft/WindowsCommunityToolkit/pull/1755#discussion_r193915141","pull_request_url":"https://api.github.com/repos/Microsoft/WindowsCommunityToolkit/pulls/1755","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/Microsoft/WindowsCommunityToolkit/pulls/comments/193915141"},"html":{"href":"https://github.com/Microsoft/WindowsCommunityToolkit/pull/1755#discussion_r193915141"},"pull_request":{"href":"https://api.github.com/repos/Microsoft/WindowsCommunityToolkit/pulls/1755"}},"in_reply_to_id":191910417},"pull_request":{"url":"https://api.github.com/repos/Microsoft/WindowsCommunityToolkit/pulls/1755","id":164157228,"node_id":"MDExOlB1bGxSZXF1ZXN0MTY0MTU3MjI4","html_url":"https://github.com/Microsoft/WindowsCommunityToolkit/pull/1755","diff_url":"https://github.com/Microsoft/WindowsCommunityToolkit/pull/1755.diff","patch_url":"https://github.com/Microsoft/WindowsCommunityToolkit/pull/1755.patch","issue_url":"https://api.github.com/repos/Microsoft/WindowsCommunityToolkit/issues/1755","number":1755,"state":"open","locked":false,"title":"Sample App Fluent Design & Dark Theme","user":{"login":"WilliamABradley","id":6026537,"node_id":"MDQ6VXNlcjYwMjY1Mzc=","avatar_url":"https://avatars0.githubusercontent.com/u/6026537?v=4","gravatar_id":"","url":"https://api.github.com/users/WilliamABradley","html_url":"https://github.com/WilliamABradley","followers_url":"https://api.github.com/users/WilliamABradley/followers","following_url":"https://api.github.com/users/WilliamABradley/following{/other_user}","gists_url":"https://api.github.com/users/WilliamABradley/gists{/gist_id}","starred_url":"https://api.github.com/users/WilliamABradley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WilliamABradley/subscriptions","organizations_url":"https://api.github.com/users/WilliamABradley/orgs","repos_url":"https://api.github.com/users/WilliamABradley/repos","events_url":"https://api.github.com/users/WilliamABradley/events{/privacy}","received_events_url":"https://api.github.com/users/WilliamABradley/received_events","type":"User","site_admin":false},"body":"Issue: #1539\r\n<!-- Link to relevant issue. All PRs should be asociated with an issue -->\r\n- [x] Add Dark Theme to Sample App.\r\n- [x] Add Toggle to switch between Themes on the Shell.\r\n\r\n## PR Type\r\nWhat kind of change does this PR introduce?\r\n\r\n* Sample app changes\r\n\r\n![image](https://user-images.githubusercontent.com/6026537/40237975-05fb66ac-5b06-11e8-8436-b1abfaac570c.png)\r\n\r\n![image](https://user-images.githubusercontent.com/6026537/40237995-15c4448c-5b06-11e8-9981-67ec8e66e320.png)\r\n\r\n![image](https://user-images.githubusercontent.com/6026537/40238022-2ce785d4-5b06-11e8-9f6b-4b4de62cd33f.png)\r\n\r\n![image](https://user-images.githubusercontent.com/6026537/40238063-43f59838-5b06-11e8-87af-29ff2fb42806.png)\r\n\r\n## PR Checklist\r\nPlease check if your PR fulfills the following requirements:\r\n\r\n- [x] Tested code with current [supported SDKs](../readme.md#supported)","created_at":"2018-01-21T03:01:05Z","updated_at":"2018-06-07T23:16:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9d588bd8720d12388adad83d75cbeeacad1e4213","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":452957315,"node_id":"MDU6TGFiZWw0NTI5NTczMTU=","url":"https://api.github.com/repos/Microsoft/WindowsCommunityToolkit/labels/improvements","name":"improvements","color":"0e8a16","default":false},{"id":446241994,"node_id":"MDU6TGFiZWw0NDYyNDE5OTQ=","url":"https://api.github.com/repos/Microsoft/WindowsCommunityToolkit/labels/reviewers%20wanted","name":"reviewers wanted","color":"fbca04","default":false},{"id":427025823,"node_id":"MDU6TGFiZWw0MjcwMjU4MjM=","url":"https://api.github.com/repos/Microsoft/WindowsCommunityToolkit/labels/sample%20app","name":"sample app","color":"1d76db","default":false}],"milestone":{"url":"https://api.github.com/repos/Microsoft/WindowsCommunityToolkit/milestones/13","html_url":"https://github.com/Microsoft/WindowsCommunityToolkit/milestone/13","labels_url":"https://api.github.com/repos/Microsoft/WindowsCommunityToolkit/milestones/13/labels","id":3204967,"node_id":"MDk6TWlsZXN0b25lMzIwNDk2Nw==","number":13,"title":"3.1","description":"Code freeze 8/22/18","creator":{"login":"nmetulev","id":711864,"node_id":"MDQ6VXNlcjcxMTg2NA==","avatar_url":"https://avatars1.githubusercontent.com/u/711864?v=4","gravatar_id":"","url":"https://api.github.com/users/nmetulev","html_url":"https://github.com/nmetulev","followers_url":"https://api.github.com/users/nmetulev/followers","following_url":"https://api.github.com/users/nmetulev/following{/other_user}","gists_url":"https://api.github.com/users/nmetulev/gists{/gist_id}","starred_url":"https://api.github.com/users/nmetulev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nmetulev/subscriptions","organizations_url":"https://api.github.com/users/nmetulev/orgs","repos_url":"https://api.github.com/users/nmetulev/repos","events_url":"https://api.github.com/users/nmetulev/events{/privacy}","received_events_url":"https://api.github.com/users/nmetulev/received_events","type":"User","site_admin":false},"open_issues":42,"closed_issues":4,"state":"open","created_at":"2018-03-20T22:44:04Z","updated_at":"2018-06-07T22:05:35Z","due_on":"2018-08-29T07:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/Microsoft/WindowsCommunityToolkit/pulls/1755/commits","review_comments_url":"https://api.github.com/repos/Microsoft/WindowsCommunityToolkit/pulls/1755/comments","review_comment_url":"https://api.github.com/repos/Microsoft/WindowsCommunityToolkit/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Microsoft/WindowsCommunityToolkit/issues/1755/comments","statuses_url":"https://api.github.com/repos/Microsoft/WindowsCommunityToolkit/statuses/70082651cbf218e6606c57d06e2df7e22d7108ce","head":{"label":"WilliamABradley:DarkTheme","ref":"DarkTheme","sha":"70082651cbf218e6606c57d06e2df7e22d7108ce","user":{"login":"WilliamABradley","id":6026537,"node_id":"MDQ6VXNlcjYwMjY1Mzc=","avatar_url":"https://avatars0.githubusercontent.com/u/6026537?v=4","gravatar_id":"","url":"https://api.github.com/users/WilliamABradley","html_url":"https://github.com/WilliamABradley","followers_url":"https://api.github.com/users/WilliamABradley/followers","following_url":"https://api.github.com/users/WilliamABradley/following{/other_user}","gists_url":"https://api.github.com/users/WilliamABradley/gists{/gist_id}","starred_url":"https://api.github.com/users/WilliamABradley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WilliamABradley/subscriptions","organizations_url":"https://api.github.com/users/WilliamABradley/orgs","repos_url":"https://api.github.com/users/WilliamABradley/repos","events_url":"https://api.github.com/users/WilliamABradley/events{/privacy}","received_events_url":"https://api.github.com/users/WilliamABradley/received_events","type":"User","site_admin":false},"repo":{"id":83203369,"node_id":"MDEwOlJlcG9zaXRvcnk4MzIwMzM2OQ==","name":"WindowsCommunityToolkit","full_name":"WilliamABradley/WindowsCommunityToolkit","owner":{"login":"WilliamABradley","id":6026537,"node_id":"MDQ6VXNlcjYwMjY1Mzc=","avatar_url":"https://avatars0.githubusercontent.com/u/6026537?v=4","gravatar_id":"","url":"https://api.github.com/users/WilliamABradley","html_url":"https://github.com/WilliamABradley","followers_url":"https://api.github.com/users/WilliamABradley/followers","following_url":"https://api.github.com/users/WilliamABradley/following{/other_user}","gists_url":"https://api.github.com/users/WilliamABradley/gists{/gist_id}","starred_url":"https://api.github.com/users/WilliamABradley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WilliamABradley/subscriptions","organizations_url":"https://api.github.com/users/WilliamABradley/orgs","repos_url":"https://api.github.com/users/WilliamABradley/repos","events_url":"https://api.github.com/users/WilliamABradley/events{/privacy}","received_events_url":"https://api.github.com/users/WilliamABradley/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/WilliamABradley/WindowsCommunityToolkit","description":"The Windows Community Toolkit is a collection of helper functions, custom controls, and app services. It simplifies and demonstrates common developer tasks building UWP apps for Windows 10. The toolkit is part of the .NET Foundation.","fork":true,"url":"https://api.github.com/repos/WilliamABradley/WindowsCommunityToolkit","forks_url":"https://api.github.com/repos/WilliamABradley/WindowsCommunityToolkit/forks","keys_url":"https://api.github.com/repos/WilliamABradley/WindowsCommunityToolkit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/WilliamABradley/WindowsCommunityToolkit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/WilliamABradley/WindowsCommunityToolkit/teams","hooks_url":"https://api.github.com/repos/WilliamABradley/WindowsCommunityToolkit/hooks","issue_events_url":"https://api.github.com/repos/WilliamABradley/WindowsCommunityToolkit/issues/events{/number}","events_url":"https://api.github.com/repos/WilliamABradley/WindowsCommunityToolkit/events","assignees_url":"https://api.github.com/repos/WilliamABradley/WindowsCommunityToolkit/assignees{/user}","branches_url":"https://api.github.com/repos/WilliamABradley/WindowsCommunityToolkit/branches{/branch}","tags_url":"https://api.github.com/repos/WilliamABradley/WindowsCommunityToolkit/tags","blobs_url":"https://api.github.com/repos/WilliamABradley/WindowsCommunityToolkit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/WilliamABradley/WindowsCommunityToolkit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/WilliamABradley/WindowsCommunityToolkit/git/refs{/sha}","trees_url":"https://api.github.com/repos/WilliamABradley/WindowsCommunityToolkit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/WilliamABradley/WindowsCommunityToolkit/statuses/{sha}","languages_url":"https://api.github.com/repos/WilliamABradley/WindowsCommunityToolkit/languages","stargazers_url":"https://api.github.com/repos/WilliamABradley/WindowsCommunityToolkit/stargazers","contributors_url":"https://api.github.com/repos/WilliamABradley/WindowsCommunityToolkit/contributors","subscribers_url":"https://api.github.com/repos/WilliamABradley/WindowsCommunityToolkit/subscribers","subscription_url":"https://api.github.com/repos/WilliamABradley/WindowsCommunityToolkit/subscription","commits_url":"https://api.github.com/repos/WilliamABradley/WindowsCommunityToolkit/commits{/sha}","git_commits_url":"https://api.github.com/repos/WilliamABradley/WindowsCommunityToolkit/git/commits{/sha}","comments_url":"https://api.github.com/repos/WilliamABradley/WindowsCommunityToolkit/comments{/number}","issue_comment_url":"https://api.github.com/repos/WilliamABradley/WindowsCommunityToolkit/issues/comments{/number}","contents_url":"https://api.github.com/repos/WilliamABradley/WindowsCommunityToolkit/contents/{+path}","compare_url":"https://api.github.com/repos/WilliamABradley/WindowsCommunityToolkit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/WilliamABradley/WindowsCommunityToolkit/merges","archive_url":"https://api.github.com/repos/WilliamABradley/WindowsCommunityToolkit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/WilliamABradley/WindowsCommunityToolkit/downloads","issues_url":"https://api.github.com/repos/WilliamABradley/WindowsCommunityToolkit/issues{/number}","pulls_url":"https://api.github.com/repos/WilliamABradley/WindowsCommunityToolkit/pulls{/number}","milestones_url":"https://api.github.com/repos/WilliamABradley/WindowsCommunityToolkit/milestones{/number}","notifications_url":"https://api.github.com/repos/WilliamABradley/WindowsCommunityToolkit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/WilliamABradley/WindowsCommunityToolkit/labels{/name}","releases_url":"https://api.github.com/repos/WilliamABradley/WindowsCommunityToolkit/releases{/id}","deployments_url":"https://api.github.com/repos/WilliamABradley/WindowsCommunityToolkit/deployments","created_at":"2017-02-26T11:24:24Z","updated_at":"2018-06-07T21:31:37Z","pushed_at":"2018-06-07T23:07:47Z","git_url":"git://github.com/WilliamABradley/WindowsCommunityToolkit.git","ssh_url":"git@github.com:WilliamABradley/WindowsCommunityToolkit.git","clone_url":"https://github.com/WilliamABradley/WindowsCommunityToolkit.git","svn_url":"https://github.com/WilliamABradley/WindowsCommunityToolkit","homepage":"http://docs.uwpcommunitytoolkit.com","size":281302,"stargazers_count":1,"watchers_count":1,"language":"C#","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"Microsoft:master","ref":"master","sha":"6b39b825472df4efa3e27c6ccaf9ac7f03f059ea","user":{"login":"Microsoft","id":6154722,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYxNTQ3MjI=","avatar_url":"https://avatars2.githubusercontent.com/u/6154722?v=4","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"repo":{"id":61403402,"node_id":"MDEwOlJlcG9zaXRvcnk2MTQwMzQwMg==","name":"WindowsCommunityToolkit","full_name":"Microsoft/WindowsCommunityToolkit","owner":{"login":"Microsoft","id":6154722,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYxNTQ3MjI=","avatar_url":"https://avatars2.githubusercontent.com/u/6154722?v=4","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Microsoft/WindowsCommunityToolkit","description":"The Windows Community Toolkit is a collection of helper functions, custom controls, and app services. It simplifies and demonstrates common developer tasks building UWP apps for Windows 10. The toolkit is part of the .NET Foundation.","fork":false,"url":"https://api.github.com/repos/Microsoft/WindowsCommunityToolkit","forks_url":"https://api.github.com/repos/Microsoft/WindowsCommunityToolkit/forks","keys_url":"https://api.github.com/repos/Microsoft/WindowsCommunityToolkit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Microsoft/WindowsCommunityToolkit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Microsoft/WindowsCommunityToolkit/teams","hooks_url":"https://api.github.com/repos/Microsoft/WindowsCommunityToolkit/hooks","issue_events_url":"https://api.github.com/repos/Microsoft/WindowsCommunityToolkit/issues/events{/number}","events_url":"https://api.github.com/repos/Microsoft/WindowsCommunityToolkit/events","assignees_url":"https://api.github.com/repos/Microsoft/WindowsCommunityToolkit/assignees{/user}","branches_url":"https://api.github.com/repos/Microsoft/WindowsCommunityToolkit/branches{/branch}","tags_url":"https://api.github.com/repos/Microsoft/WindowsCommunityToolkit/tags","blobs_url":"https://api.github.com/repos/Microsoft/WindowsCommunityToolkit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Microsoft/WindowsCommunityToolkit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Microsoft/WindowsCommunityToolkit/git/refs{/sha}","trees_url":"https://api.github.com/repos/Microsoft/WindowsCommunityToolkit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Microsoft/WindowsCommunityToolkit/statuses/{sha}","languages_url":"https://api.github.com/repos/Microsoft/WindowsCommunityToolkit/languages","stargazers_url":"https://api.github.com/repos/Microsoft/WindowsCommunityToolkit/stargazers","contributors_url":"https://api.github.com/repos/Microsoft/WindowsCommunityToolkit/contributors","subscribers_url":"https://api.github.com/repos/Microsoft/WindowsCommunityToolkit/subscribers","subscription_url":"https://api.github.com/repos/Microsoft/WindowsCommunityToolkit/subscription","commits_url":"https://api.github.com/repos/Microsoft/WindowsCommunityToolkit/commits{/sha}","git_commits_url":"https://api.github.com/repos/Microsoft/WindowsCommunityToolkit/git/commits{/sha}","comments_url":"https://api.github.com/repos/Microsoft/WindowsCommunityToolkit/comments{/number}","issue_comment_url":"https://api.github.com/repos/Microsoft/WindowsCommunityToolkit/issues/comments{/number}","contents_url":"https://api.github.com/repos/Microsoft/WindowsCommunityToolkit/contents/{+path}","compare_url":"https://api.github.com/repos/Microsoft/WindowsCommunityToolkit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Microsoft/WindowsCommunityToolkit/merges","archive_url":"https://api.github.com/repos/Microsoft/WindowsCommunityToolkit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Microsoft/WindowsCommunityToolkit/downloads","issues_url":"https://api.github.com/repos/Microsoft/WindowsCommunityToolkit/issues{/number}","pulls_url":"https://api.github.com/repos/Microsoft/WindowsCommunityToolkit/pulls{/number}","milestones_url":"https://api.github.com/repos/Microsoft/WindowsCommunityToolkit/milestones{/number}","notifications_url":"https://api.github.com/repos/Microsoft/WindowsCommunityToolkit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Microsoft/WindowsCommunityToolkit/labels{/name}","releases_url":"https://api.github.com/repos/Microsoft/WindowsCommunityToolkit/releases{/id}","deployments_url":"https://api.github.com/repos/Microsoft/WindowsCommunityToolkit/deployments","created_at":"2016-06-17T21:29:46Z","updated_at":"2018-06-07T22:21:26Z","pushed_at":"2018-06-07T23:09:08Z","git_url":"git://github.com/Microsoft/WindowsCommunityToolkit.git","ssh_url":"git@github.com:Microsoft/WindowsCommunityToolkit.git","clone_url":"https://github.com/Microsoft/WindowsCommunityToolkit.git","svn_url":"https://github.com/Microsoft/WindowsCommunityToolkit","homepage":"https://docs.microsoft.com/windows/uwpcommunitytoolkit/","size":410438,"stargazers_count":2034,"watchers_count":2034,"language":"C#","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":639,"mirror_url":null,"archived":false,"open_issues_count":155,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":639,"open_issues":155,"watchers":2034,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Microsoft/WindowsCommunityToolkit/pulls/1755"},"html":{"href":"https://github.com/Microsoft/WindowsCommunityToolkit/pull/1755"},"issue":{"href":"https://api.github.com/repos/Microsoft/WindowsCommunityToolkit/issues/1755"},"comments":{"href":"https://api.github.com/repos/Microsoft/WindowsCommunityToolkit/issues/1755/comments"},"review_comments":{"href":"https://api.github.com/repos/Microsoft/WindowsCommunityToolkit/pulls/1755/comments"},"review_comment":{"href":"https://api.github.com/repos/Microsoft/WindowsCommunityToolkit/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Microsoft/WindowsCommunityToolkit/pulls/1755/commits"},"statuses":{"href":"https://api.github.com/repos/Microsoft/WindowsCommunityToolkit/statuses/70082651cbf218e6606c57d06e2df7e22d7108ce"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"WilliamABradley"}}