Prism: NavigateAsync and GoBackAsync have no overload method that takes animate-parameter [Bug]

Created on 26 Oct 2020  Â·  13Comments  Â·  Source: PrismLibrary/Prism

Description

It looks like after latest updates:
Prism.DryIoc.Forms 8.0.0.1909
Prism.Forms 8.0.0.1909
The animation parameter for NavigateAsync and GoBackAsync are gone. Is it by design or a bug?
Screen Shot 2020-10-26 at 2 50 37 PM
Uploading Screen Shot 2020-10-26 at 2.50.05 PM.png…

XF bug

Most helpful comment

They will be added back via PR #2235, until then you can add them to your own projects until we have published an updated Prism release to Nuget.

        public static Task<INavigationResult> GoBackAsync(this INavigationService navigationService, INavigationParameters parameters = null, bool? useModalNavigation = null, bool animated = true)
        {
            return navigationService.GoBackAsync(parameters, useModalNavigation, animated);
        }

        public static Task<INavigationResult> NavigateAsync(this INavigationService navigationService, string name, INavigationParameters parameters = null, bool? useModalNavigation = null, bool animated = true)
        {
            return navigationService.NavigateAsync(name, parameters, useModalNavigation, animated);
        }

All 13 comments

I think that the default parameter values have not been included when the IPlatformNavigation extensions have been merged into INavigationService. Whether this was intentional or not is a question for @brianlagunas / @dansiegel.

Everything is still usable if you specific all parameters for the method i.e. name, parameters, useModalNavigation and animated.

not really intentional... probably just a result of #2172.. sounds like there might have been an extension method that got messed up when we merged IPlatformNavigationService back into INavigationService

Any Idea what could cause this exceptions, related to this update
Screen Shot 2020-10-28 at 8 27 56 PM
Screen Shot 2020-10-28 at 8 26 34 PM

@sereoja are you using Prism.Plugin.Popups version 7.2.0 by any chance?

I found myself getting the same exception, which I believe is caused due to registering the popup navigation service. As the package has a dependency on Prism 7.2.0, in which the navigation service has a dependency on ILoggerFacade which has been removed in Prism 8.0.

@sereoja are you using Prism.Plugin.Popups version 7.2.0 by any chance?

I found myself getting the same exception, which I believe is caused due to registering the popup navigation service. As the package has a dependency on Prism 7.2.0, in which the navigation service has a dependency on ILoggerFacade which has been removed in Prism 8.0.

Thx, that is exactly the problem, so is solution to wait for the plugin Prism.Plugin.Popups update or are there any other fix for this?

Thx, that is exactly the problem, so is solution to wait for the plugin Prism.Plugin.Popups update or are there any other fix for this?

I imagine so, yes, unless you are a sponsor as the beta packages are available to GitHub sponsors.

Prism.Plugin.Popups has v8 compatibility in the Sponsor Connect feed and will be released generally at a future date.

As for the ContainerResolutionException use the GetErrors method it is your friend and will tell you the type(s) that couldn't be resolved and why.

I cannot Navigate to new page in ViewModel. I find a new documentation for Prism 8 but it not exist.
How to use NavigationService and Navigate to new page ? Any update for this ?

@nhdanh you've given no context and your comment does not seem to be related to this issue. If you have a how to question please feel free to start a discussion thread and someone from the community can help you.

Description
It looks like after latest updates:
Prism.DryIoc.Forms 8.0.0.1909
Prism.Forms 8.0.0.1909
The animation parameter for NavigateAsync and GoBackAsync are gone. Is it by design or a bug?

@dansiegel @brianlagunas Navigations API, without optionals parameters are a bug, that will be fix later? Or Not?

They will be added back via PR #2235, until then you can add them to your own projects until we have published an updated Prism release to Nuget.

        public static Task<INavigationResult> GoBackAsync(this INavigationService navigationService, INavigationParameters parameters = null, bool? useModalNavigation = null, bool animated = true)
        {
            return navigationService.GoBackAsync(parameters, useModalNavigation, animated);
        }

        public static Task<INavigationResult> NavigateAsync(this INavigationService navigationService, string name, INavigationParameters parameters = null, bool? useModalNavigation = null, bool animated = true)
        {
            return navigationService.NavigateAsync(name, parameters, useModalNavigation, animated);
        }

Issue related to V8 support in Prism.Plugin.Popups
https://github.com/dansiegel/Prism.Plugin.Popups/issues/179

this was merged in #2235

@rohitvipin no the issues aren't exactly related. If you require early access you can access the v8 build of the Popups on Sponsor Connect

Was this page helpful?
0 / 5 - 0 ratings