第一范文网 - 专业文章范例文档资料分享平台

WhatsNewInSilverlight4 - 图文

来源:用户分享 时间:2025/7/26 1:20:06 本文由loading 分享 下载这篇文档手机版
说明:文章内容仅供预览,部分内容可能不全,需要完整文档或者需要复制内容,请下载word后使用。下载word有问题请添加微信号:xxxxxxx或QQ:xxxxxx 处理(尽可能给您提供完整文档),感谢您的支持与谅解。

Silverlight 4 Overview

Design-time ViewModels ................................................................................................................ 58 Moving Beyond the Browser – Sandboxed Applications .................................................................... 60

Out-of-Browser Windowing Updates ............................................................................................ 60 Hosting Web Content within Silverlight Applications ................................................................. 60 WebBrowserBrush ............................................................................................................................ 61 Notifications (Toast) ......................................................................................................................... 62 Window Closing Event ..................................................................................................................... 63 Moving Beyond the Browser – Elevated Trust Applications ............................................................... 65

Native Integration ............................................................................................................................. 66 File System Access ............................................................................................................................ 66 Cross-Domain Networking Access ................................................................................................. 67 Full File Path on Open and Save Dialogs ....................................................................................... 67 Sockets Security ................................................................................................................................ 68 XAP Signing ....................................................................................................................................... 68 Silent Install with SLLauncher.exe ................................................................................................... 71 Custom Window Chrome ................................................................................................................ 71 Full Keyboard in Full Screen Mode ................................................................................................. 72 Silverlight 4 Resources ............................................................................................................................. 74

Tools ................................................................................................................................................... 74 Training Kit ........................................................................................................................................ 74 Screencasts ........................................................................................................................................ 74 Blogs ................................................................................................................................................... 74 Twitter ................................................................................................................................................ 75 Key Links ............................................................................................................................................ 75

5 | Page

Silverlight 4 Overview

Credits

This document was written in collaboration with many people including most of the Microsoft Silverlight product team, the WCF RIA Services team, and the Expression Blend team. Their help in providing resources, content, and feedback was invaluable.

Special thanks to Adam Kinney who authored the Expression Blend content, which is a selected excerpt from the full Expression Blend Technical Whitepaper found at this link http://go.microsoft.com/fwlink/?linkid=186042. If you have any feedback on this document, contact:

? John Papa - jopapa@microsoft.com ? Adam Kinney - adkinn@microsoft.com

6 | Page

Silverlight 4 Overview

Introduction

Silverlight 4 enhancesthebuilding of business applications, media applications, and applications that reach beyond the browser. New features include printing support, significant enhancements for using forms over data, support for several new languages, full support in the Google Chrome web browser, WCF RIA Services, modular development with MEF, full support in Visual Studio 2010, bi-directional text, web camera and microphone support, rich text editing, improved data binding features, HTML support, MVVM and commanding support, new capabilities for local desktop integration running in the new “Trusted Application” mode such as COM automation and local file access.

This document explains the new features in Silverlight, where you can find learning materials, and identifies additional resources.

Figure 1

Silverlight 4 Multi Touch Puzzle Using the New Trusted Application, WebBrowser Control, and WebBrowserBrush Features

7 | Page

Silverlight 4 Overview

Enabling Business Application Development

Printing

Silverlight adds printing support that allows developers to control whether their

Silverlightapplication can print itself, how the content is formatted when printed, and determine the content that will appear. For example, you could add a print button to your Silverlight application that opens the Print dialog allows the user to choose the printer, and then prints the Silverlight content.

You can print content by first creating an instance of the PrintDocument class, then specifying the content to print, and finally writing code to handle the PrintPage event. You can print the entire Silverlight control by setting PrintPageEventArgs.PageVisual to the layout root of the Silverlight content. Alternatively, you can print a portion of the Silverlight content by setting PrintPageEventArgs.PageVisual to the named UIElement you wish to print. The following code sample prints all content within the UIElement named in the Silverlight application. C#

PrintDocument pd = new PrintDocument(); pd.PrintPage += (s, args) => {

args.PageVisual = LayoutRoot; };

pd.Print();

After the PrintPage event occurs, the content from the PageVisual is sent to the selected printer to be printed. Content that is too large to fit in to the PrintableAreawill be clipped. If HasMorePages is true, PrintPage occurs multiple times until HasMorePages is false. If you require customized printing options, you can write code for the StartPrint and EndPrint events to perform special handling.

You can print content that is notin the live visual tree. This allows you to make your printed content look different from your onscreen content. To do this, set PageVisual to a UIElement created in the PrintPage event without adding it to the live visual tree. Another tip to print elements which are not in the live tree is to explicitly run layout on them by calling measure and arrange.

8 | Page

搜索更多关于: WhatsNewInSilverlight4 - 图文 的文档
WhatsNewInSilverlight4 - 图文.doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印
本文链接:https://www.diyifanwen.net/c602t91zwnm4bptb10m3c_2.html(转载请注明文章来源)
热门推荐
Copyright © 2012-2023 第一范文网 版权所有 免责声明 | 联系我们
声明 :本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
客服QQ:xxxxxx 邮箱:xxxxxx@qq.com
渝ICP备2023013149号
Top