I am getting a:
An exception of type 'System.InvalidOperationException' occurred in Microsoft.Phone.ni.dll but was not handled in user code
When I do:
ApplicationBarIconButton nextButton = new ApplicationBarIconButton(new Uri("/Images/next.png", UriKind.Relative));
nextButton.Text = "Next";
ApplicationBarIconButton backButton = new ApplicationBarIconButton(new Uri("/Images/back.png", UriKind.Relative));
nextButton.Text = "Previous";
ApplicationBar.Buttons.Add(nextButton);
ApplicationBar.Buttons.Add(backButton); //<---- Error when adding this
Can anyone see where I am going horribly wrong?