1

Since after my update from Preview 2.1 to 3.0 my flyout items are not displaying. I can see the flyout menu, the header and footer and the blank white space where the flyout items should be. I followed this guide a little while back to set up my shell menu set up in app.xaml

Github page

The source guide

<Shell.ItemTemplate>
                <DataTemplate>
                    <Grid ColumnDefinitions="0.25*,0.75*"
                          Padding="0, 10">
                        <Image Source="{Binding FlyoutIcon}"
                               HeightRequest="45"
                               HorizontalOptions="Center"/>

                        <Label Grid.Column="1"
                               Text="{Binding Title}"
                               FontSize="Large"
                               FontAttributes="Bold"
                               VerticalOptions="Center"/>
                    </Grid>
                </DataTemplate>
            </Shell.ItemTemplate>

The flyout items look like this

 <FlyoutItem Title="Home"
                        Icon="home.png">
                <ShellContent ContentTemplate="{DataTemplate p:HomePage}"/>
            </FlyoutItem>

Nothing else has changed in my code that would have cause this. I have even tried to change the datatemplate label text to something static to see if it would display and still no luck.

Mufacka
  • 227
  • 1
  • 2
  • 11
  • It does sound like something has changed or broken. To pin down what it might be: **1)** Delete all `bin` and `obj` folders from solution. Does that fix it? IF NOT, THEN **2)** Create a new solution, and add that xaml to it. And the needed resources. – ToolmakerSteve Apr 14 '22 at 16:22
  • 1
    Unfortunately deleting those two folders didn't seem to fix it. I will attempt to transfer all the xaml & c# to a new project and see if that works. – Mufacka Apr 14 '22 at 18:08
  • If the new project doesn't work, then please upload it to github as a **public** repo. (You'll need to create a new free github account, if you don't have one.) Add a link to that repo here. If no one spots a problem with what you've done, then the next step would be to search for a similar issue at [github - Maui - Issues](https://github.com/dotnet/maui/issues). If no similar one exists, then start a new one, with a link to that repo. – ToolmakerSteve Apr 14 '22 at 18:15
  • Unfortunately that didn't work, is there a better way I should be achieving a flyout menu for the whole app? I have looked at https://learn.microsoft.com/en-us/dotnet/maui/fundamentals/shell/flyout and its all done in its own shell XAML file which is obviously different than in App.xaml - the Maui beach example would be closest to my project as far as the shell goes without all the other things I have going in my project. I really want to continue working on my project but I'm kind of at a standstill. Is there a way to downgrade to preview 2.1? – Mufacka Apr 14 '22 at 23:17
  • It probably won’t work any better with a separate shell.xaml. To downgrade, you’d need someone from microsoft to come along and give a url to earlier version. Your best bet is to upload a public github repo, so someone can run it, see if they get the same symptom. Or you could defer working with shell, just make a navigation page or a tabbedpage for now. – ToolmakerSteve Apr 14 '22 at 23:50
  • 2
    So weird thing I noticed, I check flyout menu - no flyout items, I have a homepage to get to the other pages via Navigation.PushAsync, I went to one created an item in the DB go back to home page, hit flyout menu and there are my items. Tried it multiple times same result. Something different with loading those flyout items between versions? Anyways, I am convinced this must be a bug. I'll put this on the back burner for now and see if it gets resolved. – Mufacka Apr 15 '22 at 00:30
  • I too have this problem. My [current] repo is on https://github.com/gfmoore/MauiApp4.App if anyone cares to look. It should bring up the menu with a header, but you have to mouse scroll over it to see the items appear. – gfmoore May 25 '22 at 12:18
  • It seemed to be fixed with latest preview version, I updated yesterday – Mufacka May 26 '22 at 13:33

1 Answers1

0

It appears that when I apply a change to app.xaml where the shell is and then hot reload, the flyout items appear again. Seems like this bug .

Mufacka
  • 227
  • 1
  • 2
  • 11