Open PureWeen opened 6 months ago
Any News around this one @PureWeen ? This is the main show stopper for me to adopt shell?
Any news around this?
It has been +2 years since I've reported this bug for MSFT and they didn't come up with a proper solution, so to save your precious time consider completely ditching MAUI AppShell for now, and use the following library to workaround this issue: https://github.com/naveasy/Naveasy
Any news on this @PureWeen @jfversluis @samhouts ?
.NET 9 is just around the corner and I have serious doubt if they are gonna release it despite of asking for it since early days of .NET 6 many years ago with a bunch of details, samples and etc as you can see on the following Issue (which they shamelessly closed without any solution when it reached 2yo and reached the 1st most commented issue here on MAUI GH repo, instead of keeping it open until this api design flaw gets fixed).
In the OnNavigatedTo event of Page, PreviousPage of NavigatedToEventArgs is declared as internal, so it cannot be used.
Is there a reason why you declared PreviousPage as internal? I want PreviousPage to be declared as public.
namespace Microsoft.Maui.Controls { public sealed class NavigatedToEventArgs : EventArgs { internal NavigatedToEventArgs(Page previousPage) { PreviousPage = previousPage; }
internal Page PreviousPage { get; } <-- Why internal?
} }
In the OnNavigatedTo event of Page, PreviousPage of NavigatedToEventArgs is declared as internal, so it cannot be used.
Is there a reason why you declared PreviousPage as internal? I want PreviousPage to be declared as public.
create a new PR for it. There was one, which was closed to no activity from the author.
See How to use PreviousPage which is hidden internally.
@PureWeen we're eager waiting for this to see the light of the day so I can finally starts using Shell.
@PureWeen we're eager waiting for this to see the light of the day so I can finally starts using Shell. In addition to the suggested properties described on this issue description it would be nice if you could provide us a way to cancel/override back button navigation. It could be a bool property where we can set to cancel navigation or a brand new event that's triggered right when the user clicked on the phisical device back button but before the back navigation really takes place. This might be out of scope, but if easy to implemente it would be nice to have.
Here's a sample that asks the user to save the modified data before going back when the user edits the data on the Page screen.
@gwise-vision thanks for the example, I haven't played too much with shell because of the original reason of this bug item. But your as by your sample it seems nice the way Maui AppShell allows us to achieve this back navigation confirmation scenario. Thanks for sharing.
Is it still planed for .NET 9 GA or are we going to have to wait for another entire year until .NET 10? @PureWeen @jfversluis @samhouts @davidortinau @StephaneDelcroix
Description
Currently the navigation args provide no useful information:
We added these
args
very early on so that we'd be setup to add better information later on.Here are some suggested additional properties