From fbf33448924dd5a1c8f06b9f4d4a12cb96cc818e Mon Sep 17 00:00:00 2001 From: michael-hawker <24302614+michael-hawker@users.noreply.github.com> Date: Tue, 17 Nov 2020 14:50:01 -0800 Subject: [PATCH 1/3] Update NuGet versions and move to 7.0.0-preview4 --- Directory.Build.props | 4 ++-- .../Controls/GraphPresenter/GraphPresenter.cs | 4 ++-- .../Microsoft.Toolkit.Graph.Controls.csproj | 6 +++--- Microsoft.Toolkit.Graph/Microsoft.Toolkit.Graph.csproj | 8 ++++---- Microsoft.Toolkit.Graph/Providers/ProviderManager.cs | 3 --- SampleTest/SampleTest.csproj | 4 ++-- .../UWP-XamlApplication/UWP-XamlApplication.csproj | 2 +- .../WPF-Packaged-App/WPF-Packaged-App.wapproj | 2 +- 8 files changed, 15 insertions(+), 18 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index 119e486..7677667 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -16,8 +16,8 @@ $(MSBuildProjectName.Contains('Uwp')) $(MSBuildProjectName.Contains('Sample')) $(MSBuildProjectName.Contains('Wpf')) - 17763 - 16299 + 19041 + 17763 $(MSBuildThisFileDirectory)bin\nupkg diff --git a/Microsoft.Toolkit.Graph.Controls/Controls/GraphPresenter/GraphPresenter.cs b/Microsoft.Toolkit.Graph.Controls/Controls/GraphPresenter/GraphPresenter.cs index 772c85e..91cb6a5 100644 --- a/Microsoft.Toolkit.Graph.Controls/Controls/GraphPresenter/GraphPresenter.cs +++ b/Microsoft.Toolkit.Graph.Controls/Controls/GraphPresenter/GraphPresenter.cs @@ -7,7 +7,7 @@ using System.Linq; using System.Threading; using Microsoft.Graph; -using Microsoft.Toolkit.Uwp.Helpers; +using Microsoft.Toolkit.Uwp.Extensions; using Newtonsoft.Json.Linq; using Windows.System; using Windows.UI.Xaml; @@ -104,7 +104,7 @@ private async void GraphPresenter_Loaded(object sender, RoutedEventArgs e) data = values.ToObject(ResponseType); } - _ = DispatcherQueueHelper.ExecuteOnUIThreadAsync(dispatcherQueue, () => Content = data); + _ = dispatcherQueue.EnqueueAsync(() => Content = data); } catch { diff --git a/Microsoft.Toolkit.Graph.Controls/Microsoft.Toolkit.Graph.Controls.csproj b/Microsoft.Toolkit.Graph.Controls/Microsoft.Toolkit.Graph.Controls.csproj index 1449ef9..7174287 100644 --- a/Microsoft.Toolkit.Graph.Controls/Microsoft.Toolkit.Graph.Controls.csproj +++ b/Microsoft.Toolkit.Graph.Controls/Microsoft.Toolkit.Graph.Controls.csproj @@ -25,8 +25,8 @@ - - + + @@ -35,7 +35,7 @@ - + diff --git a/Microsoft.Toolkit.Graph/Microsoft.Toolkit.Graph.csproj b/Microsoft.Toolkit.Graph/Microsoft.Toolkit.Graph.csproj index f119fed..6d265f3 100644 --- a/Microsoft.Toolkit.Graph/Microsoft.Toolkit.Graph.csproj +++ b/Microsoft.Toolkit.Graph/Microsoft.Toolkit.Graph.csproj @@ -1,7 +1,7 @@  - uap10.0.16299;netstandard2.0 + uap10.0.17763;netstandard2.0 Windows Community Toolkit .NET Standard Graph Services This package includes .NET Standard code helpers such as: @@ -16,13 +16,13 @@ AnyCPU;ARM;ARM64;x64;x86 - + $(DefineConstants);WINRT - + - + diff --git a/Microsoft.Toolkit.Graph/Providers/ProviderManager.cs b/Microsoft.Toolkit.Graph/Providers/ProviderManager.cs index f585ef5..e417de0 100644 --- a/Microsoft.Toolkit.Graph/Providers/ProviderManager.cs +++ b/Microsoft.Toolkit.Graph/Providers/ProviderManager.cs @@ -4,9 +4,6 @@ using System; using System.ComponentModel; -using Microsoft.Graph; -using Microsoft.Identity.Client; -using Microsoft.Toolkit.Helpers; namespace Microsoft.Toolkit.Graph.Providers { diff --git a/SampleTest/SampleTest.csproj b/SampleTest/SampleTest.csproj index 4a1c7d9..1a0f4a0 100644 --- a/SampleTest/SampleTest.csproj +++ b/SampleTest/SampleTest.csproj @@ -11,8 +11,8 @@ SampleTest en-US UAP - 10.0.18362.0 - 10.0.16299.0 + 10.0.19041.0 + 10.0.17763.0 14 512 {A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} diff --git a/Samples/XAML Islands/UWP-XamlApplication/UWP-XamlApplication.csproj b/Samples/XAML Islands/UWP-XamlApplication/UWP-XamlApplication.csproj index 0cb286f..b99b1ec 100644 --- a/Samples/XAML Islands/UWP-XamlApplication/UWP-XamlApplication.csproj +++ b/Samples/XAML Islands/UWP-XamlApplication/UWP-XamlApplication.csproj @@ -11,7 +11,7 @@ UWP-XamlApplication en-US UAP - 10.0.18362.0 + 10.0.19041.0 10.0.18362.0 14 512 diff --git a/Samples/XAML Islands/WPF-Packaged-App/WPF-Packaged-App.wapproj b/Samples/XAML Islands/WPF-Packaged-App/WPF-Packaged-App.wapproj index a9f5fe7..b6fed9f 100644 --- a/Samples/XAML Islands/WPF-Packaged-App/WPF-Packaged-App.wapproj +++ b/Samples/XAML Islands/WPF-Packaged-App/WPF-Packaged-App.wapproj @@ -51,7 +51,7 @@ fe713229-aee5-489a-9251-c346a82c1ac3 - 10.0.18362.0 + 10.0.19041.0 10.0.18362.0 en-US false From 63d5cef661eb8b88e6a334b05dd6cffc053b95d6 Mon Sep 17 00:00:00 2001 From: michael-hawker <24302614+michael-hawker@users.noreply.github.com> Date: Tue, 17 Nov 2020 14:54:49 -0800 Subject: [PATCH 2/3] Apply XAML Styler --- .../Controls/LoginButton/LoginButton.xaml | 38 +-- .../Controls/PeoplePicker/PeoplePicker.xaml | 31 ++- .../Controls/PersonView/PersonView.xaml | 89 +++---- SampleTest/App.xaml | 11 +- SampleTest/MainPage.xaml | 238 ++++++++++-------- .../XAML Islands/UWP-XamlApplication/App.xaml | 13 +- .../UWP-XamlApplication/SamplePage.xaml | 37 +-- .../WPF-Core-GraphApp/MainWindow.xaml | 24 +- 8 files changed, 267 insertions(+), 214 deletions(-) diff --git a/Microsoft.Toolkit.Graph.Controls/Controls/LoginButton/LoginButton.xaml b/Microsoft.Toolkit.Graph.Controls/Controls/LoginButton/LoginButton.xaml index 2017d88..db1ad64 100644 --- a/Microsoft.Toolkit.Graph.Controls/Controls/LoginButton/LoginButton.xaml +++ b/Microsoft.Toolkit.Graph.Controls/Controls/LoginButton/LoginButton.xaml @@ -1,22 +1,23 @@ - + - - - + + + - + The `LoginButton` above allows your user and application to easily connect to the Microsoft Graph. They can then also easily logout from the drop-down menu. @@ -44,16 +43,20 @@ - + The `PeoplePicker` lets a logged in user easily search for familiar people they interact with or contacts. Great for emails or messages. - - Picked People: - + + + Picked People: + + - + @@ -62,8 +65,8 @@ - - + + The `GraphPresenter` is a unique control in the library which makes it easier for a developer to make any graph call and configure a nice display template in XAML. This opens up a world of possibilities for many uses outside of any other control available within this library. You can see a few examples of what's possible below. @@ -71,54 +74,62 @@ - - + + The following example shows the `Me.CalendarView` API. - My Upcoming Calendar Events: + + My Upcoming Calendar Events: + + IsCollection="True" + OrderBy="start/dateTime" + RequestBuilder="{x:Bind providers:ProviderManager.Instance.GlobalProvider.Graph.Me.CalendarView, Mode=OneWay}" + ResponseType="graph:Event"> - - - + + + - - + + - + - - - - + + - + - - - + + + @@ -131,33 +142,42 @@ - - + + The following example shows the `Me.Messages` API for getting a user's inbox mail messages. - My Messages: + + My Messages: + + IsCollection="True" + RequestBuilder="{x:Bind providers:ProviderManager.Instance.GlobalProvider.Graph.Me.Messages, Mode=OneWay}" + ResponseType="graph:Message"> - + - - - + + + @@ -170,53 +190,64 @@ - - + + The following example shows the `Me.Planner.Tasks` API for getting a user's tasks. - My Tasks: + + My Tasks: + + IsCollection="True" + RequestBuilder="{x:Bind providers:ProviderManager.Instance.GlobalProvider.Graph.Me.Planner.Tasks, Mode=OneWay}" + ResponseType="graph:PlannerTask"> - + - - - + + + - - - + + + - - - - + + + + - - + + - + - - Due - + + Due + @@ -224,7 +255,7 @@ @@ -237,36 +268,43 @@ - - + + The following example shows the beta `Teams/id/Channels/id/messages` API for getting a list of messages (without replies) from a Channel in Teams. - My Chat Messages: + + My Chat Messages: + + IsCollection="True" + RequestBuilder="{x:Bind local:MainPage.GetTeamsChannelMessagesBuilder('02bd9fd6-8f93-4758-87c3-1fb73740a315', '19:d0bba23c2fc8413991125a43a54cc30e@thread.skype'), Mode=OneWay}" + ResponseType="graph:ChatMessage"> - + - - + + - - + + diff --git a/Samples/XAML Islands/UWP-XamlApplication/App.xaml b/Samples/XAML Islands/UWP-XamlApplication/App.xaml index 1498952..8d71d14 100644 --- a/Samples/XAML Islands/UWP-XamlApplication/App.xaml +++ b/Samples/XAML Islands/UWP-XamlApplication/App.xaml @@ -1,8 +1,5 @@ - - - \ No newline at end of file + \ No newline at end of file diff --git a/Samples/XAML Islands/UWP-XamlApplication/SamplePage.xaml b/Samples/XAML Islands/UWP-XamlApplication/SamplePage.xaml index 929d714..447c173 100644 --- a/Samples/XAML Islands/UWP-XamlApplication/SamplePage.xaml +++ b/Samples/XAML Islands/UWP-XamlApplication/SamplePage.xaml @@ -1,25 +1,28 @@ - + - + - - Picked People: - + + + Picked People: + + - + diff --git a/Samples/XAML Islands/WPF-Core-GraphApp/MainWindow.xaml b/Samples/XAML Islands/WPF-Core-GraphApp/MainWindow.xaml index 3f5e649..073b839 100644 --- a/Samples/XAML Islands/WPF-Core-GraphApp/MainWindow.xaml +++ b/Samples/XAML Islands/WPF-Core-GraphApp/MainWindow.xaml @@ -1,30 +1,32 @@  + Title="MainWindow" + Width="800" + Height="450" + mc:Ignorable="d"> - + - + From 2c5ed2b385329149e8ce4ff0fdd6874a339aba77 Mon Sep 17 00:00:00 2001 From: michael-hawker <24302614+michael-hawker@users.noreply.github.com> Date: Tue, 17 Nov 2020 15:06:34 -0800 Subject: [PATCH 3/3] Forgot update of TargetFramework to Microsoft.Toolkit.Graph.Controls package --- .../Microsoft.Toolkit.Graph.Controls.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Microsoft.Toolkit.Graph.Controls/Microsoft.Toolkit.Graph.Controls.csproj b/Microsoft.Toolkit.Graph.Controls/Microsoft.Toolkit.Graph.Controls.csproj index 7174287..75cb0a1 100644 --- a/Microsoft.Toolkit.Graph.Controls/Microsoft.Toolkit.Graph.Controls.csproj +++ b/Microsoft.Toolkit.Graph.Controls/Microsoft.Toolkit.Graph.Controls.csproj @@ -1,7 +1,7 @@  - uap10.0.16299 + uap10.0.17763 Windows Community Toolkit Graph Controls Microsoft.Toolkit.Graph.Controls