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取代快排。


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
图像识别技术在病虫害检测中的应用是一个快速发展的领域,它结合了计算机视觉和机器学习算法来自动识别和分类植物上的病虫害。以下是这一技术的一些关键步骤和组成部分: 1. **数据收集**:首先需要收集大量的植物图像数据,这些数据包括健康植物的图像以及受不同病虫害影响的植物图像。 2. **图像预处理**:对收集到的图像进行处理,以提高后续分析的准确性。这可能包括调整亮度、对比度、去噪、裁剪、缩放等。 3. **特征提取**:从图像中提取有助于识别病虫害的特征。这些特征可能包括颜色、纹理、形状、边缘等。 4. **模型训练**:使用机器学习算法(如支持向量机、随机森林、卷积神经网络等)来训练模型。训练过程中,算法会学习如何根据提取的特征来识别不同的病虫害。 5. **模型验证和测试**:在独立的测试集上验证模型的性能,以确保其准确性和泛化能力。 6. **部署和应用**:将训练好的模型部署到实际的病虫害检测系统中,可以是移动应用、网页服务或集成到智能农业设备中。 7. **实时监测**:在实际应用中,系统可以实时接收植物图像,并快速给出病虫害的检测结果。 8. **持续学习**:随着时间的推移,系统可以不断学习的病虫害样本,以提高其识别能力。 9. **用户界面**:为了方便用户使用,通常会有一个用户友好的界面,显示检测结果,并提供进一步的指导或建议。 这项技术的优势在于它可以快速、准确地识别出病虫害,甚至在早期阶段就能发现问题,从而及时采取措施。此外,它还可以减少对化学农药的依赖,支持可持续农业发展。随着技术的不断进步,图像识别在病虫害检测中的应用将越来越广泛。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值