3

I'm building a xamarin.forms mobile application with Prism, and want to use INavigationService.SelectTabAsync method. This method, according to the Prism documentation, should be in the Prism.Navigation.TabbedPages namespace but Visual Studio tells me that that no such namespace exists.

I have found absolutely none with a similar issue and when I search for the method name in google I get a measly 7 results back.

I have also tried making a completely new xamarin.forms app through the Prism template pack and still nothing shows up. I even tried installing all the prism Nuget packages and messing around with adding references to the project, but nothing...

This is what the Prism docs tells me to do:

Selecting a Tab

You can select a tab programmatically from within a tab's ViewModel by using >the INavigationService.SelectTabAsync method. In order to use this method, >you must add the Prism.Navigation.TabbedPages namespace to your ViewModel.

using Prism.Navigation.TabbedPages;
async void SelectTab(object parameters)
{
    var result = await _navigationService.SelectTabAsync("Tab3");    
}

And this seems easy enough but when no "TabbedPages" shows up in Intellisense for me (only the Xaml one) in the Prism.Navigation namespace I'm stuck.

Intellisense options at Prism.Navigation.

Version details:

  • Visual studio 2019 16.0.1 Preview 1.0
  • Visual studio 2017 15.9.5

enter image description here

2 Answers2

2

Try ver7.2.0.1175-ci in myget org.

Add "https://www.myget.org/F/prism/api/v3/index.json" to package source and check "include prerelease".

spacekey
  • 21
  • 3
-1

Please, try to add the TabbedPage using the Prism Template as shown in the attached image. In addition to that, this Video by Brian Lagunas somewhere around 1:06:00 could help. enter image description here

zinczinc
  • 544
  • 5
  • 11
  • Adding a Prism TabbedPage did not make any difference. I still can not use the SelectTabAsync() method because the using directive "using Prism.Navigation.TabbedPages;" does not exist. Also in the video you linked, Brian talks about the INavigationAware interface, not about Prism.Navigation.TabbedPages or the SelectTabAsync() method. – Anton Eriksson Apr 11 '19 at 10:21