Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void Button_Click(object sender, RoutedEventArgs e)
- {
- string uri = string.Format("/Pagina2.xaml?nomeParametro={0}", txtValor.Text);
- NavigationService.Navigate(new Uri(uri, uriKind.Relative));
- }
- protected override void OnNavigatedTo(NavigationEventArgs e)
- {
- if (NavigationContext.QueryString["nomeParametro"] != null)
- txtParametro.Text = NavigationContext.QueryString["nomeParametro"];
- base.OnNavigatedTo(e);
- }
- private void Button_Click(object sender, RoutedEventArgs e)
- {
- string parametro = txtValor.Text;
- this.Frame.Navigate(typeof(Pagina2), parametro);
- }
- protected override void OnNavigatedTo(NavigationEventArgs e)
- {
- txtParametro.Text = (string)e.Parameter;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement