79092625

Date: 2024-10-16 05:55:57
Score: 0.5
Natty:
Report link

I've found the solution to the problem, it's quite simple. Simply wrap the content in a ContentView.

Thanks Shuowen and Giorgio for your replies. You helped push me towards the final answer :)

<Shell
    x:Class="MauiApp2.AppShell"
    xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
    xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
    xmlns:local="clr-namespace:MauiApp2"
    Shell.FlyoutBehavior="Flyout"
    Title="MauiApp2">

    <ShellContent
        Title="Home"
        ContentTemplate="{DataTemplate local:MainPage}"
        Route="MainPage" />
    
    <Shell.FlyoutContent>
        <ContentView>
            <Frame BackgroundColor="ForestGreen">
                <Label Text="hello"/>
            </Frame>
        </ContentView>
    </Shell.FlyoutContent>
</Shell>
Reasons:
  • Blacklisted phrase (0.5): Thanks
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: jho