1
Good night I’m wearing the frame.navigate
to switch pages and pass an object as parameter in windowsphone so far all quiet my doubt is how do I pass another parameter that comes from another page without problem. An error occurs because when trying to pass another parameter it falls in the first and hangs would like to know how to do the processing to differentiate the sent parameters from different pages. Example
protected override void OnNavigatedTo(NavigationEventArgs e){
this.navigationHelper.OnNavigatedTo(e);
if(e. tratamento que estou em duvida = objeto cliente){
Cliente clienteRecebido = (Cliente)e.Parameter;
tbIdCliente.Text = Convert.ToString(clienteRecebido.idCliente);
tbCliente.Text = clienteRecebido.razao;
tbDataPedido.Text = "01/01/2015";
}else if(e.tratamento que estou em duvida = objeto produto){
//classe protudo e seus atributos etc
}
}
I didn’t quite understand your doubt, you want to pass two objects by navigated to?
– Felipe Avelar
Wouldn’t it be better to use Navigationservice? But take a look here: https://social.msdn.microsoft.com/Forums/en-US/8cb42356-82bc-4d77-9bbc-ae186990cfd5/passing-parameters-during-navigation-in-windows-8?forum=winappswithcsharp using list
– Leonardo
I will try to exemplify to see if I can explain better the problem
– raso
I’ll try to illustrate and see if I can explain the problem better. There’s a main screen with two buttons one button goes to a customer screen and another button goes to the product screen. When clicking the button to go to the customer screen appears a list with customers for the user to choose when clicking this list I return to the main screen passing as parameter a client object. Then I will choose the products click on the product search button that takes me to a screen that has a list with the products and this list when clicked on the item returns to main screen with a param obj
– raso
My problem is to receive this second parameter because I know that there has to be a treatment to identify what type of parameter I am receiving most know how to do this treatment. In my case Navigationservice is not working for this version I’m developing Leornado already tried and it did not work
– raso