You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We currently use the Behaviors package (via the Toolkit) to ensure all properties are loaded before we initialize the Graph via our XAML Provider helpers. This is a larger dependency (and causes more issues with our dependency issue from #66) for this small benefit. We should use an alternate solution to provide the same benefit without the overhead.
Describe the solution
We should add an attached property for Page (or maybe Control/FrameworkElement) which is named something like GraphProvider and accepts one of our Graph Providers. This would when the property is set, look at Loaded event for the attached FrameworkElement parent and at that point call our Initialize method on the set provider.
This would allow the Initialize method to still have access to all the property values we need on the providers to initialize the graph components, but without the need for the full Behaviors package which we utilize no other parts from.
We currently ship a WPF based package for our providers for use within XAML Islands. Not sure if we'd still want to ship a similar solution or not, we'd have to discuss. It was a bit easier before as we could leverage the same behavior code pretty easily between the two, not sure if this solution would be similar...
The text was updated successfully, but these errors were encountered:
Hello michael-hawker, thank you for opening an issue with us!
I have automatically added a "needs triage" label to help get things started. Our team will analyze and investigate the issue, and escalate it to the relevant team if possible. Other community members may also look into the issue and provide feedback 🙌
<Application.Resources>
<!--
Initialize Graph Provider On Page Load
Register Client Id: https://docs.microsoft.com/en-us/azure/active-directory/develop/quickstart-register-app
After finishing the initial registration page, you will also need to add an additional redirect URI.
Click on "Add a Redirect URI" and check the https://login.microsoftonline.com/common/oauth2/nativeclient checkbox on that page. Then click "Save".
-->
<ResourceDictionary>
<providers:Graph.Config>
<!--<msal:MsalConfig ClientId="YOUR_CLIENT_ID_HERE" Scopes="User.Read,User.ReadBasic.All,People.Read,Calendars.Read,Mail.Read,Group.Read.All,ChannelMessage.Read.All" />-->
<!--<uwp:WindowsConfig ClientId="YOUR_CLIENT_ID_HERE" Scopes="User.Read,User.ReadBasic.All,People.Read,Calendars.Read,Mail.Read,Group.Read.All,ChannelMessage.Read.All" />-->
<providers:MockConfig />
</providers:Graph.Config>
</ResourceDictionary>
</Application.Resources>
Describe the problem this feature would solve
We currently use the Behaviors package (via the Toolkit) to ensure all properties are loaded before we initialize the Graph via our XAML Provider helpers. This is a larger dependency (and causes more issues with our dependency issue from #66) for this small benefit. We should use an alternate solution to provide the same benefit without the overhead.
Describe the solution
We should add an attached property for Page (or maybe Control/FrameworkElement) which is named something like
GraphProvider
and accepts one of our Graph Providers. This would when the property is set, look atLoaded
event for the attachedFrameworkElement
parent and at that point call ourInitialize
method on the set provider.This would allow the
Initialize
method to still have access to all the property values we need on the providers to initialize the graph components, but without the need for the full Behaviors package which we utilize no other parts from.Initialization Before
Initialization After
Other Considerations
We currently ship a WPF based package for our providers for use within XAML Islands. Not sure if we'd still want to ship a similar solution or not, we'd have to discuss. It was a bit easier before as we could leverage the same behavior code pretty easily between the two, not sure if this solution would be similar...
The text was updated successfully, but these errors were encountered: