Back to the back page (c #, Xamarin, Android)

0

I have the following code and would need either if the configuration has been saved or not, to go back to the previous page.

private void Boton_press(object sender, EventArgs e)
{
// 
// Guardar datos en archivo
String filename = "ruta";
String contenido = parametros;

try
{
// Aqui grabo el archivo
var res=DisplayAlert("Configuracion", "Configuracion guardada", "Ok","Cancel");
// cerrar y volver al principio, despues de guardar la configuracion
}
catch (Exception)
{
// no se pudo guardar la configuracion
DisplayAlert("Error", "Error al escribir fichero a memoria interna", "Ok");
// terminar la aplicacion
//NavigationPage MainPage = new NavigationPage(new MainPage());
}
}

With the NavigationPage, it did not work for me.

Thanks

    
asked by Jordi Maicas Peña 23.04.2018 в 02:27
source

0 answers