- android - RelativeLayout 背景可绘制重叠内容
- android - 如何链接 cpufeatures lib 以获取 native android 库?
- java - OnItemClickListener 不起作用,但 OnLongItemClickListener 在自定义 ListView 中起作用
- java - Android 文件转字符串
我正在为 Surface 应用程序使用 WinRT 和 Prism。暂停时出现此异常。GetNavigationState 不支持传递给 Frame.Navigate 的参数类型的序列化
最佳答案
很可能您在某处将复杂类型传递给 Navigate(),并且该类型无法序列化。
路易斯·坎特罗 (Luis Cantero) 的回答 here :
To enable serialization of the frame's state using GetNavigationState, you must pass only basic types to this method, such as string, char, numeric, and GUID types. If you pass an object as a parameter, an entry in the frame's navigation stack holds a reference on the object until the frame is released or that entry is released upon a new navigation that diverges from the stack. In general, we discourage passing a non-basic type as a parameter to Navigate because it can’t be serialized when the application is suspended, and can consume more memory because a reference is held by the frame’s navigation stack to allow the application to go forward and back.
另见 Exception when calling SuspensionManager.SaveAsync()
和http://www.damirscorner.com/UsingSuspensionManagerForSavingApplicationState.aspx
关于c# - GetNavigationState 不支持传递给 Frame.Navigate 的参数类型的序列化,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23896488/
我正在为 Surface 应用程序使用 WinRT 和 Prism。暂停时出现此异常。GetNavigationState 不支持传递给 Frame.Navigate 的参数类型的序列化 最佳答案 很
我是一名优秀的程序员,十分优秀!