2

I use this code for creating a reminder in Windows Phone 8 app:

String name = System.Guid.NewGuid().ToString();
Reminder reminder = new Reminder(name);
reminder.Title = AppResources.ReminderTitle;
reminder.Content = contentTextBox.Text;
reminder.BeginTime = beginTime;
reminder.ExpirationTime = expirationTime;
reminder.RecurrenceType = recurrence;
reminder.NavigationUri = new Uri("/MainPage.xaml", UriKind.Relative);
ScheduledActionService.Add(reminder);

Very simple code. This reminder works fine except it doesn't navigate to my MainPage.xaml when i tap on it. It just closes the reminder. I also tried UriKind.RelativeOrAbsolute in NavigationUri. This code is in AddReminderPage.xaml and MainPage.xaml is in the same folder. What am i doing wrong? Why it is not navigating to my app? Any idea?

Also i checked this documentation and did the exact same: http://msdn.microsoft.com/en-us/library/windowsphone/develop/hh202965(v=vs.105).aspx#ADDREMINDERS

Murat
  • 149
  • 1
  • 16
  • You say that AddReminderPage.xaml and MainPage.xaml are in the same folder, but which folder is that? – meneses.pt May 05 '14 at 12:56
  • I mean they are in the root folder. Top Level. – Murat May 06 '14 at 12:59
  • Then I think There is no reason for that to happen. Just try this to see if it works: `reminder.NavigationUri = new Uri(".\\MainPage.xaml", UriKind.Relative);` – meneses.pt May 06 '14 at 13:05
  • No, i doesn't work either. By the way if write an Uri that doesn't exist it gives me error. So think Uri is correct. Weird – Murat May 06 '14 at 13:31

1 Answers1