Introducing silverlight 4

745 209 0
Introducing silverlight 4

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

This book provides you with fast-track coverage of all the most important elements of the Silverlight 4 technology ranging from XAML to standard controls, from dealing with media to networking, from testing to deployment. It also reveals features introduced with Silverlight 4 and offers guidance on how to best utilize them. The book concludes with a pair of fully worked sample applications for you to follow through, because nothing reinforces your understanding of how concepts fit together as much as looking at finished code.

this print for content only—size & color not accurate spine = 1.40625" 744 page count Ghoda Introducing Silverlight 4 The eXPeRT’s VOIce ® In sIlVeRlIghT Introducing Silverlight 4 cYAn MAgenTA YellOW BlAcK PAnTOne 123 c Ashish Ghoda Companion eBook Available Gear up fast to develop line of business rich internet applications using Silverlight 4 BOOKs fOR PROfessIOnAls BY PROfessIOnAls ® Ashish Ghoda, Author of Pro Silverlight for the Enterprise Accelerated Silverlight 3 US $39.99 Shelve in: .NET User level: Beginner–Intermediate www.apress.com SOURCE CODE ONLINE Companion eBook See last page for details on $10 eBook version ISBN 978-1-4302-2991-9 9 781430 229919 5 39 9 9 Introducing Silverlight 4 Dear Reader, Microsoft never stops revealing new, exciting, developer-friendly, and enterprise- level features and capabilities of their products. Microsoft’s commitment to the next-generation rich Internet technology platform and the relentless efforts of the Microsoft Silverlight team are clearly demonstrated in the recently released Silverlight 4 version. Silverlight 4 extends the core capabilities—data and media integration capa- bilities—and introduces some of the basic features of any line-of-business (LoB) application, such as printing, documents integration, reporting, rich offline capa- bilities (with the introduction of trusted out-of-browser applications), and local devices (e.g., web camera and microphone) integration. Tighter integration of Silverlight 4 with Visual Studio 2010 and .NET 4.0 and better integration of WCF RIA Services and data binding capabilities will certainly help the designer and develop- er communities to develop enterprise-level LoB applications supporting the agile development model. A long-awaited feature—Silverlight for mobile—is finally revealed in Silverlight 4. Silverlight 4 and Windows Mobile development tools enable development of inter- active Silverlight applications for the Windows 7 Mobile Phone series. Silverlight 4 for mobile, and official support of the Google Chrome browser, make Silverlight a truly cross-device and cross-platform technology platform. This is a great time to be a .NET developer, but even if you aren’t, you will find and learn that Silverlight has much to offer. This book is written for developers who have experience with .NET but may never have taken a look at Silverlight, or who already know Silverlight 3 and want to get familiar with Silverlight 4 features. The book contains everything you need to feel comfortable working with Silverlight, with several hands-on examples to show you Silverlight 4 in action. I encourage you to apply skills you’ve gained from this book to build Silverlight LoB applications and put them to work for your organization. Ashish Ghoda THE APRESS ROADMAP Pro Silverlight 4 in C# Introducing Silverlight 4 Beginning Silverlight 4 Introducing Silverlight 4                   Ashish Ghoda Introducing Silverlight 4 Copyright © 2010 by Ashish Ghoda All rights reserved. No part of this work may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, recording, or by any information storage or retrieval system, without the prior written permission of the copyright owner and the publisher. ISBN-13 (pbk): 978-1-4302-2991-9 ISBN-13 (electronic): 978-1-4302-2992-6 Printed and bound in the United States of America 9 8 7 6 5 4 3 2 1 Trademarked names, logos, and images may appear in this book. Rather than use a trademark symbol with every occurrence of a trademarked name, logo, or image we use the names, logos, and images only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark. The use in this publication of trade names, trademarks, service marks, and similar terms, even if they are not identified as such, is not to be taken as an expression of opinion as to whether or not they are subject to proprietary rights. President and Publisher: Paul Manning Lead Editor: Jonathan Hassell Technical Reviewer: Damien Foggon Editorial Board: Clay Andres, Steve Anglin, Mark Beckner, Ewan Buckingham, Gary Cornell, Jonathan Gennick, Jonathan Hassell, Michelle Lowman, Matthew Moodie, Duncan Parkes, Jeffrey Pepper, Frank Pohlmann, Douglas Pundick, Ben Renow-Clarke, Dominic Shakeshaft, Matt Wade, Tom Welsh Coordinating Editor: Laurin Becker Copy Editor: Mary Ann Fugate Compositor: Bytheway Publishing Services Indexer: BIM Indexing & Proofreading Services Artist: April Milne Cover Designer: Anna Ishchenko Distributed to the book trade worldwide by Springer Science+Business Media, LLC., 233 Spring Street, 6th Floor, New York, NY 10013. Phone 1-800-SPRINGER, fax (201) 348-4505, e-mail orders-ny@springer- sbm.com, or visit www.springeronline.com. For information on translations, please e-mail rights@apress.com, or visit www.apress.com. Apress and friends of ED books may be purchased in bulk for academic, corporate, or promotional use. eBook versions and licenses are also available for most titles. For more information, reference our Special Bulk Sales–eBook Licensing web page at www.apress.com/info/bulksales. The information in this book is distributed on an “as is” basis, without warranty. Although every precaution has been taken in the preparation of this work, neither the author(s) nor Apress shall have any liability to any person or entity with respect to any loss or damage caused or alleged to be caused directly or indirectly by the information contained in this work. The source code for this book is available to readers at www.apress.com. You will need to answer questions pertaining to this book in order to successfully download the code. I dedicate this book to my grandparents (Nayansukhray and Kumud Ghoda, Mahavir and Sarla Majmudar), parents (Jitendra and Varsha Ghoda), sister (Kruti Vaishnav), and lovely family (Pratixa, Gyan, and Anand Ghoda) whose blessings, sacrifice, continuous support, and encouragement enabled me to achieve the dream. —Ashish Ghoda  CONTENTS iv Contents  Contents . iv  About the Author . xvii  About the Technical Reviewer . xviii  Acknowledgments . xix  Introduction xx PART 1    Introduction to Silverlight .1  Chapter 1: Introducing Silverlight 3 Cross-Platform Frameworks 4 Qt 4 The Java Platform . 4 Adobe Flash/Flex/AIR 5 Microsoft ASP.NET AJAX 5 Microsoft Silverlight . 5 The History of Silverlight .6 Silverlight 1 6 Silverlight 2 7 Silverlight 3 9 Silverlight 4 11 Design and Development Tools for Silverlight .14 Visual Studio . 14 Expression Blend 15 SketchFlow . 15  CONTENTS v Expression Encoder 16 Deep Zoom Composer 16 Eclipse Tools for Silverlight (eclipse4SL) 16 Creating a Silverlight 4–based Application 16 Working with Expression Blend 19 Demonstrating Local Image Files Integration Using Drag-and-Drop Functionality 21 Summary .26  Chapter 2: Silverlight Concepts 27 Silverlight Architecture 27 Silverlight and XAML 29 Developing a Sample Application . 29 Namespaces . 33 Dependency Property System 34 Type Converters 39 Markup Extensions . 40 Microsoft .NET for Silverlight .48 Core .NET Assemblies for Silverlight Applications 48 Managed Code-Behind .NET Integration 49 Summary .56  Chapter 3: Silverlight User Interface Controls 57 Building Blocks 57 DependencyObject 58 Threading and the user interface . 59 UIElement . 59 FrameworkElement 63 The Control Class 66 Enhancements in Silverlight 4 .68  CONTENTS vi Layout Management and Grouping Controls .69 Canvas 69 StackPanel 70 Grid . 71 DockPanel . 74 WrapPanel 77 TabControl 78 ViewBox 80 Forms Controls 81 The Button Controls 81 TextBox . 85 PasswordBox 87 RichTextBox 88 AutoCompleteBox . 91 Data Integration and Data Manipulation Controls 95 ItemsControl . 96 ListBox 96 ComboBox 98 TreeView . 99 HeaderedItemsControl 102 ContentControl 103 HeaderedContentControl 103 DataGrid 104 DataForm 104 DataPager . 105 Label . 105 DescriptionViewer 105 ValidationSummary 106  CONTENTS vii Functional Controls 106 Border . 106 GridSplitter . 107 TextBlock 109 Popup . 111 ToolTipService 112 ScrollViewer . 113 The RangeBase Class . 115 Calendar and DatePicker 118 Image 121 MultiScaleImage . 121 MediaElement . 122 InkPresenter . 122 Dialog Boxes . 124 WebBrowser . 133 Navigation 134 Summary .137 PART 2    Content Integration in Silverlight Applications .139  Chapter 4: Media Integration 141 Media Integration Enhancements in Silverlight 4 141 Images .142 The Image Class . 142 Bitmap APIs 147 Silverlight Hardware Acceleration 152 Multi-scale Images and the Deep Zoom Feature 155 Media (Video and Audio) 162 Supported Media Format 163 Unsupported Media Format 164  CONTENTS viii The MediaElement Class 164 Timeline Markers 172 Web Camera and Microphone Integration 174 Windows Azure Platform–based Hosting and Media Delivery Services for Silverlight Applications .183 Subscribing to Windows Azure Platform Services 183 Publishing Silverlight Applications Video Content 183 Streaming Packaged Images and Media Files .184 Summary .184  Chapter 5: Network Communication .185 Networking Enhancements in Silverlight 4 185 Enabling Cross-Domain Communication .185 Cross-Domain Policy Files 186 Trusted Applications . 189 Network-Aware Applications .191 Consuming Web Services with WCF 191 Creating a WCF Service Consumable by Silverlight 192 XAML to Consume Information . 195 Invoking Services from Silverlight 196 Communicating Directly over HTTP 207 Communicating via Sockets 213 Controlling Client Access via a Socket Policy Server . 213 The System.Net Namespace 214 Building a Socket-Based Sample Text Chat Application 217 UDP Multicast 232 The UdpAnySourceMulticastClient Class 232 The UdpSingleSourceMulticastClient Class 234 . Pro Silverlight 4 in C# Introducing Silverlight 4 Beginning Silverlight 4 Introducing Silverlight 4                   Ashish Ghoda Introducing. accurate spine = 1 .40 625" 744 page count Ghoda Introducing Silverlight 4 The eXPeRT’s VOIce ® In sIlVeRlIghT Introducing Silverlight 4 cYAn MAgenTA YellOW

Ngày đăng: 28/12/2013, 01:20

Từ khóa liên quan

Tài liệu cùng người dùng

  • Đang cập nhật ...

Tài liệu liên quan