Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting visibility of FlyoutItem to invisible results in a crash #47

Open
arnirichard opened this issue Nov 25, 2021 · 0 comments
Open

Comments

@arnirichard
Copy link

arnirichard commented Nov 25, 2021

I am new to Maui and I need to create an app where tab visibility depends on the user data/rights. So I began to study this sample project.

I made the following change to App.xml: (added x:Name="tabFav" IsVisible="False")

<FlyoutItem Title="Favorites" Icon="tab_favorites.png" x:Name="tabFav" IsVisible="False"> <ShellContent ContentTemplate="{DataTemplate page:FavoritesPage}"/> </FlyoutItem>

and changed in App.xaml.cs:

void TapGestureRecognizer_Tapped(System.Object sender, System.EventArgs e) { Shell.Current.GoToAsync("///settings"); tabFav.IsVisible = !tabFav.IsVisible; }

Setting tabFav to visible works but setting to invisible results in unhandled exception when running app in Windows

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant