docs-maui icon indicating copy to clipboard operation
docs-maui copied to clipboard

Documentation for Maui Shell Flyout has typecast errors in Android when using the default template provided with AppThemeBinding

Open biozal opened this issue 1 year ago • 0 comments

Type of issue

Code doesn't work

Description

When using the default template for Flyout Items provided here: https://learn.microsoft.com/en-us/dotnet/maui/fundamentals/shell/flyout?view=net-maui-8.0#default-template-for-flyoutitems

Specifically this code below:

<Label.TextColor>
                <OnPlatform x:TypeArguments="Color">
                    <OnPlatform.Platforms>
                        <On Platform="Android"
                            Value="{AppThemeBinding Light=Black, Dark=White}" />
                    </OnPlatform.Platforms>
                </OnPlatform>
            </Label.TextColor>

The App will crash on Android with API 31 and higher (tested on API 31, 32, and 33). I haven't tested in prior versions. It seems there are issues with Maui, Shell, and the Flyout navigation menu and the docs aren't helping because I can't get a Flyout menu to stabile work with the set documentation provided in this page.

I have also raised an issue with the background color not working on the Maui board which when used with this documentation code the bug worse: https://github.com/dotnet/maui/issues/19141

Also in iOS there is an issue with the header code provided that it causes the first link in iOS in the Flyout menu to to not work: https://github.com/dotnet/maui/issues/17965

Page URL

https://learn.microsoft.com/en-us/dotnet/maui/fundamentals/shell/flyout?view=net-maui-8.0#default-template-for-flyoutitems

Content source URL

https://github.com/dotnet/docs-maui/blob/main/docs/fundamentals/shell/flyout.md

Document Version Independent Id

05d3c8f0-3066-5129-e6cd-3c3d05fcbb59

Article author

@davidbritch

Metadata

  • ID: 05d3c8f0-3066-5129-e6cd-3c3d05fcbb59
  • Product: dotnet-mobile
  • Technology: dotnet-maui

biozal avatar Dec 01 '23 15:12 biozal