I have a TappedPage like so:
<?xml version="1.0" encoding="UTF-8"?>
<TabbedPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:local="using:MyApp" x:Class="MyApp.AccountPatientPage" Title="Account">
<local:PatientConditions IconImageSource="user.png" />
<local:PatientPainKillers IconImageSource="user.png" />
<local:PatientPainStory IconImageSource="user.png" />
</TabbedPage>
and here is the code behind:
public partial class PatientProfilePage : TabbedPage
{
public PatientProfilePage(string username)
{
InitializeComponent();
}
}
My question is how can I pass the string username to the other pages? Here is an example of one.
public partial class PatientConditions : ContentPage
{
public PatientConditions(string username)
{
InitializeComponent();
}
}
your pages will inherit their parent's
BindingContext
unless you specify differently