From 164e9754f2a745c1d794741ad37c0d7dbea88e44 Mon Sep 17 00:00:00 2001 From: michael-hawker Date: Fri, 13 Sep 2019 21:42:09 -0700 Subject: [PATCH 01/12] Move GraphExtensions to Extensions directory --- .../{Helpers => Extensions}/GraphExtensions.cs | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Microsoft.Toolkit.Graph/{Helpers => Extensions}/GraphExtensions.cs (100%) diff --git a/Microsoft.Toolkit.Graph/Helpers/GraphExtensions.cs b/Microsoft.Toolkit.Graph/Extensions/GraphExtensions.cs similarity index 100% rename from Microsoft.Toolkit.Graph/Helpers/GraphExtensions.cs rename to Microsoft.Toolkit.Graph/Extensions/GraphExtensions.cs From 601e18d2d53420d82b02038864cb0e1b8e8ab81f Mon Sep 17 00:00:00 2001 From: michael-hawker Date: Fri, 13 Sep 2019 21:47:47 -0700 Subject: [PATCH 02/12] Initial update to provider architecture to map to MGT and provide Login/Logout capabilities and events --- .../Providers/GlobalProvider.cs | 74 -------- .../Providers/IProvider.cs | 42 +++++ .../Providers/MsalProvider.cs | 176 ++++++++++++++++++ .../Providers/ProviderManager.cs | 72 +++++++ .../Providers/ProviderManagerChangedState.cs | 22 +++ .../Providers/ProviderState.cs | 23 +++ .../Providers/ProviderUpdatedEventArgs.cs | 28 +++ .../Providers/StateChangedEventArgs.cs | 31 +++ 8 files changed, 394 insertions(+), 74 deletions(-) delete mode 100644 Microsoft.Toolkit.Graph/Providers/GlobalProvider.cs create mode 100644 Microsoft.Toolkit.Graph/Providers/IProvider.cs create mode 100644 Microsoft.Toolkit.Graph/Providers/MsalProvider.cs create mode 100644 Microsoft.Toolkit.Graph/Providers/ProviderManager.cs create mode 100644 Microsoft.Toolkit.Graph/Providers/ProviderManagerChangedState.cs create mode 100644 Microsoft.Toolkit.Graph/Providers/ProviderState.cs create mode 100644 Microsoft.Toolkit.Graph/Providers/ProviderUpdatedEventArgs.cs create mode 100644 Microsoft.Toolkit.Graph/Providers/StateChangedEventArgs.cs diff --git a/Microsoft.Toolkit.Graph/Providers/GlobalProvider.cs b/Microsoft.Toolkit.Graph/Providers/GlobalProvider.cs deleted file mode 100644 index f7e7e1a..0000000 --- a/Microsoft.Toolkit.Graph/Providers/GlobalProvider.cs +++ /dev/null @@ -1,74 +0,0 @@ -// 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.Graph; -using Microsoft.Identity.Client; -using Microsoft.Toolkit.Helpers; - -namespace Microsoft.Toolkit.Graph -{ - /// - /// Shared Provider used by controls in Microsoft.Toolkit.Graph.Controls to authenticate and call the Microsoft Graph. - /// - /// To set your own existing provider: - /// - /// TODO - /// - /// - public class GlobalProvider - { - /// - /// Gets the name of the toolkit client to identify self in Graph calls. - /// - public static readonly string ClientName = "Windows Community Toolkit" + ThisAssembly.AssemblyVersion; - - /// - /// Gets the instance of the GlobalProvider - /// - public static GlobalProvider Instance => Singleton.Instance; - - /// - /// Gets the to access the MicrosoftGraph. - /// - public GraphServiceClient Graph { get; private set; } - - private IAuthenticationProvider _provider; - - /// - /// Gets or sets the Provider used for calls to the Microsoft.Graph SDK. Automatically constructs a new with that provider. - /// - public IAuthenticationProvider Provider - { - get - { - return _provider; - } - - set - { - _provider = value; - if (Graph == null && _provider != null) - { - Graph = new GraphServiceClient(_provider); - } - } - } - - /// - /// Gets or sets the reference used for MSAL. - /// - public IPublicClientApplication Client { get; set; } - - /// - /// Logs out all users. - /// - public async void Logout() - { - foreach (var user in await Client.GetAccountsAsync()) - { - await Client.RemoveAsync(user); - } - } - } -} diff --git a/Microsoft.Toolkit.Graph/Providers/IProvider.cs b/Microsoft.Toolkit.Graph/Providers/IProvider.cs new file mode 100644 index 0000000..d535b9e --- /dev/null +++ b/Microsoft.Toolkit.Graph/Providers/IProvider.cs @@ -0,0 +1,42 @@ +using System; +using System.ComponentModel; +using System.Net.Http; +using System.Runtime.CompilerServices; +using System.Threading.Tasks; +using Microsoft.Graph; + +namespace Microsoft.Toolkit.Graph.Providers +{ + /// + /// helper wrapper to expose more states around the authentication process for graph controls. + /// + public interface IProvider : IAuthenticationProvider + { + /// + /// Gets the current login state of the provider. + /// + ProviderState State { get; } + + /// + /// Gets the object to access the Microsoft Graph APIs. + /// + GraphServiceClient Graph { get; } + + /// + /// Event called when the login changes. + /// + event EventHandler StateChanged; + + /// + /// Login the user. + /// + /// + Task LoginAsync(); + + /// + /// Logout the user. + /// + /// + Task LogoutAsync(); + } +} diff --git a/Microsoft.Toolkit.Graph/Providers/MsalProvider.cs b/Microsoft.Toolkit.Graph/Providers/MsalProvider.cs new file mode 100644 index 0000000..9843bba --- /dev/null +++ b/Microsoft.Toolkit.Graph/Providers/MsalProvider.cs @@ -0,0 +1,176 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net.Http; +using System.Threading.Tasks; +using Microsoft.Graph; +using Microsoft.Identity.Client; + +namespace Microsoft.Toolkit.Graph.Providers +{ + //// TODO: Move some of this to a simple base-class for non-MSAL parts related to Provider only and properties? + + /// + /// MSAL.NET provider helper for tracking authentication state using an class. + /// + public class MsalProvider : IProvider + { + /// + /// Gets or sets the initial scopes to request. + /// + public List Scopes { get; protected set; } // TODO: Do we need this? + + /// + /// Gets or sets the MSAL.NET Client used to authenticate the user. + /// + protected IPublicClientApplication Client { get; set; } + + /// + /// Gets or sets the provider used by the graph to manage requests. + /// + protected IAuthenticationProvider Provider { get; set; } + + private ProviderState _state = ProviderState.Loading; + + /// + public ProviderState State + { + get + { + return _state; + } + + set + { + var current = _state; + _state = value; + + StateChanged?.Invoke(this, new StateChangedEventArgs(current, _state)); + } + } + + /// + public GraphServiceClient Graph { get; private set; } + + /// + public event EventHandler StateChanged; + + /// + /// Initializes a new instance of the class. + /// + private MsalProvider() + { + } + + /// + /// Initializes a new instance of the class. + /// + /// Existing instance. + /// Existing instance. + /// Initial scopes to request. + /// A returning a instance. + public static async Task CreateAsync(IPublicClientApplication client, IAuthenticationProvider provider, List scopes = null) + { + //// TODO: Check all config provided + + var msal = new MsalProvider + { + Client = client, + Provider = provider, + Graph = new GraphServiceClient(provider), + Scopes = scopes // TODO: Redundant? Can I use a dummy for the try silent below? + }; + + await msal.TrySilentSignInAsync(); + + return msal; + } + + /// + public async Task AuthenticateRequestAsync(HttpRequestMessage request) + { + try + { + await Provider.AuthenticateRequestAsync(request); + } + catch (Exception) + { + // TODO: Catch different types of errors and try and re-auth? Should be handled by Graph Auth Providers. + // Assume we're signed-out on error? + State = ProviderState.SignedOut; + + return; + } + + // Check state after request to see if we're now signed-in. + if (State != ProviderState.SignedIn) + { + if ((await Client.GetAccountsAsync()).Any()) + { + State = ProviderState.SignedIn; + } + else + { + State = ProviderState.SignedOut; + } + } + } + + /// + /// Tries to check if the user is logged in without prompting to login. + /// + /// A representing the asynchronous operation. + public async Task TrySilentSignInAsync() + { + var account = (await Client.GetAccountsAsync()).FirstOrDefault(); + + if (account == null) + { + // No accounts + State = ProviderState.SignedOut; + } + else + { + try + { + // Try and sign-in // TODO: can we use empty scopes? + var result = await Client.AcquireTokenSilent(Scopes, account).ExecuteAsync(); + + if (!string.IsNullOrWhiteSpace(result.AccessToken)) + { + State = ProviderState.SignedIn; + } + else + { + State = ProviderState.SignedOut; + } + } + catch (MsalUiRequiredException) + { + await LoginAsync(); + } + catch (Exception) + { + State = ProviderState.SignedOut; + } + } + } + + /// + public async Task LoginAsync() + { + // Force fake request to start auth process + await AuthenticateRequestAsync(new System.Net.Http.HttpRequestMessage()); + } + + /// + public async Task LogoutAsync() + { + // Forcibly remove each user. + foreach (var user in await Client.GetAccountsAsync()) + { + await Client.RemoveAsync(user); + } + } + } +} diff --git a/Microsoft.Toolkit.Graph/Providers/ProviderManager.cs b/Microsoft.Toolkit.Graph/Providers/ProviderManager.cs new file mode 100644 index 0000000..39b29f2 --- /dev/null +++ b/Microsoft.Toolkit.Graph/Providers/ProviderManager.cs @@ -0,0 +1,72 @@ +// 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.Graph; +using Microsoft.Identity.Client; +using Microsoft.Toolkit.Helpers; + +namespace Microsoft.Toolkit.Graph.Providers +{ + /// + /// Shared provider manager used by controls in Microsoft.Toolkit.Graph.Controls to authenticate and call the Microsoft Graph. + /// + /// To set your own existing provider: + /// + /// ProviderManager.Instance.GlobalProvider = await MsalProvider.CreateAsync(...); + /// + /// + public class ProviderManager + { + /// + /// Gets the name of the toolkit client to identify self in Graph calls. + /// + public static readonly string ClientName = "Windows Community Toolkit" + ThisAssembly.AssemblyVersion; + + /// + /// Gets the instance of the GlobalProvider + /// + public static ProviderManager Instance => Singleton.Instance; + + /// + /// Event called when the changes. + /// + public event EventHandler ProviderUpdated; + + private IProvider _provider; + + /// + /// Gets or sets the global provider used by all Microsoft.Toolkit.Graph.Controls. + /// + public IProvider GlobalProvider + { + get + { + return _provider; + } + + set + { + if (_provider != null) + { + _provider.StateChanged -= ProviderStateChanged; + } + + _provider = value; + + if (_provider != null) + { + _provider.StateChanged += ProviderStateChanged; + } + + ProviderUpdated?.Invoke(this, new ProviderUpdatedEventArgs(ProviderManagerChangedState.ProviderChanged)); + } + } + + private void ProviderStateChanged(object sender, StateChangedEventArgs e) + { + ProviderUpdated?.Invoke(this, new ProviderUpdatedEventArgs(ProviderManagerChangedState.ProviderStateChanged)); + } + } +} diff --git a/Microsoft.Toolkit.Graph/Providers/ProviderManagerChangedState.cs b/Microsoft.Toolkit.Graph/Providers/ProviderManagerChangedState.cs new file mode 100644 index 0000000..31ff1b9 --- /dev/null +++ b/Microsoft.Toolkit.Graph/Providers/ProviderManagerChangedState.cs @@ -0,0 +1,22 @@ +// 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 Microsoft.Toolkit.Graph.Providers +{ + /// + /// Enum representing reasons for provider state changing. + /// + public enum ProviderManagerChangedState + { + /// + /// The itself changed. + /// + ProviderChanged, + + /// + /// The changed. + /// + ProviderStateChanged + } +} \ No newline at end of file diff --git a/Microsoft.Toolkit.Graph/Providers/ProviderState.cs b/Microsoft.Toolkit.Graph/Providers/ProviderState.cs new file mode 100644 index 0000000..01ca4c6 --- /dev/null +++ b/Microsoft.Toolkit.Graph/Providers/ProviderState.cs @@ -0,0 +1,23 @@ +namespace Microsoft.Toolkit.Graph.Providers +{ + /// + /// represents the current authentication state of the session for a given . + /// + public enum ProviderState + { + /// + /// The user's status is not known. + /// + Loading, + + /// + /// The user is signed-out. + /// + SignedOut, + + /// + /// The user is signed-in. + /// + SignedIn + } +} diff --git a/Microsoft.Toolkit.Graph/Providers/ProviderUpdatedEventArgs.cs b/Microsoft.Toolkit.Graph/Providers/ProviderUpdatedEventArgs.cs new file mode 100644 index 0000000..4b652cb --- /dev/null +++ b/Microsoft.Toolkit.Graph/Providers/ProviderUpdatedEventArgs.cs @@ -0,0 +1,28 @@ +// 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; + +namespace Microsoft.Toolkit.Graph.Providers +{ + /// + /// class for event. + /// + public class ProviderUpdatedEventArgs : EventArgs + { + /// + /// Initializes a new instance of the class. + /// + /// value for reason for update. + public ProviderUpdatedEventArgs(ProviderManagerChangedState reason) + { + Reason = reason; + } + + /// + /// Gets the reason for the provider update. + /// + public ProviderManagerChangedState Reason { get; private set; } + } +} \ No newline at end of file diff --git a/Microsoft.Toolkit.Graph/Providers/StateChangedEventArgs.cs b/Microsoft.Toolkit.Graph/Providers/StateChangedEventArgs.cs new file mode 100644 index 0000000..4934fe4 --- /dev/null +++ b/Microsoft.Toolkit.Graph/Providers/StateChangedEventArgs.cs @@ -0,0 +1,31 @@ +using System; + +namespace Microsoft.Toolkit.Graph.Providers +{ + /// + /// event arguments. + /// + public class StateChangedEventArgs : EventArgs + { + /// + /// Initializes a new instance of the class. + /// + /// Previous + /// Current + public StateChangedEventArgs(ProviderState oldState, ProviderState newState) + { + OldState = oldState; + NewState = newState; + } + + /// + /// Gets the previous state of the . + /// + public ProviderState OldState { get; private set; } + + /// + /// Gets the new state of the . + /// + public ProviderState NewState { get; private set; } + } +} \ No newline at end of file From 1fe580235082654ba194e72ef679e366b818efb7 Mon Sep 17 00:00:00 2001 From: michael-hawker Date: Fri, 13 Sep 2019 23:17:40 -0700 Subject: [PATCH 03/12] Add PersonView Control, InteractiveProvider XAML helper, and Sample Test app --- .../Assets/person.png | Bin 0 -> 5250 bytes .../PersonView/PersonView.Properties.cs | 165 +++++++++++++ .../Controls/PersonView/PersonView.cs | 222 ++++++++++++++++++ .../Controls/PersonView/PersonView.xaml | 64 +++++ .../Microsoft.Toolkit.Graph.Controls.csproj | 54 +++++ .../Properties/AssemblyInfo.cs | 11 + .../Microsoft.Toolkit.Graph.Controls.rd.xml | 5 + .../CommonProviderWrapper.Properties.cs | 62 +++++ .../Providers/CommonProviderWrapper.cs | 62 +++++ .../Providers/InteractiveProvider.cs | 45 ++++ .../Providers/ScopeSet.cs | 31 +++ .../Themes/Generic.xaml | 6 + .../VisualStudioToolsManifest.xml | 7 + .../Providers/IProvider.cs | 6 +- .../Providers/MsalProvider.cs | 21 +- .../Providers/ProviderState.cs | 6 +- .../Providers/StateChangedEventArgs.cs | 6 +- SampleTest/App.xaml | 10 + SampleTest/App.xaml.cs | 104 ++++++++ .../Assets/LockScreenLogo.scale-200.png | Bin 0 -> 1430 bytes SampleTest/Assets/SplashScreen.scale-200.png | Bin 0 -> 7700 bytes .../Assets/Square150x150Logo.scale-200.png | Bin 0 -> 2937 bytes .../Assets/Square44x44Logo.scale-200.png | Bin 0 -> 1647 bytes ...x44Logo.targetsize-24_altform-unplated.png | Bin 0 -> 1255 bytes SampleTest/Assets/StoreLogo.png | Bin 0 -> 1451 bytes .../Assets/Wide310x150Logo.scale-200.png | Bin 0 -> 3204 bytes SampleTest/MainPage.xaml | 16 ++ SampleTest/MainPage.xaml.cs | 47 ++++ SampleTest/Package.appxmanifest | 49 ++++ SampleTest/Properties/AssemblyInfo.cs | 31 +++ SampleTest/Properties/Default.rd.xml | 31 +++ SampleTest/SampleTest.csproj | 178 ++++++++++++++ Windows-Toolkit-Graph-Controls.sln | 86 +++++++ 33 files changed, 1311 insertions(+), 14 deletions(-) create mode 100644 Microsoft.Toolkit.Graph.Controls/Assets/person.png create mode 100644 Microsoft.Toolkit.Graph.Controls/Controls/PersonView/PersonView.Properties.cs create mode 100644 Microsoft.Toolkit.Graph.Controls/Controls/PersonView/PersonView.cs create mode 100644 Microsoft.Toolkit.Graph.Controls/Controls/PersonView/PersonView.xaml create mode 100644 Microsoft.Toolkit.Graph.Controls/Microsoft.Toolkit.Graph.Controls.csproj create mode 100644 Microsoft.Toolkit.Graph.Controls/Properties/AssemblyInfo.cs create mode 100644 Microsoft.Toolkit.Graph.Controls/Properties/Microsoft.Toolkit.Graph.Controls.rd.xml create mode 100644 Microsoft.Toolkit.Graph.Controls/Providers/CommonProviderWrapper.Properties.cs create mode 100644 Microsoft.Toolkit.Graph.Controls/Providers/CommonProviderWrapper.cs create mode 100644 Microsoft.Toolkit.Graph.Controls/Providers/InteractiveProvider.cs create mode 100644 Microsoft.Toolkit.Graph.Controls/Providers/ScopeSet.cs create mode 100644 Microsoft.Toolkit.Graph.Controls/Themes/Generic.xaml create mode 100644 Microsoft.Toolkit.Graph.Controls/VisualStudioToolsManifest.xml create mode 100644 SampleTest/App.xaml create mode 100644 SampleTest/App.xaml.cs create mode 100644 SampleTest/Assets/LockScreenLogo.scale-200.png create mode 100644 SampleTest/Assets/SplashScreen.scale-200.png create mode 100644 SampleTest/Assets/Square150x150Logo.scale-200.png create mode 100644 SampleTest/Assets/Square44x44Logo.scale-200.png create mode 100644 SampleTest/Assets/Square44x44Logo.targetsize-24_altform-unplated.png create mode 100644 SampleTest/Assets/StoreLogo.png create mode 100644 SampleTest/Assets/Wide310x150Logo.scale-200.png create mode 100644 SampleTest/MainPage.xaml create mode 100644 SampleTest/MainPage.xaml.cs create mode 100644 SampleTest/Package.appxmanifest create mode 100644 SampleTest/Properties/AssemblyInfo.cs create mode 100644 SampleTest/Properties/Default.rd.xml create mode 100644 SampleTest/SampleTest.csproj diff --git a/Microsoft.Toolkit.Graph.Controls/Assets/person.png b/Microsoft.Toolkit.Graph.Controls/Assets/person.png new file mode 100644 index 0000000000000000000000000000000000000000..35668622a7d75a0a8b1ffbc795e94abde0f93188 GIT binary patch literal 5250 zcmV-|6n*Q7P)KLZ*U+lnSp_Ufq@}0xwybFAi#%#fq@|}KQEO51AM#2z{tSB zz;IdD(Z$J?fi%FHTu@ZPz`$^Tfq}s&CAB!2fq~%*0|P^Pc}YPD0|R3W0|SFdQg%TJ z0|R3L0|SFdc1Vyj0|R3V0|OIJNoqw20|NttbACZ(QD%BZiGrb}rKN&nN`6wRLU3hq zNosDff@fZGeo;YwQDRAI3IhWJ)D8v)1_oZ2{1OHC#LPSeLsL}-Dual~C?)grM$+xhxmf|p7B=;2nnnfbQ63e)F`Yd zd{`u1lvi}CSe!Vg_*RJ&Nny#OQWes=(obaO$cD-Z%AJ+(QSedZRlJ}yML9}EN#(Wb zR<%ZTKMh%px0?I3CTgeZSnCSuzS29QKi{CnFv`f%Skm~n$vxA{#r++CO)=?RdfInDbtjt*-0cR=O|sSme3TYk~JdpT)k*{8ss|57-*GH|SXK z`H)+o&%(Y$FhvSRDMcH{xWz`r<;Axo%ud{#bT;{UDpQ(Vx=lt@W>wa#>^(X6@|g0~ z3w#QTi)I%eE_qufQSMSvSUIoiZ1vw-y}J1NNe#yue>WSnq_@s%yWSz#>D|@deYlsQ z&%VEI!oG?BCp%7QoqA$A?~LG?vt~V-qcyi=-o6D~3&R#IUi@*X!?Fp>AFecB)w=rT zTHSR`>u+u}*wnH4!B(qnQ@4NE>AP#y9*(`~`;H$_KiGNb^%1|Ln~#g1s6F}QwD*}U z=VZ^fU-)z>?((Ut7T1>D5WU%Y>+7BLyEpIqJUH;k^zrJaiqB@g5PaG7n)yxL+n?`C zKYaRB@c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H) literal 0 HcmV?d00001 diff --git a/Microsoft.Toolkit.Graph.Controls/Controls/PersonView/PersonView.Properties.cs b/Microsoft.Toolkit.Graph.Controls/Controls/PersonView/PersonView.Properties.cs new file mode 100644 index 0000000..84fdbed --- /dev/null +++ b/Microsoft.Toolkit.Graph.Controls/Controls/PersonView/PersonView.Properties.cs @@ -0,0 +1,165 @@ +// 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.Linq; +using System.Text; +using System.Threading.Tasks; +using Microsoft.Graph; +using Windows.UI.Xaml; +using Windows.UI.Xaml.Media.Imaging; + +namespace Microsoft.Toolkit.Graph.Controls +{ + /// + /// The control displays a user photo and can display their name and e-mail. + /// + public partial class PersonView + { + /// + /// Gets or sets details about this person retrieved from the graph or provided by the developer. + /// + public Person PersonDetails + { + get { return (Person)GetValue(PersonDetailsProperty); } + set { SetValue(PersonDetailsProperty, value); } + } + + /// + /// Identifies the dependency property. + /// + /// + /// The identifier for the dependency property. + /// + public static readonly DependencyProperty PersonDetailsProperty = + DependencyProperty.Register(nameof(PersonDetails), typeof(Person), typeof(PersonView), new PropertyMetadata(null, PersonDetailsPropertyChanged)); + + /// + /// Gets or sets a string to automatically retrieve data on the specified query from the graph. Use to retrieve info about the current user. Otherwise, it's best to use an e-mail address as a query. + /// + public string PersonQuery + { + get { return (string)GetValue(PersonQueryProperty); } + set { SetValue(PersonQueryProperty, value); } + } + + /// + /// Identifies the dependency property. + /// + /// + /// The identifier for the dependency property. + /// + public static readonly DependencyProperty PersonQueryProperty = + DependencyProperty.Register(nameof(PersonQuery), typeof(string), typeof(PersonView), new PropertyMetadata(null, QueryPropertyChanged)); + + /// + /// Gets or sets the UserId. + /// + public string UserId + { + get { return (string)GetValue(UserIdProperty); } + set { SetValue(UserIdProperty, value); } + } + + /// + /// Identifies the dependency property. + /// + /// + /// The identifier for the dependency property. + /// + public static readonly DependencyProperty UserIdProperty = + DependencyProperty.Register(nameof(UserId), typeof(string), typeof(PersonView), new PropertyMetadata(null, QueryPropertyChanged)); + + /// + /// Gets or sets a value indicating whether the user's name should be displayed. + /// + public bool ShowName + { + get { return (bool)GetValue(ShowNameProperty); } + set { SetValue(ShowNameProperty, value); } + } + + /// + /// Identifies the dependency property. + /// + /// + /// The identifier for the dependency property. + /// + public static readonly DependencyProperty ShowNameProperty = + DependencyProperty.Register(nameof(ShowName), typeof(bool), typeof(PersonView), new PropertyMetadata(false, ShowDisplayPropertiesChanged)); + + /// + /// Gets or sets a value indicating whether the user's email address should be displayed. + /// + public bool ShowEmail + { + get { return (bool)GetValue(ShowEmailProperty); } + set { SetValue(ShowEmailProperty, value); } + } + + /// + /// Identifies the dependency property. + /// + /// + /// The identifier for the dependency property. + /// + public static readonly DependencyProperty ShowEmailProperty = + DependencyProperty.Register(nameof(ShowEmail), typeof(bool), typeof(PersonView), new PropertyMetadata(false, ShowDisplayPropertiesChanged)); + + /// + /// Gets or sets the photo of the user to be displayed. + /// + public BitmapImage UserPhoto + { + get { return (BitmapImage)GetValue(UserPhotoProperty); } + set { SetValue(UserPhotoProperty, value); } + } + + /// + /// Identifies the dependency property. + /// + /// + /// The identifier for the dependency property. + /// + public static readonly DependencyProperty UserPhotoProperty = + DependencyProperty.Register(nameof(UserPhoto), typeof(BitmapImage), typeof(PersonView), new PropertyMetadata(null)); + + /// + /// Gets the initials of the person from the . + /// + public string Initials + { + get { return (string)GetValue(InitialsProperty); } + internal set { SetValue(InitialsProperty, value); } + } + + /// + /// Identifies the dependency property. + /// + /// + /// The identifier for the dependency property. + /// + public static readonly DependencyProperty InitialsProperty = + DependencyProperty.Register(nameof(Initials), typeof(string), typeof(PersonView), new PropertyMetadata(string.Empty)); + + /// + /// Gets a value indicating whether the image has expanded because both and are enabled. + /// + public bool IsLargeImage + { + get { return (bool)GetValue(IsLargeImageProperty); } + internal set { SetValue(IsLargeImageProperty, value); } + } + + /// + /// Identifies the dependency property. + /// + /// + /// The identifier for the dependency property. + /// + public static readonly DependencyProperty IsLargeImageProperty = + DependencyProperty.Register(nameof(IsLargeImage), typeof(bool), typeof(PersonView), new PropertyMetadata(false)); + } +} diff --git a/Microsoft.Toolkit.Graph.Controls/Controls/PersonView/PersonView.cs b/Microsoft.Toolkit.Graph.Controls/Controls/PersonView/PersonView.cs new file mode 100644 index 0000000..ab71617 --- /dev/null +++ b/Microsoft.Toolkit.Graph.Controls/Controls/PersonView/PersonView.cs @@ -0,0 +1,222 @@ +// 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.IO; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.Graph; +using Microsoft.Toolkit.Graph.Helpers; +using Microsoft.Toolkit.Graph.Providers; +using Windows.UI.Xaml; +using Windows.UI.Xaml.Controls; +using Windows.UI.Xaml.Media.Imaging; + +namespace Microsoft.Toolkit.Graph.Controls +{ + /// + /// The control displays a user photo and can display their name and e-mail. + /// + public partial class PersonView : Control + { + /// + /// value used to retrieve the signed-in user's info. + /// + public const string PersonQueryMe = "me"; + + private static readonly string[] RequiredScopes = new string[] { "user.readbasic.all" }; + + private string _photoId = null; + + private static async void PersonDetailsPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) + { + if (d is PersonView pv) + { + if (pv.PersonDetails != null) + { + if (pv.PersonDetails.GivenName?.Length > 0 && pv.PersonDetails.Surname?.Length > 0) + { + pv.Initials = string.Empty + pv.PersonDetails.GivenName[0] + pv.PersonDetails.Surname[0]; + } + else if (pv.PersonDetails.DisplayName?.Length > 0) + { + // Grab first two initials in name + var initials = pv.PersonDetails.DisplayName.ToUpper().Split(' ').Select(i => i.First()); + pv.Initials = string.Join(string.Empty, initials.Where(i => char.IsLetter(i)).Take(2)); + } + + if (pv.UserPhoto == null || pv.PersonDetails.Id != pv._photoId) + { + // Reload Image + pv.UserPhoto = null; + await pv.LoadImageAsync(pv.PersonDetails); + } + else if (pv.PersonDetails.Id != pv._photoId) + { + pv.UserPhoto = null; + pv._photoId = null; + } + } + } + } + + private static void QueryPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) + { + if (d is PersonView view) + { + view.PersonDetails = null; + view.LoadData(); + } + } + + private static void ShowDisplayPropertiesChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) + { + if (d is PersonView pv) + { + pv.IsLargeImage = pv.ShowName && pv.ShowEmail; + } + } + + /// + /// Initializes a new instance of the class. + /// + public PersonView() + { + this.DefaultStyleKey = typeof(PersonView); + + ProviderManager.Instance.ProviderUpdated += (sender, args) => LoadData(); + } + + /// + protected override void OnApplyTemplate() + { + base.OnApplyTemplate(); + + LoadData(); + } + + private async void LoadData() + { + var provider = ProviderManager.Instance.GlobalProvider; + + if (provider == null || provider.State != ProviderState.SignedIn) + { + return; + } + + if (PersonDetails != null && UserPhoto == null) + { + await LoadImageAsync(PersonDetails); + } + else if (!string.IsNullOrWhiteSpace(UserId) || PersonQuery?.ToLowerInvariant() == PersonQueryMe) + { + User user = null; + if (!string.IsNullOrWhiteSpace(UserId)) + { + // TODO: Batch when API easier https://github.com/microsoftgraph/msgraph-sdk-dotnet-core/issues/29 + try + { + user = await provider.Graph.Users[UserId].Request().GetAsync(); + } + catch + { + } + + try + { + // TODO: Move to LoadImage based on previous call? + await DecodeStreamAsync(await provider.Graph.Users[UserId].Photo.Content.Request().GetAsync()); + _photoId = UserId; + } + catch + { + } + } + else + { + try + { + user = await provider.Graph.Me.Request().GetAsync(); + } + catch + { + } + + try + { + await DecodeStreamAsync(await provider.Graph.Me.Photo.Content.Request().GetAsync()); + _photoId = user.Id; + } + catch + { + } + } + + if (user != null) + { + PersonDetails = new Person() + { + Id = user.Id, + DisplayName = user.DisplayName, + ScoredEmailAddresses = new ScoredEmailAddress[] + { + new ScoredEmailAddress() + { + Address = user.Mail ?? user.UserPrincipalName + } + }, + GivenName = user.GivenName, + Surname = user.Surname + }; + } + } + else if (PersonDetails == null && !string.IsNullOrWhiteSpace(PersonQuery)) + { + var people = await provider.Graph.FindPersonAsync(PersonQuery); + if (people != null && people.Count > 0) + { + var person = people.FirstOrDefault(); + PersonDetails = person; + await LoadImageAsync(person); + } + } + } + + private async Task LoadImageAsync(Person person) + { + try + { + // TODO: Better guarding + var graph = ProviderManager.Instance.GlobalProvider.Graph; + + if (!string.IsNullOrWhiteSpace(person.UserPrincipalName)) + { + await DecodeStreamAsync(await graph.GetUserPhoto(person.UserPrincipalName)); + _photoId = person.Id; // TODO: Only set on success for photo? + } + else if (!string.IsNullOrWhiteSpace(person.ScoredEmailAddresses.First().Address)) + { + // TODO https://github.com/microsoftgraph/microsoft-graph-toolkit/blob/master/src/components/mgt-person/mgt-person.ts#L174 + } + } + catch + { + // If we can't load a photo, that's ok. + } + } + + private async Task DecodeStreamAsync(Stream photoStream) + { + if (photoStream != null) + { + using (var ras = photoStream.AsRandomAccessStream()) + { + var bitmap = new BitmapImage(); + await bitmap.SetSourceAsync(ras); + UserPhoto = bitmap; + } + } + } + } +} diff --git a/Microsoft.Toolkit.Graph.Controls/Controls/PersonView/PersonView.xaml b/Microsoft.Toolkit.Graph.Controls/Controls/PersonView/PersonView.xaml new file mode 100644 index 0000000..9957ed5 --- /dev/null +++ b/Microsoft.Toolkit.Graph.Controls/Controls/PersonView/PersonView.xaml @@ -0,0 +1,64 @@ + + + + + + + + + diff --git a/Microsoft.Toolkit.Graph.Controls/Microsoft.Toolkit.Graph.Controls.csproj b/Microsoft.Toolkit.Graph.Controls/Microsoft.Toolkit.Graph.Controls.csproj new file mode 100644 index 0000000..3a3082b --- /dev/null +++ b/Microsoft.Toolkit.Graph.Controls/Microsoft.Toolkit.Graph.Controls.csproj @@ -0,0 +1,54 @@ + + + + uap10.0.16299 + Windows Community Toolkit Graph Controls + Microsoft.Toolkit.Graph.Controls + + This library provides Microsoft Graph XAML controls. It is part of the Windows Community Toolkit. + + Classes: + - LoginButton: The Login Control leverages MSAL libraries to support the sign-in processes for Microsoft Graph and beyond. + - PersonView: The PersonView control displays a user photo and can display their name and e-mail. + - PeoplePicker: The PeoplePicker Control is a simple control that allows for selection of one or more users. + + UWP Toolkit Windows Controls MSAL Microsoft Graph AadLogin ProfileCard Person PeoplePicker Login + + + + + + + + + + + + + + + + + + + + + + + + + + + MSBuild:Compile + + + + + + + + + + + + diff --git a/Microsoft.Toolkit.Graph.Controls/Properties/AssemblyInfo.cs b/Microsoft.Toolkit.Graph.Controls/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..c244792 --- /dev/null +++ b/Microsoft.Toolkit.Graph.Controls/Properties/AssemblyInfo.cs @@ -0,0 +1,11 @@ +// 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.Resources; +using System.Runtime.CompilerServices; + +// 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: NeutralResourcesLanguage("en-US")] \ No newline at end of file diff --git a/Microsoft.Toolkit.Graph.Controls/Properties/Microsoft.Toolkit.Graph.Controls.rd.xml b/Microsoft.Toolkit.Graph.Controls/Properties/Microsoft.Toolkit.Graph.Controls.rd.xml new file mode 100644 index 0000000..24ec172 --- /dev/null +++ b/Microsoft.Toolkit.Graph.Controls/Properties/Microsoft.Toolkit.Graph.Controls.rd.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/Microsoft.Toolkit.Graph.Controls/Providers/CommonProviderWrapper.Properties.cs b/Microsoft.Toolkit.Graph.Controls/Providers/CommonProviderWrapper.Properties.cs new file mode 100644 index 0000000..5f6dc26 --- /dev/null +++ b/Microsoft.Toolkit.Graph.Controls/Providers/CommonProviderWrapper.Properties.cs @@ -0,0 +1,62 @@ +// 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 Windows.UI.Xaml; + +namespace Microsoft.Toolkit.Graph.Providers +{ + /// + /// Properties for . + /// + public partial class CommonProviderWrapper + { + /// + /// Gets or sets the Client ID (the unique application (client) ID assigned to your app by Azure AD when the app was registered). + /// + /// + /// For details about how to register an app and get a client ID, + /// see the Register an app quick start. + /// + public string ClientId + { + get { return (string)GetValue(ClientIdProperty); } + set { SetValue(ClientIdProperty, value); } + } + + /// + /// Identifies the dependency property. + /// + /// + /// The identifier for the dependency property. + /// + public static readonly DependencyProperty ClientIdProperty = + DependencyProperty.Register(nameof(ClientId), typeof(string), typeof(InteractiveProvider), new PropertyMetadata(string.Empty, ClientIdPropertyChanged)); + + /// + /// Gets or sets the redirect URI (the URI the identity provider will send the security tokens back to). + /// + public string RedirectUri + { + get { return (string)GetValue(RedirectUriProperty); } + set { SetValue(RedirectUriProperty, value); } + } + + /// + /// Identifies the dependency property. + /// + /// + /// The identifier for the dependency property. + /// + public static readonly DependencyProperty RedirectUriProperty = + DependencyProperty.Register(nameof(RedirectUri), typeof(string), typeof(CommonProviderWrapper), new PropertyMetadata("https://login.microsoftonline.com/common/oauth2/nativeclient")); + + /// + /// Gets or sets the list of Scopes (permissions) to request on initial login. + /// + /// + /// This list can be modified by controls which require specific scopes to function. This will aid in requesting all scopes required by controls used before login is initiated, if using the LoginButton. + /// + public ScopeSet Scopes { get; set; } = new ScopeSet { "User.ReadBasic.All" }; + } +} diff --git a/Microsoft.Toolkit.Graph.Controls/Providers/CommonProviderWrapper.cs b/Microsoft.Toolkit.Graph.Controls/Providers/CommonProviderWrapper.cs new file mode 100644 index 0000000..febda65 --- /dev/null +++ b/Microsoft.Toolkit.Graph.Controls/Providers/CommonProviderWrapper.cs @@ -0,0 +1,62 @@ +// 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.Generic; +using System.Net.Http; +using System.Threading.Tasks; +using Microsoft.Graph; +using Windows.UI.Xaml; + +namespace Microsoft.Toolkit.Graph.Providers +{ + /// + /// Provides a common base class for UWP XAML based provider wrappers to the Microsoft.Graph.Auth SDK. + /// + public abstract partial class CommonProviderWrapper : DependencyObject + { + private static async void ClientIdPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) + { + if (d is CommonProviderWrapper provider) + { + await provider.InitializeAsync(); + } + } + + /// + /// Called by developers to easily initialize MSAL and a Provider when calling from WPF via XAML Islands. + /// + /// CommonProvider type to initialize + /// Optional shortcut to initialize the ClientId parameter + /// Optional shortcut to initialize the RedirectUri parameter + /// New instance. + public static async Task InitializeAsync(string clientId = null, string redirectUri = null) + where T : CommonProviderWrapper, new() + { + var provider = new T + { + ClientId = clientId, + RedirectUri = redirectUri + }; + + await provider.InitializeAsync(); + + return provider; + } + + /// + /// Used by controls to request the additional scopes they require. + /// + /// Scopes to request + public void RequestAdditionalScopes(params string[] scopes) + { + Scopes.AddRange(scopes); + } + + /// + /// Called when provider is initialized from XAML (UWP Only). + /// + /// A representing the asynchronous operation. + protected abstract Task InitializeAsync(); + } +} diff --git a/Microsoft.Toolkit.Graph.Controls/Providers/InteractiveProvider.cs b/Microsoft.Toolkit.Graph.Controls/Providers/InteractiveProvider.cs new file mode 100644 index 0000000..441c5eb --- /dev/null +++ b/Microsoft.Toolkit.Graph.Controls/Providers/InteractiveProvider.cs @@ -0,0 +1,45 @@ +// 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.Threading.Tasks; +using Microsoft.Graph.Auth; +using Microsoft.Identity.Client; + +namespace Microsoft.Toolkit.Graph.Providers +{ + /// + /// Put in app.xaml resources with ClientId + /// https://github.com/AzureAD/microsoft-authentication-library-for-dotnet/wiki/Acquiring-tokens-interactively + /// + /// + /// + /// <wgt:InteractiveProvider x:Key="MyProvider" ClientId="MyClientIdGuid"/%gt; + /// + /// + public class InteractiveProvider : CommonProviderWrapper + { + /// + /// Initializes a new instance of the class. + /// + public InteractiveProvider() + { + } + + /// + protected override async Task InitializeAsync() + { + var client = PublicClientApplicationBuilder.Create(ClientId) + .WithAuthority(AzureCloudInstance.AzurePublic, AadAuthorityAudience.AzureAdAndPersonalMicrosoftAccount) + .WithRedirectUri(RedirectUri) + .WithClientName(ProviderManager.ClientName) + .WithClientVersion(Assembly.GetExecutingAssembly().GetName().Version.ToString()) + .Build(); + + var provider = new InteractiveAuthenticationProvider(client, Scopes); + + ProviderManager.Instance.GlobalProvider = await MsalProvider.CreateAsync(client, provider); + } + } +} diff --git a/Microsoft.Toolkit.Graph.Controls/Providers/ScopeSet.cs b/Microsoft.Toolkit.Graph.Controls/Providers/ScopeSet.cs new file mode 100644 index 0000000..ad1114e --- /dev/null +++ b/Microsoft.Toolkit.Graph.Controls/Providers/ScopeSet.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.Collections.Generic; +using System.Linq; + +namespace Microsoft.Toolkit.Graph.Providers +{ + /// + /// Helper Class for XAML string Scope conversion. + /// + [Windows.Foundation.Metadata.CreateFromString(MethodName = "Microsoft.Toolkit.Graph.Providers.ScopeSet.ConvertToScopeArray")] + public class ScopeSet : List + { + /// + /// Helper to convert a string of scopes to a list of strings. + /// + /// Comma separated scope list. + /// New List of strings, i.e. ScopeSet + public static ScopeSet ConvertToScopeArray(string rawString) + { + if (rawString != null) + { + return (ScopeSet)rawString.Split(",").ToList(); + } + + return (ScopeSet)new List(); + } + } +} diff --git a/Microsoft.Toolkit.Graph.Controls/Themes/Generic.xaml b/Microsoft.Toolkit.Graph.Controls/Themes/Generic.xaml new file mode 100644 index 0000000..8d10be9 --- /dev/null +++ b/Microsoft.Toolkit.Graph.Controls/Themes/Generic.xaml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/Microsoft.Toolkit.Graph.Controls/VisualStudioToolsManifest.xml b/Microsoft.Toolkit.Graph.Controls/VisualStudioToolsManifest.xml new file mode 100644 index 0000000..79ff086 --- /dev/null +++ b/Microsoft.Toolkit.Graph.Controls/VisualStudioToolsManifest.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/Microsoft.Toolkit.Graph/Providers/IProvider.cs b/Microsoft.Toolkit.Graph/Providers/IProvider.cs index d535b9e..4e089ea 100644 --- a/Microsoft.Toolkit.Graph/Providers/IProvider.cs +++ b/Microsoft.Toolkit.Graph/Providers/IProvider.cs @@ -1,4 +1,8 @@ -using System; +// 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.ComponentModel; using System.Net.Http; using System.Runtime.CompilerServices; diff --git a/Microsoft.Toolkit.Graph/Providers/MsalProvider.cs b/Microsoft.Toolkit.Graph/Providers/MsalProvider.cs index 9843bba..66443e3 100644 --- a/Microsoft.Toolkit.Graph/Providers/MsalProvider.cs +++ b/Microsoft.Toolkit.Graph/Providers/MsalProvider.cs @@ -1,4 +1,8 @@ -using System; +// 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.Linq; using System.Net.Http; @@ -15,11 +19,6 @@ namespace Microsoft.Toolkit.Graph.Providers /// public class MsalProvider : IProvider { - /// - /// Gets or sets the initial scopes to request. - /// - public List Scopes { get; protected set; } // TODO: Do we need this? - /// /// Gets or sets the MSAL.NET Client used to authenticate the user. /// @@ -67,9 +66,8 @@ private MsalProvider() /// /// Existing instance. /// Existing instance. - /// Initial scopes to request. /// A returning a instance. - public static async Task CreateAsync(IPublicClientApplication client, IAuthenticationProvider provider, List scopes = null) + public static async Task CreateAsync(IPublicClientApplication client, IAuthenticationProvider provider) { //// TODO: Check all config provided @@ -77,8 +75,7 @@ public static async Task CreateAsync(IPublicClientApplication clie { Client = client, Provider = provider, - Graph = new GraphServiceClient(provider), - Scopes = scopes // TODO: Redundant? Can I use a dummy for the try silent below? + Graph = new GraphServiceClient(provider) }; await msal.TrySilentSignInAsync(); @@ -134,7 +131,7 @@ public async Task TrySilentSignInAsync() try { // Try and sign-in // TODO: can we use empty scopes? - var result = await Client.AcquireTokenSilent(Scopes, account).ExecuteAsync(); + var result = await Client.AcquireTokenSilent(new string[] { string.Empty }, account).ExecuteAsync(); if (!string.IsNullOrWhiteSpace(result.AccessToken)) { @@ -171,6 +168,8 @@ public async Task LogoutAsync() { await Client.RemoveAsync(user); } + + State = ProviderState.SignedOut; } } } diff --git a/Microsoft.Toolkit.Graph/Providers/ProviderState.cs b/Microsoft.Toolkit.Graph/Providers/ProviderState.cs index 01ca4c6..ec7c856 100644 --- a/Microsoft.Toolkit.Graph/Providers/ProviderState.cs +++ b/Microsoft.Toolkit.Graph/Providers/ProviderState.cs @@ -1,4 +1,8 @@ -namespace Microsoft.Toolkit.Graph.Providers +// 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 Microsoft.Toolkit.Graph.Providers { /// /// represents the current authentication state of the session for a given . diff --git a/Microsoft.Toolkit.Graph/Providers/StateChangedEventArgs.cs b/Microsoft.Toolkit.Graph/Providers/StateChangedEventArgs.cs index 4934fe4..d795176 100644 --- a/Microsoft.Toolkit.Graph/Providers/StateChangedEventArgs.cs +++ b/Microsoft.Toolkit.Graph/Providers/StateChangedEventArgs.cs @@ -1,4 +1,8 @@ -using System; +// 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; namespace Microsoft.Toolkit.Graph.Providers { diff --git a/SampleTest/App.xaml b/SampleTest/App.xaml new file mode 100644 index 0000000..2455161 --- /dev/null +++ b/SampleTest/App.xaml @@ -0,0 +1,10 @@ + + + + + diff --git a/SampleTest/App.xaml.cs b/SampleTest/App.xaml.cs new file mode 100644 index 0000000..cf46cb5 --- /dev/null +++ b/SampleTest/App.xaml.cs @@ -0,0 +1,104 @@ +// 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 SampleTest +{ + /// + /// Provides application-specific behavior to supplement the default Application class. + /// + 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 + 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/SampleTest/Assets/LockScreenLogo.scale-200.png b/SampleTest/Assets/LockScreenLogo.scale-200.png new file mode 100644 index 0000000000000000000000000000000000000000..735f57adb5dfc01886d137b4e493d7e97cf13af3 GIT binary patch literal 1430 zcmaJ>TTC2P7~aKltDttVHYH6u8Io4i*}3fO&d$gd*bA_<3j~&e7%8(eXJLfhS!M@! zKrliY>>6yT4+Kr95$!DoD(Qn-5TP|{V_KS`k~E6(LGS@#`v$hQo&^^BKsw3HIsZBT z_y6C2n`lK@apunKojRQ^(_P}Mgewt$(^BBKCTZ;*xa?J3wQ7~@S0lUvbcLeq1Bg4o zH-bvQi|wt~L7q$~a-gDFP!{&TQfc3fX*6=uHv* zT&1&U(-)L%Xp^djI2?~eBF2cxC@YOP$+9d?P&h?lPy-9M2UT9fg5jKm1t$m#iWE{M zIf%q9@;fyT?0UP>tcw-bLkz;s2LlKl2qeP0w zECS7Ate+Awk|KQ+DOk;fl}Xsy4o^CY=pwq%QAAKKl628_yNPsK>?A>%D8fQG6IgdJ ztnxttBz#NI_a@fk7SU`WtrpsfZsNs9^0(2a z@C3#YO3>k~w7?2hipBf{#b6`}Xw1hlG$yi?;1dDs7k~xDAw@jiI*+tc;t2Lflg&bM)0!Y;0_@=w%`LW^8DsYpS#-bLOklX9r?Ei}TScw|4DbpW%+7 zFgAI)f51s}{y-eWb|vrU-Ya!GuYKP)J7z#*V_k^Xo>4!1Yqj*m)x&0L^tg3GJbVAJ zJ-Pl$R=NAabouV=^z_t;^K*0AvFs!vYU>_<|I^#c?>>CR<(T?=%{;U=aI*SbZADLH z&(f2wz_Y0??Tf|g;?|1Znw6}6U43Q#qNRwv1vp9uFn1)V#*4p&%$mP9x&15^OaBiDS(XppT|z^>;B{PLVEbS3IFYV yGvCsSX*m literal 0 HcmV?d00001 diff --git a/SampleTest/Assets/SplashScreen.scale-200.png b/SampleTest/Assets/SplashScreen.scale-200.png new file mode 100644 index 0000000000000000000000000000000000000000..023e7f1feda78d5100569825acedfd213a0d84e9 GIT binary patch literal 7700 zcmeHLYj~4Yw%(;oxoEH#Kxq-eR|+VkP17b#Vk;?4QwkI+A{L04G+#<<(x#Un1#+h5>eArRq zTw$)ZvTWW_Y?bDho0nPVTh08+s`sp!j74rJTTtXIDww0SILedFv?sZ?yb@@}GN;#8 znk_b~Q(A0YR#uV4ef!osoV1M3;vQ8N$O|fStfgf$S5;ddUNv`tWtGjM;koG#N;7M< zP*84lnx(bn_KF&9Z5Ai$)#Cs3a|$OFw>WKCT$of*L7_CqQEinflT|W{JT+aKp-E0v zsxmYg)1(T>DROm+LN1eQw8}KCTp=C!$H7`PU!t9_Hw@TsTI2`udRZv*!a5`#A9hK6Y95L(CDUX&_@QxKV z_feX{UhA#ZWlvgpL$#w^D#lq`_A4AzDqd|Zv6y9PX&DNcN|l}_D^{q@GG&H^Pg583 z8FI6N8^H7b5WjGp;urW)d7F+_lcp%KsLX0viCmE(OHH+=%ZfD_=`voUuoUxFO^L;- z;!;2{g-YiiO6m4bs89OuF9!p{FGtH-f%8<2gY!h9s)4ciN%{Kh1+`}{^}M~+TDH9N z^Z5PlgVXMC&2&k*Hw^Lb9gny#ro$MOIxIt{+r)EA10$VR3 zanN8D{TUkl+v0CQ_>ZoHP<M-x#8@8ZiT#$Kh`(uRaX1g$Bg|qy$<#7 zSSAi{Nb8Y=lvNVeio+UGLCAtoLBfL`iOv`)yoJMDJBN>4IH@(l7YRF;61@>qq1iM9 zr@b#OC~SAxSle?5Pp8Z78{VO0YFr1x7kZU64Z23eLf2T2#6J_t;-E}DkB?NufZ0Ug zi?J&byXeaB-uTNVhuiM!UVQw}bZrJ3GtAETYp->!{q#zfN7D3AS9@Q7*V^85jGx#R z(QxYV(wW#F0XF9^^s>>H8pPlVJ>)3Oz z&_X8Sf@~?cH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?V(YDsM<6pX2nVoN%M$LT^q#FmtaF?1^27F*IcNX~XRB(|hCFvdcc zc)$=S-)acdk$g4?_>jRqxpI6M3vHZk?0c^3=byamYDNf;uB{3NlKW5IhnOS3DNkMV z?tK8?kJ}pmvp%&&eTVOVjHP`q34hN1@!aK}H(K!vI`~gf|Gv+FNEQD5Yd<~yX7k_l h&G-K)@HZb3BABY{)U1?^%I#E6`MGoTtustd{~yM6srvu` literal 0 HcmV?d00001 diff --git a/SampleTest/Assets/Square150x150Logo.scale-200.png b/SampleTest/Assets/Square150x150Logo.scale-200.png new file mode 100644 index 0000000000000000000000000000000000000000..af49fec1a5484db1d52a7f9b5ec90a27c7030186 GIT binary patch literal 2937 zcma)84OCO-8BSud5)jwMLRVKgX(S?$n?Ld|vrsm<$CF7)&zTbyy1FE5bU`Q17MRv`9ue$;R(@8kR;#vJ*IM0>cJIAOte!d7oRgdH zd%ySjdB6L9=gX^A6)VzH7p2l@v~3zJAMw|DFy#^)F@@F*`mqUn=Il>l)8_+ab;nOW{%+iPx z+s{Eu|&pIs)Z7{La9~?xKfyl z#43?gjEL15d4WbOZo#SiP%>DB^+BcnJ=7dHEe;r#G=tuw|ka z%q@}##Uh7;tc%L_64m(kHtw74ty%BJMb)_1)#S0j`)F8_1jF7vScpsnH=0V19bO8y zR`0SjIdCUo&=>JwMQF8KHA<{ODHTiQh}0^@5QRmCA?gOH6_H3K^-_sNB^RrdNuK-R zOO*vOrKCVvDwgUck`kF(E7j{I#iiN;b*ZdCt4m@HPA`EuEqGGf4%!K<;(=I=&Vyrw z%TwcWtxa}8mCZ%Cyf&ActJ6_$ox5z6-D!0-dvnRx6t7y3d+h6QYpKWO;8OdnvERo7 zuEf>ih5`wqY)~o@OeVt-wM?Q!>QzdGRj!bz6fzYrfw$hZfAKzr2-M+D+R>}~oT574c;_3zquHcElqKIsryILt3g8n3jcMb+j?i?-L3FpZJ z2WRVBRdDPc+G5aaYg#5hpE+6nQ|(VSoxT3|biF;BUq#==-27Xi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Vy6^);rR}7Yo=J_T@hi+qhTZXnVWyf;JDYm5#eYLTxr*?kiNn!+Y zQ+LUkBafNJ#rH#C(?d5^;gw9o#%daEI{mA*LHPIHPU`#|H$hD zwm>0&+kahQ)E#%~k>&5@&#Vg82H?s%71=)(soi@174pi9--2{w{1$}Sz4zGn3Du&x bht0Iza^2ykEt4(epJ78uh5nDlX8(TxzDYwP literal 0 HcmV?d00001 diff --git a/SampleTest/Assets/Square44x44Logo.scale-200.png b/SampleTest/Assets/Square44x44Logo.scale-200.png new file mode 100644 index 0000000000000000000000000000000000000000..ce342a2ec8a61291ba76c54604aea7e9d20af11b GIT binary patch literal 1647 zcmaJ?eM}Q)7(e+G1Q(|`V9JhTI2>MkceK4;p;PR&$Pi?ejk3YQ_3o`S&|W_dsOZ8# zWPTt69g`t$ab`0cj-Y0yiBSOqmd)tG7G(}M5aP0_%&9TijB#&)I{zSE^4@#z^FF`l z`8{8`o%wlL(UI|y2!cdsuVamHH~H86F!*-15em4)NqUpCQM5?aoC_eCf@lV4wvF2a zjDQn1JBL69f&@2M3rvzJcfE!eZ8FZUBlFlC5RD)it33{mF9#B82AiyQE%w)`vlwa> zv{<1sm&kSKK$&%2jSFn7$t&P%%6Ue>R=EAnG8N7fqynWG8L3p!4801a;8{+nliO(qd(jNJ_?+9W3#hLIDLoT6~3fx9=`CC-D}-AMrpEO7HK zt3$GicGPc?GmDjy7K2P@La;eu4!$zWCZ`ym{Z$b zu-O6RM&K4JT|BIZB`E-gxqG%FzanI#+2FFmqHqXG7yxWB=w55RGOM)$xMb(>kSNR z2w=1AZi%z=AmG~yea~XaXJR!v7vLn(RUnELfiB1|6D84ICOS}^Zo2AdN}<&*h}G_u z{xZ!(%>tLT3J3<5XhWy-tg+6)0nmUUENLW8TWA{R6bgVd3X;anYFZ^IRis*_P-C-r z;i>%1^eL3UI2-{w8nuFFcs0e~7J{O2k^~Ce%+Ly4U?|=!0LH=t6()xi<^I-rs+9sF z*q{E-CxZbGPeu#a;XJwE;9S1?#R&uns>^0G3p`hEUF*v`M?@h%T%J%RChmD|EVydq zmHWh*_=S%emRC*mhxaVLzT@>Z2SX0u9v*DIJ@WC^kLVdlGV6LpK$KIrlJqc zpJ921)+3JJdTx|<`G&kXpKkjGJv=76R`yYIQ{#c-`%+`#V(7}Q;&@6U8!Td1`d;?N z_9mnI#?AA}4J!r)LN4!E-@H5eXauuB7TOawS>Y|{-P?NNx-lq+z1W-+y(;39P&&LP zL{N80?&=C*qKmdA^moMZRuPcD!B<*mq$ch=0Cnlitw#txRWhb3%TQvPqjkC`F69G4b! ze7z9MZ#+;_#l?H37UqUhDFb^l&s2{oM$3I0o^Q!yx;;V)QmCMo)Tb_ui|mit8MS?U zm##6$sZZ1$@|s%?l@>4Z<*Q}sRBSKMhb4I{e5LdEhsHIHTe8Bod5c>6QtT>$XgUBz z6MK`kO$=jmt@FqggOhJ5j~e@ygRbG;<{Vu)*+nn9aQeo0;$#j;|MS=S$&L?BeV25z xs3B`@=#`5TF{^6(A1rvdY@|-RtQ|iS5{tyX+wH?;n8E)G$kykv-D^wh{{!TZT%7;_ literal 0 HcmV?d00001 diff --git a/SampleTest/Assets/Square44x44Logo.targetsize-24_altform-unplated.png b/SampleTest/Assets/Square44x44Logo.targetsize-24_altform-unplated.png new file mode 100644 index 0000000000000000000000000000000000000000..f6c02ce97e0a802b85f6021e822c89f8bf57d5cd GIT binary patch literal 1255 zcmaJ>TWs4@7*5+{G#S+&C!qC#> zf>5N3P6jO*Cz>ug*(_DmW=)kea&m$gZ^+nyiF`;j%w@}y8)>p*SH}C`m?DXeieF2U zyQHecc_L%Gh!7GMt+hG06y;+|p4>m~}PjA}rKViGiEnn7G0ZO<>G|7q;2?NwGCM3s?eued6%hd$B+ z*kQJ{#~$S=DFE(%=E+UkmlEI*%3llUf~8Ja9YU1Vui0IbGBkW_gHB%Rd&!!ioX zs40O?i9I{};kle7GMvE7(rk`la=gTI)47=>%?q@^iL-nUo3}h4S}N-KHn8t5mVP8w z&bSErwp+37 zNJJ8?a|{r5Q3R0Z5s-LB1WHOwYC@7pCHWND#cL1cZ?{kJ368_*(UDWUDyb<}0y@o# zfMF016iMWPCb6obAxT$JlB6(2DrlXDTB&!0`!m??4F(qWMhjVZo?JXQmz`1*58Z=& zcDmB|S-E@j?BoFGix0flckqdS4jsPNzhfWyWIM98GxcLs89C(~dw%$_t;JjX-SD}E zfiGV;{8Q%8r}w9x>EEigW81>`kvnU@pK)4+xk9@+bNj9L!AAZ@SZ@q|)&BmY3+HZx zul~BeG4|}-;L%cHViQGQX?^zFfO0&#cHwel=d`lH9sJ-@Sl@n*(8J2>%Ac`IxyY?Q z{=GhWvC#gu-~Ia7*n{=+;qM?Ul_wy1+u7ho;=`>EwP^g~R@{unBds`!#@}tluZQpS zm)M~nYEifJWJGx?_6DcTy>#uh%>!H9=hb^(v`=m3F1{L>db=<5_tm+_&knAQ2EU$s Mu9UqpbNZeC0BbUo^Z)<= literal 0 HcmV?d00001 diff --git a/SampleTest/Assets/StoreLogo.png b/SampleTest/Assets/StoreLogo.png new file mode 100644 index 0000000000000000000000000000000000000000..7385b56c0e4d3c6b0efe3324aa1194157d837826 GIT binary patch literal 1451 zcmaJ>eN5D57_Z|bH;{0+1#mbl)eTU3{h)Wf7EZV?;HD@XL@{B`Ui%(2aMxQ~xdXSv z5nzWi(LW)U2=Vc-cY@s7nPt{i0hc6!7xN4NNHI#EQl>YNBy8l4%x9gr_W-j zEZMQmmTIy(>;lblRfh`dIyTgc9W5d!VP$L4(kKrN1c5G~(O_#xG zAJCNTstD^5SeXFB+&$h=ToJP2H>xr$iqPs-#O*;4(!Fjw25-!gEb*)mU}=)J;Iu>w zxK(5XoD0wrPSKQ~rbL^Cw6O_03*l*}i=ydbu7adJ6y;%@tjFeXIXT+ms30pmbOP%Q zX}S;+LBh8Tea~TSkHzvX6$rYb)+n&{kSbIqh|c7hmlxmwSiq5iVhU#iEQ<>a18|O^Sln-8t&+t`*{qBWo5M?wFM(JuimAOb5!K#D}XbslM@#1ZVz_;!9U zpfEpLAOz=0g@bd6Xj_ILi-x^!M}73h^o@}hM$1jflTs|Yuj9AL@A3<-?MV4!^4q`e z)fO@A;{9K^?W?DbnesnPr6kK>$zaKo&;FhFd(GYFCIU^T+OIMb%Tqo+P%oq(IdX7S zf6+HLO?7o0m+p>~Tp5UrXWh!UH!wZ5kv!E`_w)PTpI(#Iw{AS`gH4^b(bm^ZCq^FZ zY9DD7bH}rq9mg88+KgA$Zp!iWncuU2n1AuIa@=sWvUR-s`Qb{R*kk(SPU^`$6BXz8 zn#7yaFOIK%qGxyi`dYtm#&qqox0$h=pNi#u=M8zUG@bpiZ=3sT=1}Trr}39cC)H|v zbL?W)=&s4zrh)7>L(|cc%$1#!zfL?HjpeP%T+x_a+jZ16b^iKOHxFEX$7d|8${H-* zIrOJ5w&i$>*D>AKaIoYg`;{L@jM((Kt?$N$5OnuPqVvq**Nm}(f0wwOF%iX_Pba;V z;m@wxX&NcV3?<1+u?A{y_DIj7#m3Af1rCE)o`D&Y3}0%7E;iX1yMDiS)sh0wKi!36 zL!Wmq?P^Ku&rK~HJd97KkLTRl>ScGFYZNlYytWnhmuu|)L&ND8_PmkayQb{HOY640 bno1(wj@u8DCVuFR|31B*4ek@pZJqxCDDe1x literal 0 HcmV?d00001 diff --git a/SampleTest/Assets/Wide310x150Logo.scale-200.png b/SampleTest/Assets/Wide310x150Logo.scale-200.png new file mode 100644 index 0000000000000000000000000000000000000000..288995b397fdbef1fb7e85afd71445d5de1952c5 GIT binary patch literal 3204 zcmbVPeQXow8NYmBd90>}0NP?GhXW~VaeThm=a0tV#EwJMI!)6M3}|c4_Bl3=Kd>G0 z(GHx1wl<7(tP?FsOQkTilSo*iIvF%uArExJ73~P zSv1xEy!U(Wd4A9D`FQV@W3@F^qJ@PEF$@z`Z!*BbFsS(^?B zyiAzJ+q})bkgiQHWqEb*jJD-coHYr1^iocg)l!Qa{Xqs-l~6J}p-|##ZHYofskQ3$ zI0;xzXyhazBeXhIsg5A=%uf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pZGjh$x%Hp{?=FHsMp0&wNPlj00us{&`1ZOZTqs8%4X&xH=UDr*xyBW(Zp&Em94 zf)ZSfn#yg0N)>!1kWdkqJ^S*z0FF5|fj&qcE#Na|%OY0$uO>!&hP+1ywfD_WXk@4J(?MBftK7>$Nvqh@tDuarN%PrTLQ2Uzysx>UV=V zk^RrDSvdQ?0;=hY67EgII-f4`t=+i*yS=Y~!XlqIy_4x&%+OdfbKOFPXS2X5%4R{N z$SQMX^AK6(fA + + + + + + diff --git a/SampleTest/MainPage.xaml.cs b/SampleTest/MainPage.xaml.cs new file mode 100644 index 0000000..812a85b --- /dev/null +++ b/SampleTest/MainPage.xaml.cs @@ -0,0 +1,47 @@ +// 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.Graph.Providers; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Runtime.InteropServices.WindowsRuntime; +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; + +// The Blank Page item template is documented at https://go.microsoft.com/fwlink/?LinkId=402352&clcid=0x409 + +namespace SampleTest +{ + ///

+ /// An empty page that can be used on its own or navigated to within a Frame. + /// + public sealed partial class MainPage : Page + { + public MainPage() + { + this.InitializeComponent(); + } + + private async void Button_Click(object sender, RoutedEventArgs e) + { + if (ProviderManager.Instance.GlobalProvider.State != ProviderState.SignedIn) + { + await ProviderManager.Instance.GlobalProvider.LoginAsync(); + } + else + { + await ProviderManager.Instance.GlobalProvider.LogoutAsync(); + } + } + } +} diff --git a/SampleTest/Package.appxmanifest b/SampleTest/Package.appxmanifest new file mode 100644 index 0000000..3be07e1 --- /dev/null +++ b/SampleTest/Package.appxmanifest @@ -0,0 +1,49 @@ + + + + + + + + + + SampleTest + mhawker + Assets\StoreLogo.png + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/SampleTest/Properties/AssemblyInfo.cs b/SampleTest/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..67a172e --- /dev/null +++ b/SampleTest/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("SampleTest")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("SampleTest")] +[assembly: AssemblyCopyright("Copyright © 2019")] +[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/SampleTest/Properties/Default.rd.xml b/SampleTest/Properties/Default.rd.xml new file mode 100644 index 0000000..af00722 --- /dev/null +++ b/SampleTest/Properties/Default.rd.xml @@ -0,0 +1,31 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/SampleTest/SampleTest.csproj b/SampleTest/SampleTest.csproj new file mode 100644 index 0000000..c68c03d --- /dev/null +++ b/SampleTest/SampleTest.csproj @@ -0,0 +1,178 @@ + + + + + Debug + x86 + {26F5807A-25B5-4E09-8C72-1749C4C59591} + AppContainerExe + Properties + SampleTest + SampleTest + en-US + UAP + 10.0.18362.0 + 10.0.16299.0 + 14 + 512 + {A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + true + false + + + true + bin\x86\Debug\ + DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP + ;2008 + full + x86 + false + prompt + true + + + bin\x86\Release\ + TRACE;NETFX_CORE;WINDOWS_UWP + true + ;2008 + pdbonly + x86 + false + prompt + true + true + + + true + bin\ARM\Debug\ + DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP + ;2008 + full + ARM + false + prompt + true + + + bin\ARM\Release\ + TRACE;NETFX_CORE;WINDOWS_UWP + true + ;2008 + pdbonly + ARM + false + prompt + true + true + + + true + bin\ARM64\Debug\ + DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP + ;2008 + full + ARM64 + false + prompt + true + true + + + bin\ARM64\Release\ + TRACE;NETFX_CORE;WINDOWS_UWP + true + ;2008 + pdbonly + ARM64 + false + prompt + true + true + + + true + bin\x64\Debug\ + DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP + ;2008 + full + x64 + false + prompt + true + + + bin\x64\Release\ + TRACE;NETFX_CORE;WINDOWS_UWP + true + ;2008 + pdbonly + x64 + false + prompt + true + true + + + PackageReference + + + + App.xaml + + + MainPage.xaml + + + + + + Designer + + + + + + + + + + + + + + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + + + + + 6.2.9 + + + + + {42252ee8-7e68-428f-972b-6d2dd3aa12cc} + Microsoft.Toolkit.Graph.Controls + + + {B2246169-0CD8-473C-AFF6-172310E2C3F6} + Microsoft.Toolkit.Graph + + + + 14.0 + + + + \ No newline at end of file diff --git a/Windows-Toolkit-Graph-Controls.sln b/Windows-Toolkit-Graph-Controls.sln index e722ee4..1b3ff61 100644 --- a/Windows-Toolkit-Graph-Controls.sln +++ b/Windows-Toolkit-Graph-Controls.sln @@ -5,6 +5,8 @@ VisualStudioVersion = 16.0.29230.61 MinimumVisualStudioVersion = 15.0.26124.0 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Toolkit.Graph", "Microsoft.Toolkit.Graph\Microsoft.Toolkit.Graph.csproj", "{B2246169-0CD8-473C-AFF6-172310E2C3F6}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Toolkit.Graph.Controls", "Microsoft.Toolkit.Graph.Controls\Microsoft.Toolkit.Graph.Controls.csproj", "{42252EE8-7E68-428F-972B-6D2DD3AA12CC}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build Config", "Build Config", "{B7903632-1BFF-4BA6-BD7A-9F8A897F7542}" ProjectSection(SolutionItems) = preProject .editorconfig = .editorconfig @@ -22,18 +24,23 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build Config", "Build Confi version.json = version.json EndProjectSection EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SampleTest", "SampleTest\SampleTest.csproj", "{26F5807A-25B5-4E09-8C72-1749C4C59591}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Debug|ARM = Debug|ARM + Debug|ARM64 = Debug|ARM64 Debug|x64 = Debug|x64 Debug|x86 = Debug|x86 Native|Any CPU = Native|Any CPU Native|ARM = Native|ARM + Native|ARM64 = Native|ARM64 Native|x64 = Native|x64 Native|x86 = Native|x86 Release|Any CPU = Release|Any CPU Release|ARM = Release|ARM + Release|ARM64 = Release|ARM64 Release|x64 = Release|x64 Release|x86 = Release|x86 EndGlobalSection @@ -42,6 +49,8 @@ Global {B2246169-0CD8-473C-AFF6-172310E2C3F6}.Debug|Any CPU.Build.0 = Debug|Any CPU {B2246169-0CD8-473C-AFF6-172310E2C3F6}.Debug|ARM.ActiveCfg = Debug|Any CPU {B2246169-0CD8-473C-AFF6-172310E2C3F6}.Debug|ARM.Build.0 = Debug|Any CPU + {B2246169-0CD8-473C-AFF6-172310E2C3F6}.Debug|ARM64.ActiveCfg = Debug|Any CPU + {B2246169-0CD8-473C-AFF6-172310E2C3F6}.Debug|ARM64.Build.0 = Debug|Any CPU {B2246169-0CD8-473C-AFF6-172310E2C3F6}.Debug|x64.ActiveCfg = Debug|Any CPU {B2246169-0CD8-473C-AFF6-172310E2C3F6}.Debug|x64.Build.0 = Debug|Any CPU {B2246169-0CD8-473C-AFF6-172310E2C3F6}.Debug|x86.ActiveCfg = Debug|Any CPU @@ -50,6 +59,8 @@ Global {B2246169-0CD8-473C-AFF6-172310E2C3F6}.Native|Any CPU.Build.0 = Release|Any CPU {B2246169-0CD8-473C-AFF6-172310E2C3F6}.Native|ARM.ActiveCfg = Release|Any CPU {B2246169-0CD8-473C-AFF6-172310E2C3F6}.Native|ARM.Build.0 = Release|Any CPU + {B2246169-0CD8-473C-AFF6-172310E2C3F6}.Native|ARM64.ActiveCfg = Release|Any CPU + {B2246169-0CD8-473C-AFF6-172310E2C3F6}.Native|ARM64.Build.0 = Release|Any CPU {B2246169-0CD8-473C-AFF6-172310E2C3F6}.Native|x64.ActiveCfg = Release|Any CPU {B2246169-0CD8-473C-AFF6-172310E2C3F6}.Native|x64.Build.0 = Release|Any CPU {B2246169-0CD8-473C-AFF6-172310E2C3F6}.Native|x86.ActiveCfg = Release|Any CPU @@ -58,10 +69,85 @@ Global {B2246169-0CD8-473C-AFF6-172310E2C3F6}.Release|Any CPU.Build.0 = Release|Any CPU {B2246169-0CD8-473C-AFF6-172310E2C3F6}.Release|ARM.ActiveCfg = Release|Any CPU {B2246169-0CD8-473C-AFF6-172310E2C3F6}.Release|ARM.Build.0 = Release|Any CPU + {B2246169-0CD8-473C-AFF6-172310E2C3F6}.Release|ARM64.ActiveCfg = Release|Any CPU + {B2246169-0CD8-473C-AFF6-172310E2C3F6}.Release|ARM64.Build.0 = Release|Any CPU {B2246169-0CD8-473C-AFF6-172310E2C3F6}.Release|x64.ActiveCfg = Release|Any CPU {B2246169-0CD8-473C-AFF6-172310E2C3F6}.Release|x64.Build.0 = Release|Any CPU {B2246169-0CD8-473C-AFF6-172310E2C3F6}.Release|x86.ActiveCfg = Release|Any CPU {B2246169-0CD8-473C-AFF6-172310E2C3F6}.Release|x86.Build.0 = Release|Any CPU + {42252EE8-7E68-428F-972B-6D2DD3AA12CC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {42252EE8-7E68-428F-972B-6D2DD3AA12CC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {42252EE8-7E68-428F-972B-6D2DD3AA12CC}.Debug|ARM.ActiveCfg = Debug|Any CPU + {42252EE8-7E68-428F-972B-6D2DD3AA12CC}.Debug|ARM.Build.0 = Debug|Any CPU + {42252EE8-7E68-428F-972B-6D2DD3AA12CC}.Debug|ARM64.ActiveCfg = Debug|Any CPU + {42252EE8-7E68-428F-972B-6D2DD3AA12CC}.Debug|ARM64.Build.0 = Debug|Any CPU + {42252EE8-7E68-428F-972B-6D2DD3AA12CC}.Debug|x64.ActiveCfg = Debug|Any CPU + {42252EE8-7E68-428F-972B-6D2DD3AA12CC}.Debug|x64.Build.0 = Debug|Any CPU + {42252EE8-7E68-428F-972B-6D2DD3AA12CC}.Debug|x86.ActiveCfg = Debug|Any CPU + {42252EE8-7E68-428F-972B-6D2DD3AA12CC}.Debug|x86.Build.0 = Debug|Any CPU + {42252EE8-7E68-428F-972B-6D2DD3AA12CC}.Native|Any CPU.ActiveCfg = Debug|Any CPU + {42252EE8-7E68-428F-972B-6D2DD3AA12CC}.Native|Any CPU.Build.0 = Debug|Any CPU + {42252EE8-7E68-428F-972B-6D2DD3AA12CC}.Native|ARM.ActiveCfg = Debug|Any CPU + {42252EE8-7E68-428F-972B-6D2DD3AA12CC}.Native|ARM.Build.0 = Debug|Any CPU + {42252EE8-7E68-428F-972B-6D2DD3AA12CC}.Native|ARM64.ActiveCfg = Release|Any CPU + {42252EE8-7E68-428F-972B-6D2DD3AA12CC}.Native|ARM64.Build.0 = Release|Any CPU + {42252EE8-7E68-428F-972B-6D2DD3AA12CC}.Native|x64.ActiveCfg = Debug|Any CPU + {42252EE8-7E68-428F-972B-6D2DD3AA12CC}.Native|x64.Build.0 = Debug|Any CPU + {42252EE8-7E68-428F-972B-6D2DD3AA12CC}.Native|x86.ActiveCfg = Debug|Any CPU + {42252EE8-7E68-428F-972B-6D2DD3AA12CC}.Native|x86.Build.0 = Debug|Any CPU + {42252EE8-7E68-428F-972B-6D2DD3AA12CC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {42252EE8-7E68-428F-972B-6D2DD3AA12CC}.Release|Any CPU.Build.0 = Release|Any CPU + {42252EE8-7E68-428F-972B-6D2DD3AA12CC}.Release|ARM.ActiveCfg = Release|Any CPU + {42252EE8-7E68-428F-972B-6D2DD3AA12CC}.Release|ARM.Build.0 = Release|Any CPU + {42252EE8-7E68-428F-972B-6D2DD3AA12CC}.Release|ARM64.ActiveCfg = Release|Any CPU + {42252EE8-7E68-428F-972B-6D2DD3AA12CC}.Release|ARM64.Build.0 = Release|Any CPU + {42252EE8-7E68-428F-972B-6D2DD3AA12CC}.Release|x64.ActiveCfg = Release|Any CPU + {42252EE8-7E68-428F-972B-6D2DD3AA12CC}.Release|x64.Build.0 = Release|Any CPU + {42252EE8-7E68-428F-972B-6D2DD3AA12CC}.Release|x86.ActiveCfg = Release|Any CPU + {42252EE8-7E68-428F-972B-6D2DD3AA12CC}.Release|x86.Build.0 = Release|Any CPU + {26F5807A-25B5-4E09-8C72-1749C4C59591}.Debug|Any CPU.ActiveCfg = Debug|x86 + {26F5807A-25B5-4E09-8C72-1749C4C59591}.Debug|Any CPU.Build.0 = Debug|x86 + {26F5807A-25B5-4E09-8C72-1749C4C59591}.Debug|Any CPU.Deploy.0 = Debug|x86 + {26F5807A-25B5-4E09-8C72-1749C4C59591}.Debug|ARM.ActiveCfg = Debug|ARM + {26F5807A-25B5-4E09-8C72-1749C4C59591}.Debug|ARM.Build.0 = Debug|ARM + {26F5807A-25B5-4E09-8C72-1749C4C59591}.Debug|ARM.Deploy.0 = Debug|ARM + {26F5807A-25B5-4E09-8C72-1749C4C59591}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {26F5807A-25B5-4E09-8C72-1749C4C59591}.Debug|ARM64.Build.0 = Debug|ARM64 + {26F5807A-25B5-4E09-8C72-1749C4C59591}.Debug|ARM64.Deploy.0 = Debug|ARM64 + {26F5807A-25B5-4E09-8C72-1749C4C59591}.Debug|x64.ActiveCfg = Debug|x64 + {26F5807A-25B5-4E09-8C72-1749C4C59591}.Debug|x64.Build.0 = Debug|x64 + {26F5807A-25B5-4E09-8C72-1749C4C59591}.Debug|x64.Deploy.0 = Debug|x64 + {26F5807A-25B5-4E09-8C72-1749C4C59591}.Debug|x86.ActiveCfg = Debug|x86 + {26F5807A-25B5-4E09-8C72-1749C4C59591}.Debug|x86.Build.0 = Debug|x86 + {26F5807A-25B5-4E09-8C72-1749C4C59591}.Debug|x86.Deploy.0 = Debug|x86 + {26F5807A-25B5-4E09-8C72-1749C4C59591}.Native|Any CPU.ActiveCfg = Release|x64 + {26F5807A-25B5-4E09-8C72-1749C4C59591}.Native|Any CPU.Build.0 = Release|x64 + {26F5807A-25B5-4E09-8C72-1749C4C59591}.Native|Any CPU.Deploy.0 = Release|x64 + {26F5807A-25B5-4E09-8C72-1749C4C59591}.Native|ARM.ActiveCfg = Release|ARM + {26F5807A-25B5-4E09-8C72-1749C4C59591}.Native|ARM.Build.0 = Release|ARM + {26F5807A-25B5-4E09-8C72-1749C4C59591}.Native|ARM.Deploy.0 = Release|ARM + {26F5807A-25B5-4E09-8C72-1749C4C59591}.Native|ARM64.ActiveCfg = Release|ARM64 + {26F5807A-25B5-4E09-8C72-1749C4C59591}.Native|ARM64.Build.0 = Release|ARM64 + {26F5807A-25B5-4E09-8C72-1749C4C59591}.Native|ARM64.Deploy.0 = Release|ARM64 + {26F5807A-25B5-4E09-8C72-1749C4C59591}.Native|x64.ActiveCfg = Release|x64 + {26F5807A-25B5-4E09-8C72-1749C4C59591}.Native|x64.Build.0 = Release|x64 + {26F5807A-25B5-4E09-8C72-1749C4C59591}.Native|x64.Deploy.0 = Release|x64 + {26F5807A-25B5-4E09-8C72-1749C4C59591}.Native|x86.ActiveCfg = Release|x86 + {26F5807A-25B5-4E09-8C72-1749C4C59591}.Native|x86.Build.0 = Release|x86 + {26F5807A-25B5-4E09-8C72-1749C4C59591}.Native|x86.Deploy.0 = Release|x86 + {26F5807A-25B5-4E09-8C72-1749C4C59591}.Release|Any CPU.ActiveCfg = Release|x86 + {26F5807A-25B5-4E09-8C72-1749C4C59591}.Release|ARM.ActiveCfg = Release|ARM + {26F5807A-25B5-4E09-8C72-1749C4C59591}.Release|ARM.Build.0 = Release|ARM + {26F5807A-25B5-4E09-8C72-1749C4C59591}.Release|ARM.Deploy.0 = Release|ARM + {26F5807A-25B5-4E09-8C72-1749C4C59591}.Release|ARM64.ActiveCfg = Release|ARM64 + {26F5807A-25B5-4E09-8C72-1749C4C59591}.Release|ARM64.Build.0 = Release|ARM64 + {26F5807A-25B5-4E09-8C72-1749C4C59591}.Release|ARM64.Deploy.0 = Release|ARM64 + {26F5807A-25B5-4E09-8C72-1749C4C59591}.Release|x64.ActiveCfg = Release|x64 + {26F5807A-25B5-4E09-8C72-1749C4C59591}.Release|x64.Build.0 = Release|x64 + {26F5807A-25B5-4E09-8C72-1749C4C59591}.Release|x64.Deploy.0 = Release|x64 + {26F5807A-25B5-4E09-8C72-1749C4C59591}.Release|x86.ActiveCfg = Release|x86 + {26F5807A-25B5-4E09-8C72-1749C4C59591}.Release|x86.Build.0 = Release|x86 + {26F5807A-25B5-4E09-8C72-1749C4C59591}.Release|x86.Deploy.0 = Release|x86 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE From ca8bbb541a239d19523bedd265beec8314bc98ff Mon Sep 17 00:00:00 2001 From: michael-hawker Date: Mon, 16 Sep 2019 11:33:29 -0700 Subject: [PATCH 04/12] Try MyGet feed reference instead --- .../Microsoft.Toolkit.Graph.Controls.csproj | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Microsoft.Toolkit.Graph.Controls/Microsoft.Toolkit.Graph.Controls.csproj b/Microsoft.Toolkit.Graph.Controls/Microsoft.Toolkit.Graph.Controls.csproj index 3a3082b..bf7849b 100644 --- a/Microsoft.Toolkit.Graph.Controls/Microsoft.Toolkit.Graph.Controls.csproj +++ b/Microsoft.Toolkit.Graph.Controls/Microsoft.Toolkit.Graph.Controls.csproj @@ -17,14 +17,11 @@ - - - - + From f63aa6a8c52f77aa9a945dffabb4483386422ce2 Mon Sep 17 00:00:00 2001 From: michael-hawker Date: Mon, 16 Sep 2019 15:57:29 -0700 Subject: [PATCH 05/12] Try to not sign controls package assembly --- .../Microsoft.Toolkit.Graph.Controls.csproj | 1 + 1 file changed, 1 insertion(+) diff --git a/Microsoft.Toolkit.Graph.Controls/Microsoft.Toolkit.Graph.Controls.csproj b/Microsoft.Toolkit.Graph.Controls/Microsoft.Toolkit.Graph.Controls.csproj index bf7849b..03d69b9 100644 --- a/Microsoft.Toolkit.Graph.Controls/Microsoft.Toolkit.Graph.Controls.csproj +++ b/Microsoft.Toolkit.Graph.Controls/Microsoft.Toolkit.Graph.Controls.csproj @@ -13,6 +13,7 @@ - PeoplePicker: The PeoplePicker Control is a simple control that allows for selection of one or more users. UWP Toolkit Windows Controls MSAL Microsoft Graph AadLogin ProfileCard Person PeoplePicker Login + false From 354fa0496be5f80d60f17b1ddb179c31dcbc0189 Mon Sep 17 00:00:00 2001 From: michael-hawker Date: Mon, 16 Sep 2019 16:16:04 -0700 Subject: [PATCH 06/12] Try adding import for sdk extras --- .../Microsoft.Toolkit.Graph.Controls.csproj | 1 + 1 file changed, 1 insertion(+) diff --git a/Microsoft.Toolkit.Graph.Controls/Microsoft.Toolkit.Graph.Controls.csproj b/Microsoft.Toolkit.Graph.Controls/Microsoft.Toolkit.Graph.Controls.csproj index 03d69b9..6fcd7da 100644 --- a/Microsoft.Toolkit.Graph.Controls/Microsoft.Toolkit.Graph.Controls.csproj +++ b/Microsoft.Toolkit.Graph.Controls/Microsoft.Toolkit.Graph.Controls.csproj @@ -41,6 +41,7 @@ + From 0d68179cae16706c9304ff29ab033030b21c6799 Mon Sep 17 00:00:00 2001 From: michael-hawker Date: Mon, 16 Sep 2019 21:15:41 -0700 Subject: [PATCH 07/12] Make sure .NET Standard project uses regular toolchain --- Microsoft.Toolkit.Graph/Microsoft.Toolkit.Graph.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Microsoft.Toolkit.Graph/Microsoft.Toolkit.Graph.csproj b/Microsoft.Toolkit.Graph/Microsoft.Toolkit.Graph.csproj index 852bbb0..b9fd61a 100644 --- a/Microsoft.Toolkit.Graph/Microsoft.Toolkit.Graph.csproj +++ b/Microsoft.Toolkit.Graph/Microsoft.Toolkit.Graph.csproj @@ -1,4 +1,4 @@ - + netstandard2.0 From 3a929fd6e66ee26f7143327c8cd6d3e6e89bfa7b Mon Sep 17 00:00:00 2001 From: michael-hawker Date: Mon, 16 Sep 2019 21:30:23 -0700 Subject: [PATCH 08/12] Remove condition on generated output. --- .../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 6fcd7da..74a0b31 100644 --- a/Microsoft.Toolkit.Graph.Controls/Microsoft.Toolkit.Graph.Controls.csproj +++ b/Microsoft.Toolkit.Graph.Controls/Microsoft.Toolkit.Graph.Controls.csproj @@ -43,7 +43,7 @@ - + From e9cd6b8b9babe906205b47cbfc6760b55ee7889e Mon Sep 17 00:00:00 2001 From: michael-hawker Date: Mon, 16 Sep 2019 21:40:41 -0700 Subject: [PATCH 09/12] Remove arm from solution for now --- Windows-Toolkit-Graph-Controls.sln | 48 ------------------------------ 1 file changed, 48 deletions(-) diff --git a/Windows-Toolkit-Graph-Controls.sln b/Windows-Toolkit-Graph-Controls.sln index 1b3ff61..ccfc0f3 100644 --- a/Windows-Toolkit-Graph-Controls.sln +++ b/Windows-Toolkit-Graph-Controls.sln @@ -29,78 +29,48 @@ EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU - Debug|ARM = Debug|ARM - Debug|ARM64 = Debug|ARM64 Debug|x64 = Debug|x64 Debug|x86 = Debug|x86 Native|Any CPU = Native|Any CPU - Native|ARM = Native|ARM - Native|ARM64 = Native|ARM64 Native|x64 = Native|x64 Native|x86 = Native|x86 Release|Any CPU = Release|Any CPU - Release|ARM = Release|ARM - Release|ARM64 = Release|ARM64 Release|x64 = Release|x64 Release|x86 = Release|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {B2246169-0CD8-473C-AFF6-172310E2C3F6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {B2246169-0CD8-473C-AFF6-172310E2C3F6}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B2246169-0CD8-473C-AFF6-172310E2C3F6}.Debug|ARM.ActiveCfg = Debug|Any CPU - {B2246169-0CD8-473C-AFF6-172310E2C3F6}.Debug|ARM.Build.0 = Debug|Any CPU - {B2246169-0CD8-473C-AFF6-172310E2C3F6}.Debug|ARM64.ActiveCfg = Debug|Any CPU - {B2246169-0CD8-473C-AFF6-172310E2C3F6}.Debug|ARM64.Build.0 = Debug|Any CPU {B2246169-0CD8-473C-AFF6-172310E2C3F6}.Debug|x64.ActiveCfg = Debug|Any CPU {B2246169-0CD8-473C-AFF6-172310E2C3F6}.Debug|x64.Build.0 = Debug|Any CPU {B2246169-0CD8-473C-AFF6-172310E2C3F6}.Debug|x86.ActiveCfg = Debug|Any CPU {B2246169-0CD8-473C-AFF6-172310E2C3F6}.Debug|x86.Build.0 = Debug|Any CPU {B2246169-0CD8-473C-AFF6-172310E2C3F6}.Native|Any CPU.ActiveCfg = Release|Any CPU {B2246169-0CD8-473C-AFF6-172310E2C3F6}.Native|Any CPU.Build.0 = Release|Any CPU - {B2246169-0CD8-473C-AFF6-172310E2C3F6}.Native|ARM.ActiveCfg = Release|Any CPU - {B2246169-0CD8-473C-AFF6-172310E2C3F6}.Native|ARM.Build.0 = Release|Any CPU - {B2246169-0CD8-473C-AFF6-172310E2C3F6}.Native|ARM64.ActiveCfg = Release|Any CPU - {B2246169-0CD8-473C-AFF6-172310E2C3F6}.Native|ARM64.Build.0 = Release|Any CPU {B2246169-0CD8-473C-AFF6-172310E2C3F6}.Native|x64.ActiveCfg = Release|Any CPU {B2246169-0CD8-473C-AFF6-172310E2C3F6}.Native|x64.Build.0 = Release|Any CPU {B2246169-0CD8-473C-AFF6-172310E2C3F6}.Native|x86.ActiveCfg = Release|Any CPU {B2246169-0CD8-473C-AFF6-172310E2C3F6}.Native|x86.Build.0 = Release|Any CPU {B2246169-0CD8-473C-AFF6-172310E2C3F6}.Release|Any CPU.ActiveCfg = Release|Any CPU {B2246169-0CD8-473C-AFF6-172310E2C3F6}.Release|Any CPU.Build.0 = Release|Any CPU - {B2246169-0CD8-473C-AFF6-172310E2C3F6}.Release|ARM.ActiveCfg = Release|Any CPU - {B2246169-0CD8-473C-AFF6-172310E2C3F6}.Release|ARM.Build.0 = Release|Any CPU - {B2246169-0CD8-473C-AFF6-172310E2C3F6}.Release|ARM64.ActiveCfg = Release|Any CPU - {B2246169-0CD8-473C-AFF6-172310E2C3F6}.Release|ARM64.Build.0 = Release|Any CPU {B2246169-0CD8-473C-AFF6-172310E2C3F6}.Release|x64.ActiveCfg = Release|Any CPU {B2246169-0CD8-473C-AFF6-172310E2C3F6}.Release|x64.Build.0 = Release|Any CPU {B2246169-0CD8-473C-AFF6-172310E2C3F6}.Release|x86.ActiveCfg = Release|Any CPU {B2246169-0CD8-473C-AFF6-172310E2C3F6}.Release|x86.Build.0 = Release|Any CPU {42252EE8-7E68-428F-972B-6D2DD3AA12CC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {42252EE8-7E68-428F-972B-6D2DD3AA12CC}.Debug|Any CPU.Build.0 = Debug|Any CPU - {42252EE8-7E68-428F-972B-6D2DD3AA12CC}.Debug|ARM.ActiveCfg = Debug|Any CPU - {42252EE8-7E68-428F-972B-6D2DD3AA12CC}.Debug|ARM.Build.0 = Debug|Any CPU - {42252EE8-7E68-428F-972B-6D2DD3AA12CC}.Debug|ARM64.ActiveCfg = Debug|Any CPU - {42252EE8-7E68-428F-972B-6D2DD3AA12CC}.Debug|ARM64.Build.0 = Debug|Any CPU {42252EE8-7E68-428F-972B-6D2DD3AA12CC}.Debug|x64.ActiveCfg = Debug|Any CPU {42252EE8-7E68-428F-972B-6D2DD3AA12CC}.Debug|x64.Build.0 = Debug|Any CPU {42252EE8-7E68-428F-972B-6D2DD3AA12CC}.Debug|x86.ActiveCfg = Debug|Any CPU {42252EE8-7E68-428F-972B-6D2DD3AA12CC}.Debug|x86.Build.0 = Debug|Any CPU {42252EE8-7E68-428F-972B-6D2DD3AA12CC}.Native|Any CPU.ActiveCfg = Debug|Any CPU {42252EE8-7E68-428F-972B-6D2DD3AA12CC}.Native|Any CPU.Build.0 = Debug|Any CPU - {42252EE8-7E68-428F-972B-6D2DD3AA12CC}.Native|ARM.ActiveCfg = Debug|Any CPU - {42252EE8-7E68-428F-972B-6D2DD3AA12CC}.Native|ARM.Build.0 = Debug|Any CPU - {42252EE8-7E68-428F-972B-6D2DD3AA12CC}.Native|ARM64.ActiveCfg = Release|Any CPU - {42252EE8-7E68-428F-972B-6D2DD3AA12CC}.Native|ARM64.Build.0 = Release|Any CPU {42252EE8-7E68-428F-972B-6D2DD3AA12CC}.Native|x64.ActiveCfg = Debug|Any CPU {42252EE8-7E68-428F-972B-6D2DD3AA12CC}.Native|x64.Build.0 = Debug|Any CPU {42252EE8-7E68-428F-972B-6D2DD3AA12CC}.Native|x86.ActiveCfg = Debug|Any CPU {42252EE8-7E68-428F-972B-6D2DD3AA12CC}.Native|x86.Build.0 = Debug|Any CPU {42252EE8-7E68-428F-972B-6D2DD3AA12CC}.Release|Any CPU.ActiveCfg = Release|Any CPU {42252EE8-7E68-428F-972B-6D2DD3AA12CC}.Release|Any CPU.Build.0 = Release|Any CPU - {42252EE8-7E68-428F-972B-6D2DD3AA12CC}.Release|ARM.ActiveCfg = Release|Any CPU - {42252EE8-7E68-428F-972B-6D2DD3AA12CC}.Release|ARM.Build.0 = Release|Any CPU - {42252EE8-7E68-428F-972B-6D2DD3AA12CC}.Release|ARM64.ActiveCfg = Release|Any CPU - {42252EE8-7E68-428F-972B-6D2DD3AA12CC}.Release|ARM64.Build.0 = Release|Any CPU {42252EE8-7E68-428F-972B-6D2DD3AA12CC}.Release|x64.ActiveCfg = Release|Any CPU {42252EE8-7E68-428F-972B-6D2DD3AA12CC}.Release|x64.Build.0 = Release|Any CPU {42252EE8-7E68-428F-972B-6D2DD3AA12CC}.Release|x86.ActiveCfg = Release|Any CPU @@ -108,12 +78,6 @@ Global {26F5807A-25B5-4E09-8C72-1749C4C59591}.Debug|Any CPU.ActiveCfg = Debug|x86 {26F5807A-25B5-4E09-8C72-1749C4C59591}.Debug|Any CPU.Build.0 = Debug|x86 {26F5807A-25B5-4E09-8C72-1749C4C59591}.Debug|Any CPU.Deploy.0 = Debug|x86 - {26F5807A-25B5-4E09-8C72-1749C4C59591}.Debug|ARM.ActiveCfg = Debug|ARM - {26F5807A-25B5-4E09-8C72-1749C4C59591}.Debug|ARM.Build.0 = Debug|ARM - {26F5807A-25B5-4E09-8C72-1749C4C59591}.Debug|ARM.Deploy.0 = Debug|ARM - {26F5807A-25B5-4E09-8C72-1749C4C59591}.Debug|ARM64.ActiveCfg = Debug|ARM64 - {26F5807A-25B5-4E09-8C72-1749C4C59591}.Debug|ARM64.Build.0 = Debug|ARM64 - {26F5807A-25B5-4E09-8C72-1749C4C59591}.Debug|ARM64.Deploy.0 = Debug|ARM64 {26F5807A-25B5-4E09-8C72-1749C4C59591}.Debug|x64.ActiveCfg = Debug|x64 {26F5807A-25B5-4E09-8C72-1749C4C59591}.Debug|x64.Build.0 = Debug|x64 {26F5807A-25B5-4E09-8C72-1749C4C59591}.Debug|x64.Deploy.0 = Debug|x64 @@ -123,12 +87,6 @@ Global {26F5807A-25B5-4E09-8C72-1749C4C59591}.Native|Any CPU.ActiveCfg = Release|x64 {26F5807A-25B5-4E09-8C72-1749C4C59591}.Native|Any CPU.Build.0 = Release|x64 {26F5807A-25B5-4E09-8C72-1749C4C59591}.Native|Any CPU.Deploy.0 = Release|x64 - {26F5807A-25B5-4E09-8C72-1749C4C59591}.Native|ARM.ActiveCfg = Release|ARM - {26F5807A-25B5-4E09-8C72-1749C4C59591}.Native|ARM.Build.0 = Release|ARM - {26F5807A-25B5-4E09-8C72-1749C4C59591}.Native|ARM.Deploy.0 = Release|ARM - {26F5807A-25B5-4E09-8C72-1749C4C59591}.Native|ARM64.ActiveCfg = Release|ARM64 - {26F5807A-25B5-4E09-8C72-1749C4C59591}.Native|ARM64.Build.0 = Release|ARM64 - {26F5807A-25B5-4E09-8C72-1749C4C59591}.Native|ARM64.Deploy.0 = Release|ARM64 {26F5807A-25B5-4E09-8C72-1749C4C59591}.Native|x64.ActiveCfg = Release|x64 {26F5807A-25B5-4E09-8C72-1749C4C59591}.Native|x64.Build.0 = Release|x64 {26F5807A-25B5-4E09-8C72-1749C4C59591}.Native|x64.Deploy.0 = Release|x64 @@ -136,12 +94,6 @@ Global {26F5807A-25B5-4E09-8C72-1749C4C59591}.Native|x86.Build.0 = Release|x86 {26F5807A-25B5-4E09-8C72-1749C4C59591}.Native|x86.Deploy.0 = Release|x86 {26F5807A-25B5-4E09-8C72-1749C4C59591}.Release|Any CPU.ActiveCfg = Release|x86 - {26F5807A-25B5-4E09-8C72-1749C4C59591}.Release|ARM.ActiveCfg = Release|ARM - {26F5807A-25B5-4E09-8C72-1749C4C59591}.Release|ARM.Build.0 = Release|ARM - {26F5807A-25B5-4E09-8C72-1749C4C59591}.Release|ARM.Deploy.0 = Release|ARM - {26F5807A-25B5-4E09-8C72-1749C4C59591}.Release|ARM64.ActiveCfg = Release|ARM64 - {26F5807A-25B5-4E09-8C72-1749C4C59591}.Release|ARM64.Build.0 = Release|ARM64 - {26F5807A-25B5-4E09-8C72-1749C4C59591}.Release|ARM64.Deploy.0 = Release|ARM64 {26F5807A-25B5-4E09-8C72-1749C4C59591}.Release|x64.ActiveCfg = Release|x64 {26F5807A-25B5-4E09-8C72-1749C4C59591}.Release|x64.Build.0 = Release|x64 {26F5807A-25B5-4E09-8C72-1749C4C59591}.Release|x64.Deploy.0 = Release|x64 From 01bf0d6cfde9bdb4af481e0504148a2ba813ce57 Mon Sep 17 00:00:00 2001 From: michael-hawker Date: Mon, 16 Sep 2019 21:49:33 -0700 Subject: [PATCH 10/12] Disable ARM in cake file --- build/build.cake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build/build.cake b/build/build.cake index 0c4e6a6..c45b92f 100644 --- a/build/build.cake +++ b/build/build.cake @@ -221,8 +221,8 @@ Task("Package") } .SetConfiguration("Native"); - buildSettings.SetPlatformTarget(PlatformTarget.ARM); - MSBuild(Solution, buildSettings); + //buildSettings.SetPlatformTarget(PlatformTarget.ARM); + //MSBuild(Solution, buildSettings); buildSettings.SetPlatformTarget(PlatformTarget.x64); MSBuild(Solution, buildSettings); From 44f6cfa19006eba9c8bb3b886b7b7d95332bc728 Mon Sep 17 00:00:00 2001 From: michael-hawker Date: Mon, 16 Sep 2019 21:59:26 -0700 Subject: [PATCH 11/12] Try back to msbuildextras with extra target for UAP --- .../Microsoft.Toolkit.Graph.csproj | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/Microsoft.Toolkit.Graph/Microsoft.Toolkit.Graph.csproj b/Microsoft.Toolkit.Graph/Microsoft.Toolkit.Graph.csproj index b9fd61a..c7d1d16 100644 --- a/Microsoft.Toolkit.Graph/Microsoft.Toolkit.Graph.csproj +++ b/Microsoft.Toolkit.Graph/Microsoft.Toolkit.Graph.csproj @@ -1,9 +1,8 @@ - + - netstandard2.0 - Windows Community Toolkit .NET Standard Graph Helpers - Microsoft.Toolkit.Graph + uap10.0.16299;netstandard2.0 + Windows Community Toolkit .NET Standard Services This package includes .NET Standard code helpers such as: - GraphExtensions: Helpers for common tasks related to the Microsoft Graph used by the Microsoft.Toolkit.Graph.Controls. @@ -14,7 +13,11 @@ Full - + + + $(DefineConstants);WINRT + + From 0cc745dae483bfd1651f5506e40471847710d5e8 Mon Sep 17 00:00:00 2001 From: michael-hawker Date: Mon, 16 Sep 2019 22:25:02 -0700 Subject: [PATCH 12/12] Remove native chain for SampleApp --- Windows-Toolkit-Graph-Controls.sln | 6 ------ 1 file changed, 6 deletions(-) diff --git a/Windows-Toolkit-Graph-Controls.sln b/Windows-Toolkit-Graph-Controls.sln index ccfc0f3..fc4341e 100644 --- a/Windows-Toolkit-Graph-Controls.sln +++ b/Windows-Toolkit-Graph-Controls.sln @@ -85,14 +85,8 @@ Global {26F5807A-25B5-4E09-8C72-1749C4C59591}.Debug|x86.Build.0 = Debug|x86 {26F5807A-25B5-4E09-8C72-1749C4C59591}.Debug|x86.Deploy.0 = Debug|x86 {26F5807A-25B5-4E09-8C72-1749C4C59591}.Native|Any CPU.ActiveCfg = Release|x64 - {26F5807A-25B5-4E09-8C72-1749C4C59591}.Native|Any CPU.Build.0 = Release|x64 - {26F5807A-25B5-4E09-8C72-1749C4C59591}.Native|Any CPU.Deploy.0 = Release|x64 {26F5807A-25B5-4E09-8C72-1749C4C59591}.Native|x64.ActiveCfg = Release|x64 - {26F5807A-25B5-4E09-8C72-1749C4C59591}.Native|x64.Build.0 = Release|x64 - {26F5807A-25B5-4E09-8C72-1749C4C59591}.Native|x64.Deploy.0 = Release|x64 {26F5807A-25B5-4E09-8C72-1749C4C59591}.Native|x86.ActiveCfg = Release|x86 - {26F5807A-25B5-4E09-8C72-1749C4C59591}.Native|x86.Build.0 = Release|x86 - {26F5807A-25B5-4E09-8C72-1749C4C59591}.Native|x86.Deploy.0 = Release|x86 {26F5807A-25B5-4E09-8C72-1749C4C59591}.Release|Any CPU.ActiveCfg = Release|x86 {26F5807A-25B5-4E09-8C72-1749C4C59591}.Release|x64.ActiveCfg = Release|x64 {26F5807A-25B5-4E09-8C72-1749C4C59591}.Release|x64.Build.0 = Release|x64