【发布时间】:2013-08-11 13:08:55
【问题描述】:
我得到一个:
An exception of type 'System.InvalidOperationException' occurred in Microsoft.Phone.ni.dll but was not handled in user code
当我这样做时:
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
谁能看出我哪里出了大错?
【问题讨论】:
-
可能像这里的资源相关问题? stackoverflow.com/a/6770469/594832
-
如果先添加后退按钮会怎样?这可以缩小范围。
标签: c# windows-phone-8 invalidoperationexception