I do not know if it's the right way or the easiest way, but you can pass the variable as the link parameter used to navigate to page 2 and set page 2 to an OnNavigatedTo method to receive this parameter, see. >
On page 1:
private void btnNavegar_Click(object sender, RoutedEventArgs e)
{
Uri caminho = new Uri("/Pagina2.xaml?parametro=" + txtParametro.Text,UriKind.RelativeOrAbsolute);
NavigationService.Navigate(caminho);
}
On page 2:
protected override void OnNavigatedTo(NavigationEventArgs e)
{
base.OnNavigatedTo(e);
string parametroRecebido;
if (NavigationContext.QueryString.TryGetValue("parametro", out parametroRecebido))
{
MessageBox.Show("O paramêtro recebido foi : " + parametroRecebido);
}
}