microsoftgraph / msgraph-sample-maui

This sample demonstrates how to use the Microsoft Graph .NET SDK to access data in Office 365 from .NET MAUI apps.
MIT License
31 stars 15 forks source link

Login Menu Missing #125

Open pickleworks opened 1 month ago

pickleworks commented 1 month ago

Describe the bug Landing page only shows "Welcome to Graph + MAUI! Please sign in using the menu" However, there is <<< No Menu Shown >>>

To Reproduce Steps to reproduce the behavior:

  1. Follow instructions in Read.Me (set up mobile app registration in MS Entra admin center, set authentication to msal, set client ID in settings and Android.cs)
  2. Launch App
  3. See error

Expected behavior I'm expecting to see a Login Menu.

Screenshots Here is screenshot of running app: image

Desktop:

jasonjoh commented 1 month ago

I believe on Android you need to swipe from the left side. Can you try that?

pickleworks commented 1 month ago

Okay, I tried that, swiping left or right minimized the app.

jasonjoh commented 1 month ago

Interesting. I found this: https://github.com/dotnet/maui/issues/19178#issuecomment-1921629640

Can you try changing this line in Styles.xaml and see if you can get the hamburger icon to show up?

https://github.com/microsoftgraph/msgraph-sample-maui/blob/4beddd0e33865b15034263d857a2f3e6ec18819e/GraphMAUI/Resources/Styles/Styles.xaml#L381

Try changing that line to:

<Setter Property="Shell.ForegroundColor" Value="{OnPlatform WinUI={StaticResource Primary}, Default={StaticResource Primary}}" />
pickleworks commented 1 month ago

Okay, I tried that but it didn't do anything.

I was able to get the hamburger icon to show up after setting the style back to white (versus primary), and changing Shell.NavBarIsVisible="True" on line 12 of this file:

https://github.com/microsoftgraph/msgraph-sample-maui/blob/4beddd0e33865b15034263d857a2f3e6ec18819e/GraphMAUI/AppShell.xaml

This is now letting me login. Thanks. Not sure what else that is breaking or why it was set to false....