Silverlight 8.1 新功能

Silverlight 8.1,这是个有点奇葩的版本号。

Silverlight 在Web上到5.0就没有继续更新了,在WP上一直做为界面输出,然而WP7.X时代没有公开它是Silverlight 7,在WP8.0也没有公开它是Silverlight 8.0,这到了WP8.1就直接叫他是Silverlight 8.1了,让很多开发者有点晕。

Silverlight 8.1 在WP上指的是WP8.1的一种项目模板,为了完全向下兼容WP8.0而存在。

但也有部分行为需要重新定义,包括后退键的处理。具体如下:

按后退键时退出应用。

Silverlight 8.1 and Windows Phone 8 apps are terminated when the user uses the Back button to navigate backward past the first page of the app. This is different than the behavior of Windows Phone Store apps, which are paused when the user backs out of them. You can force your app to use the behavior of Windows Phone Store apps by setting PauseOnBack, which causes your app to be suspended when the user navigates backward past the first page of the app.


恢复而不是创建一个新的实例

On Windows Phone 8, the default behavior when the user launches an app from the Apps list or its primary tile is for a new instance of the app to be launched, replacing any existing instance of the app. Developers could override this behavior by modifying the app manifest, described in Enabling Fast Resume in the app manifest file. A Silverlight 8.1 app is always resumed when launched, instead of replacing any running instance. This behavior matches the behavior of Windows Phone Store apps. However, Silverlight 8.1 and Windows Phone 8 apps are terminated when the user uses the Back button to navigate backward past the first page of the app. After an app is terminated this way, any launch of the app will result in a new instance being created.

不支持持续的后台执行

Windows Phone 8 apps can continue to run in the background after the user navigates away from the app under certain conditions. This feature is not available for Silverlight 8.1 apps. If you need this feature, you should continue to use a Windows Phone 8 app. For more information, see Running location-tracking apps in the background for Windows Phone 8.


后台代理可用的CPU时间片更少

For a managed Windows Phone 8 ScheduledTaskAgent to be able to access Silverlight 8.1 features, it runs on the modern execution stack, which is converged with Windows. This uses a different CPU quota mechanism than Windows Phone 8. In some cases, a Silverlight 8.1 background agent might find that it gets less CPU time than it did previously. If that happens, the app may choose to call RequestAccessAsync()()()(). This will increase the CPU quota given to the agent.


不支持AudioPlayerAgentAudioStreamingAgent

不支持 WalletAgent

不支持in-process后台任务

不支持本地化的磁贴更新(MNPS)

不能使用托管的Windows Runtime Componnet

需要在WMAppManifest.xml中声明DefaultTask

不能在WMAppManifest.xml中声明支持的分辨率

App Bar的行为在不同设备上表现不同

不能使用XNA

使用Windows.System.MemoryManager查看内存使用

不要在主线程中调用WaitForPendingFinalizers()

SL8.1在前台主线程使用STA,而WP8.0使用MTA


Panorama的改变

In Windows Phone 8, Panorama does not call Measure(Size) for collapsed items. This has the consequence that items initially added as Collapsed are not displayed when their visibility is set to Visible until some other event triggers a call to MeasureOverride(Size). This is not the case in Silverlight 8.1

In Silverlight 8.1, Panorama handles PanoramaItem objects uniformly, whether they were explicitly added or generated through databinding. The SelectedItem property will return the associated data item. Also, the SelectionChanged event is now raised for databound PanoramaItem objects. In Windows Phone 8, it is not.

Web requests的改变

  • In Windows Phone 8, HTTP requests using the TRACE verb are blocked. This verb is allowed in Silverlight 8.1.

  • In Windows Phone 8, the BeginGetResponse(AsyncCallback, Object) callback is invoked only when the response body is received rather than when the response headers arereceived, even when AllowReadStreamBuffering is set to false. This is fixed in Silverlight 8.1.

  • In Windows Phone 8, when a protocol error occurs on a web request, the resulting WebException message always indicates that the error is "Not Found". In Silverlight 8.1, the error message indicates which protocol error occurred.

  • In Windows Phone 8, http-only cookies are stripped out of web responses before passing the CookieContainer back to the app. This is not done in Silverlight 8.1.

  • In Windows Phone 8, HttpWebRequest is limited to a fixed 5 automatic redirects. This limitation has been removed.

  • In Windows Phone 8, HttpWebRequest rewrites a request as GET before resending it if a 307 Temporary Redirect response status code is received. This behavior is incorrect according to RFC 2616 and has been fixed in Silverlight 8.1.

  • If an HttpWebRequest is aborted before EndGetResponse(IAsyncResult) is called, then calling EndGetResponse(IAsyncResult) would throw an exception even if a response had been received. In Windows Phone 8, in this scenario HaveResponse returns true even though it is impossible for an app to retrieve the response

Web Browser 的改变

The HTML5 project template has been modified for Silverlight 8.1. The included CSS file (phone.css) contains definition for width, which was set to values that would not scale well with newly supported device resolutions. In Silverlight 8.1, the value "device-width" has been added and will return correct values based on device size and resolutions.

In the Windows Phone 8 WebBrowser control, the default value of IsScriptEnabled is false, which caused frustration among developers because it’s not obvious that it needs to be set to true for the control to work correctly. In Silverlight 8.1 the tools have been updated to set that value to true by default at design time.

In Silverlight 8.1, the User Agent string used by the WebBrowser control has been updated to include the string “WebBrowser/8.1” to enable web sites to identify clients using the control. 


CLR的改变

XDocument.Load只能加载.appx包中的内容

Uri支持ms-app语法

Sort()使用introspective sort取代快排。


内容概要:本文深入解析了扣子COZE AI编程及其详细应用代码案例,旨在帮助读者理解新一代低门槛智能体开发范式。文章从五个维度展开:关键概念、核心技巧、典型应用场景、详细代码案例分析以及未来发展趋势。首先介绍了扣子COZE的核心概念,如Bot、Workflow、Plugin、Memory和Knowledge。接着分享了意图识别、函数调用链、动态Prompt、渐进式发布及监控可观测等核心技巧。然后列举了企业内部智能客服、电商导购助手、教育领域AI助教和金融行业合规质检等应用场景。最后,通过构建“会议纪要智能助手”的详细代码案例,展示了从需求描述、技术方案、Workflow节点拆解到调试与上线的全过程,并展望了多智能体协作、本地私有部署、Agent2Agent协议、边缘计算插件和实时RAG等未来发展方向。; 适合人群:对AI编程感兴趣的开发者,尤其是希望快速落地AI产品的技术人员。; 使用场景及目标:①学习如何使用扣子COZE构建生产级智能体;②掌握智能体实例、自动化流程、扩展能力和知识库的使用方法;③通过实际案例理解如何实现会议纪要智能助手的功能,包括触发器设置、下载节点、LLM节点Prompt设计、Code节点处理和邮件节点配置。; 阅读建议:本文不仅提供了理论知识,还包含了详细的代码案例,建议读者结合实际业务需求进行实践,逐步掌握扣子COZE的各项功能,并关注其未来的发展趋势。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值