@Yonglun Liu (Shanghai Wicresoft Co,.Ltd.) I have created a bug in GitHub with this URL - https://github.com/dotnet/maui/issues/20779. As suggested, it has been fixed and updated in the latest release. After updating, it is now working as expected.
FlyoutIsPresented is not working
In .NET MAUI, within the AppShell, when 'Shell.NavBarIsVisible' is set to 'False', and a button is clicked on any page, triggering the code 'Shell.Current.FlyoutIsPresented = !Shell.Current.FlyoutIsPresented;' in the code-behind, it does not function as expected on Android. However, it works as intended on iOS. Interestingly, the same implementation in the previous version for Xamarin.Forms was successful. Note: Upon clicking the button, the Hamburger menu does not open. However, after clicking the button for the first time, subsequently clicking any of the tab bar icons does open the menu.
i am downloaded code for this URL -https://github.com/dotnet/maui-samples/tree/main/8.0/Fundamentals/Shell
and added one line in AppShell-'Shell.NavBarIsVisible="False"' added button in CatsPage.xaml file- <StackLayout Padding="10,20,10,0"> <Button Text="Flyout Enable" Clicked="Button_Clicked"/> <CollectionView Margin="20" ItemsSource="{x:Static data:CatData.Cats}" ItemTemplate="{StaticResource AnimalTemplate}" SelectionMode="Single" SelectionChanged="OnCollectionViewSelectionChanged" /> </StackLayout>
button event
private void Button_Clicked(object sender, EventArgs e)
{
Shell.Current.FlyoutIsPresented = !Shell.Current.FlyoutIsPresented;
}