开发者

Windows Phone 7-System.ArgumentOutOfRangeException

everyone. I am developing an app for the win7 phone and have some problem with navigation. I have one panorama and two pivot controls. The panorama control it is MainPage, when I am navigating to the first pivot control and do some job, I can go back to the MainPage and then go out of the app without any problem. However, when I do some job in the second pivot control, then I have a problem to go back to the MainPage. I am navigating MainPage-->FirstPivot"Back button"-->MainPage-->SecondPivot"Back button"-->MainPage. I can see that I am entering the MainPage, but then app is crashes. In the output window, I can see this exception:

A first chance exception of type 'System.ArgumentOutOfRangeException' occurred in mscorlib.dll
A first chance exception of type 'System.ArgumentException' occurred in System.Windows.dll
A first chance exception of type 'System.ArgumentException' occurred in System.Windows.dll
A first chance exception of type 'System.ArgumentException' occurred in System.Windows.dll
A first chance exception of type 'System.ArgumentException' occurred in System.Windows.dll
A first chance exception of type 'System.ArgumentException' occurred in System.Windows.dll
A first chance exception of type 'System.ArgumentException' occurred in System.Windows.dll
A first chance exception of type 'System.ArgumentException' occurred in System.Windows.dll
A first chance exception of type 'System.ArgumentException' occurr*emphasized text*ed in System.Windows.dll
A first chance exception of type 'System.ArgumentException' occurred in System.Windows.dll
'taskhost.exe' (Managed): Loaded 'System.SR.dll'
A first chance exception of type 'System.ArgumentOutOfRangeException' occurred in mscorlib.dll
A first chance exception of type 'System.ArgumentException' occurred in System.Windows.dll
A first chance exception of type 'System.ArgumentException' occurred in System.Windows.dll
A first chance exception of type 'System.ArgumentException' occurred in System.Windows.dll
A first chance exception of type 'System.ArgumentException' occurred in System.Windows.dll
A first chance exception of type 'System.ArgumentException' occurred in System.Windows.dll
A first chance exception of type 'System.ArgumentException' occurred in System.Windows.dll
A first chance exception of type 'System.ArgumentException' occurred in System.Windows.dll
A first chance exception of type 'System.ArgumentException' occurred in System.Windows.dll
A first chance exception of type 'System.ArgumentException' 开发者_如何学Coccurred in System.Windows.dll
A first chance exception of type 'System.IO.IsolatedStorage.IsolatedStorageException' occurred in mscorlib.dll


You do not give enough detail in your question to answer it, however, it sounds like you have a problem with where you maintain state and possibly your tombstoning implementation. I would recommend reading this article and basing your solution around the techniques described:

http://www.scottlogic.co.uk/blog/colin/2011/05/a-simple-windows-phone-7-mvvm-tombstoning-example/


I encountered this error when I tried to bind two UIElement into two different container.

(In fact UIElement was a UserControl(partial class). I have another class named same and partial, this caused missunderstanding :)

In silverlight you can remove one element from a container and add it into another container.

But you can't add an UIElement into two different container.

But something else cause this error as Colin said the error message is not so clear. I'm seeing below errors in your stack. You may check part of IsolatedStorage usage if exist.

occurr*emphasized text*ed in System.Windows.dll and System.IO.IsolatedStorage.IsolatedStorageException' occurred

Hope helps

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜