-1

whenever I go to one page to another page like mainpage.xaml to profile.xaml page UNHANDLED_EXCEPTION occured.its go to global::System.Diagnostics.Debugger.Break(); in app.g.i.cs page.please help me how to handle this exception.Thanks in advance.

My sample code is:

private async void profile_Click(object sender, RoutedEventArgs e)
        {
            try
            {


            await Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () =>
            {
                Frame.Navigate(typeof(profile), 0);
            });

            }
            catch (Exception)
            {

                throw;
            }



        }
Anil Kumar
  • 303
  • 1
  • 6
  • 23

1 Answers1

0

try to use this

 await Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, ()=>
 {
       Frame.Navigate(typeof(SecondPage));                       
 });
Kushal Maniyar
  • 846
  • 1
  • 8
  • 26
  • thankyou for your response. I will try and tell you. – Anil Kumar Sep 26 '15 at 06:48
  • private async void profile_Click(object sender, RoutedEventArgs e) { try { await Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () => { Frame.Navigate(typeof(profile), 0); }); } catch (Exception) { throw; } } – Anil Kumar Sep 26 '15 at 06:56