本文介绍了GetNavigationState不支持在Win8 RP + VS2012 RC上传递给Frame.Navigate的参数类型的序列化的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我们将复杂对象传递给Navigate方法(具有一些属性的类),当应用程序暂停时,我们调用SuspensionManager.SaveAsync方法 我们在Frame上得到以下错误。 GetNavigationState: 

If we pass a complex object to Navigate method (a class with a few properties), when the App is suspended and we invoke the SuspensionManager.SaveAsync method we get the following error on Frame.GetNavigationState: 

GetNavigationState不支持传递给Frame.Navigate 的参数类型的序列化

GetNavigationState doesn't support serialization of a parameter type which was passed to Frame.Navigate

我尝试将无参数默认公共构造函数添加到参数类型中,并将[System.Runtime.Serialization.DataContract]和[System.Runtime.Serialization.DataMember]属性添加到其成员但是问题依然存在。

I tried to add a parameterless default public constructor to the parameter type and [System.Runtime.Serialization.DataContract] and [System.Runtime.Serialization.DataMember] attributes to its members but the issue remains.

推荐答案


这篇关于GetNavigationState不支持在Win8 RP + VS2012 RC上传递给Frame.Navigate的参数类型的序列化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-25 19:36