[Question] Is it possible to show a content page (modal) from the bottom sheet without close it first?
See original GitHub issueHello @paulvarache ,
First, I would like to thank you for the time and effort on this plugin, I have been using it on my first project and it works and looks fantastic for iOS and Android.
I am here to ask a question: I am using the bottom sheet to display some information and the information has some buttons that navigate to another screen (content page using modal), however, when I click the button or element it does not work. It triggers correctly the tap gesture event, however, it does not navigate to the modal screen.
This is how I want to navigate to a page (modal) from the tap event:
async void TapGestureRecognizer_Tapped(System.Object sender, Microsoft.Maui.Controls.TappedEventArgs e)
{
// await this.Dismiss(); if I dismiss it first it navigates OK.
var viewModel = BindingContext as DashboardViewModel;
if (viewModel.NavigateLocationLogsCommand.CanExecute(null))
await viewModel.NavigateLocationLogsCommand.ExecuteAsync(null);
}
Then on my viewmodel command I have the following line:
await Shell.Current.GoToAsync($"{nameof(InformationPage)}");
The Information Page has this property set:
Shell.PresentationMode="ModalAnimated"
I would like to navigate to that page and when the user closes it manually, return back and the bottom sheet still be open.
Any hint is always welcome.
Thanks in advance!!
Issue Analytics
- State:
- Created 4 months ago
- Comments:7 (3 by maintainers)

Top Related StackOverflow Question
Hello @paulvarache , I was able to test your sample and it works partially in your sample, however, I found out the modal was not implemented correctly on the code sample you updated. With all respect and your permission, I went ahead and forked the repository and updated the sample here: https://github.com/vhugogarcia/The49.Maui.BottomSheet on the branch: modal-page
These are the changes: https://github.com/vhugogarcia/The49.Maui.BottomSheet/commit/bdbe679cf3d0ca8ad5471631972d4d68e628d440
In summary, I removed the flyoutmenuitem since for modal we should navigate using relative urls instead of absolute with ///. Also, I updated the command to use async.
If you download my update repository and run it on iOS emulator, you will find out that when you open the bottomsheet for Modal page and then TAP on Go To Modal button from the bottom sheet, you will see that nothing happens and the Visual Studio console will report this:
Let me know if there is anything else I can help with to reproduce the issue.
Note: Also, if you try to show an alert from the BottomSheet it won’t work.
Thanks for looking into.
Thanks @paulvarache for looking into the issue. And I think opening a ticket in .NET MAUI may help to solve this mystery.
And not a problem. We can in the meantime continue dismissing the bottom sheet and show a modal or so.
Really appreciate the time you put into this issue. Let me know if there is anything I can help with 😃