I am trying to create a bottom nav bar with the NuGet:ThriveGmbH.BottomNavigationBar.XF
I hope that I am thinking correctly but this is my setup.
This is the code that is linking to my profile page, here I get the error
Severity Code Description Project File Line Suppression State
Error CS1729 'BottomNavPage' does not contain a constructor that takes 1 arguments DoggaLogg.Android, DoggaLogg.iOS, DoggaLogg.UWP C:\Users\mawil3\source\repos\DoggaLogg\DoggaLogg\DoggaLogg\View\HomePage.xaml.cs 40 Active
Error CS1729 'BottomNavPage' does not contain a constructor that takes 1 arguments DoggaLogg.Android, DoggaLogg.iOS, DoggaLogg.UWP C:\Users\mawil3\source\repos\DoggaLogg\DoggaLogg\DoggaLogg\View\HomePage.xaml.cs 40 Active)
async void ProfileList_ItemSelected(object sender, SelectedItemChangedEventArgs e)
{
if (e.SelectedItem != null)
{
await Navigation.PushAsync(new BottomNavPage(BindingContext = e.SelectedItem));
}
}
Here is my bottomnavbar xaml page:
<xf:BottomBarPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="DoggaLogg.View.BottomNavPage"
xmlns:xf="clr-namespace:BottomBar.XamarinForms"
xmlns:pages="clr-namespace:DoggaLogg.View">
<pages:ProfilePage Title="Profile" Icon="icon" />
<pages:GoalPage Title="Goalse" Icon="icon" /></xf:BottomBarPage>
And here Bottomnavbar.cs
namespace DoggaLogg.View{
[XamlCompilation(XamlCompilationOptions.Compile)]
public partial class BottomNavPage : ContentPage
{
public BottomNavPage ()
{
InitializeComponent ();
}
}}
From my understanding e.selecteditem
should pass through the selected item, or am I wrong?
What could cause the error?