Professional Silverlight 4 docx

842 546 0
Professional Silverlight 4 docx

Đ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

www.it-ebooks.info www.it-ebooks.info PROFESSIONAL SILVERLIGHT ® 4 INTRODUCTION xxv CHAPTER 1 Introduction to Silverlight 1 CHAPTER 2 Building Applications with Visual Studio . . . . . . . . . . . . . . . . . . . . . . . . . .31 CHAPTER 3 Building Applications with Expression Blend 4 . . . . . . . . . . . . . . . . . . . . 63 CHAPTER 4 Working with the Navigation Framework . . . . . . . . . . . . . . . . . . . . . . . . . 93 CHAPTER 5 Controlling Layout with Panels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117 CHAPTER 6 Working with Visual Controls 139 CHAPTER 7 Accessing Data 205 CHAPTER 8 WCF RIA Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257 CHAPTER 9 Out-of-Browser Experiences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281 CHAPTER 10 Networking Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 301 CHAPTER 11 Building Line of Business Applications . . . . . . . . . . . . . . . . . . . . . . . . . . 337 CHAPTER 12 Application Architecture 375 CHAPTER 13 DOM Interaction 429 CHAPTER 14 Securing Your Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 449 CHAPTER 15 Accessing Audio and Video Devices 479 CHAPTER 16 Working with File I/O 497 CHAPTER 17 Using Graphics and Visuals 541 CHAPTER 18 Working with Animations in Silverlight 591 CHAPTER 19 Working with Text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 613 CHAPTER 20 Making It Richer with Media 641 CHAPTER 21 Styling and Themes 681 APPENDIX A XAML Primer 723 APPENDIX B Testing Silverlight Applications 741 APPENDIX C Building Facebook Applications with Silverlight . . . . . . . . . . . . . . . . . . 757 APPENDIX D Integrating Silverlight into SharePoint 2010 . . . . . . . . . . . . . . . . . . . . . . 775 APPENDIX E Silverlight Control Assemblies 783 INDEX 787 www.it-ebooks.info www.it-ebooks.info PROFESSIONAL Silverlight ® 4 Jason Beres Bill Evjen Devin Rader www.it-ebooks.info Professional Silverlight® 4 Published by Wiley Publishing, Inc. 10475 Crosspoint Boulevard Indianapolis, IN 46256 www.wiley.com Copyright © 2010 by Wiley Publishing, Inc., Indianapolis, Indiana Published simultaneously in Canada ISBN: 978-0-470-65092-9 Manufactured in the United States of America 10 9 8 7 6 5 4 3 2 1 No part of this publication may be reproduced, stored in a retrieval system or transmitted in any form or by any means, electronic, mechanical, photocopying, recording, scanning or otherwise, except as permitted under Sections 107 or 108 of the 1976 United States Copyright Act, without either the prior written permission of the Publisher, or authorization through payment of the appropriate per-copy fee to the Copyright Clearance Center, 222 Rosewood Drive, Danvers, MA 01923, (978) 750-8400, fax (978) 646-8600. Requests to the Publisher for permission should be addressed to the Permissions Department, John Wiley & Sons, Inc., 111 River Street, Hoboken, NJ 07030, (201) 748-6011, fax (201) 748-6008, or online at http://www.wiley.com/go/permissions. Limit of Liability/Disclaimer of Warranty: The publisher and the author make no representations or warranties with respect to the accuracy or completeness of the contents of this work and specifically disclaim all warranties, including without limitation warranties of fitness for a particular purpose. No warranty may be created or extended by sales or promotional materials. The advice and strategies contained herein may not be suitable for every situation. This work is sold with the understanding that the publisher is not engaged in rendering legal, accounting, or other professional services. If professional assistance is required, the services of a competent professional person should be sought. Neither the publisher nor the author shall be liable for damages arising herefrom. The fact that an organization or Web site is referred to in this work as a citation and/or a potential source of further information does not mean that the author or the publisher endorses the information the organization or Web site may provide or recommendations it may make. Further, readers should be aware that Internet Web sites listed in this work may have changed or disappeared between when this work was written and when it is read. For general information on our other products and services please contact our Customer Care Department within the United States at (877) 762-2974, outside the United States at (317) 572-3993 or fax (317) 572-4002. Wiley also publishes its books in a variety of electronic formats. Some content that appears in print may not be available in electronic books. Library of Congress Control Number: 2010930723 Trademarks: Wiley, the Wiley logo, Wrox, the Wrox logo, Wrox Programmer to Programmer, and related trade dress are trademarks or registered trademarks of John Wiley & Sons, Inc. and/or its affiliates, in the United States and other countries, and may not be used without written permission. Silverlight is a registered trademark of Microsoft Corporation in the United States and/or other countries. All other trademarks are the property of their respective owners. Wiley Publishing, Inc., is not associated with any product or vendor mentioned in this book. www.it-ebooks.info To my beautiful wife Sheri and our amazing 4-year-old daughter Siena for supporting me during the late nights and weekends that it took to get this book completed. — Jason Beres To George — glad you made it to the developer ranks, brother! — Bill Evjen To Mom and Dad, thanks for everything! — Devin Rader www.it-ebooks.info www.it-ebooks.info ABOUT THE AUTHORS JASON BERES is the Vice President of Product Management, Community, and Evangelism, and spearheads customer-driven, innovative features and functionality throughout all of Infragistics’ products. Jason is a Microsoft .NET MVP for 8 years running, a member of the INETA Speakers Bureau, and is the author of 7 books on various .NET technologies, the latest being this one, Professional Silverlight 4 from Wrox Press. BILL EVJEN is an active proponent of .NET technologies and community-based learning initiatives for .NET. He has been actively involved with .NET since the first bits were released in 2000. In the same year, Bill founded the St. Louis .NET User Group ( www.stlnet.org), one of the world’s first such groups. Bill is also the founder and former executive director of the International .NET Association ( www.ineta.org), which represents more than 500,000 members worldwide. Based in St. Louis, Missouri, Bill is an acclaimed author and speaker on ASP.NET and Services. He has authored or coauthored more than 20 books including Professional C# 4 and .NET 4, Professional ASP.NET 4 in VB and C#, ASP.NET Professional Secrets, XML Web Services for ASP.NET, and Web Services Enhancements: Understanding the WSE for Enterprise Applications (all published by Wiley). In addi- tion to writing, Bill is a speaker at numerous conferences, including DevConnections, VSLive!, and TechEd. Along with these items, Bill works closely with Microsoft as a Microsoft Regional Director and an MVP. Bill is the Global Head of Platform Architecture for Thomson Reuters, Lipper, the international news and financial services company ( www.thomsonreuters.com). He graduated from Western Washington University in Bellingham, Washington. When he isn’t tinkering on the computer, he can usually be found in his summer house in Toivakka, Finland. You can reach Bill on Twitter at @billevjen. DEVIN RADER works at Infragistics where he focuses on delivering great user experi- ences to developers using their controls. He’s done work on all of the .NET platforms, but most recently has been focused on ASP.NET and Silverlight. As a co-founder of the St. Louis .NET User Group, a current board member of the Central New Jersey .NET User Group, and a former INETA board member, he’s an active supporter of the .NET developer community. He’s also the co-author or technical editor of numerous books on .NET including Silverlight 3 Programmer’s Reference and Professional ASP.NET 4 in C# and VB from Wrox. Follow Devin on Twitter @devinrader. www.it-ebooks.info ABOUT THE CONTRIBUTORS SHAWN ANDERSON is currently a senior solutions architect with Infragistics and spends much of his time working on designing and developing business solutions and new product lines that utilize cut- ting edge technology in combination with the latest Infragistics suites and tools. He has a passion for all things technical and has been designing and developing large scale business systems across multiple platforms for over 15 years. GRANT HINKSON serves as a bridge between design and development in Microsoft’s Entertainment Experience Group as an Experience Developer, focused on the Zune PC Client. Grant has a history of uniting design and development and has pioneered integrated workflows across multi-discipline teams. He is an advocate for iterative design and rapid prototyping and believes Silverlight is an enabling tech- nology that supports those processes. Before joining Microsoft, Grant founded and grew the Experience Design Group at Infragistics. He has been honored as a Microsoft Expression MVP and has spoken at Microsoft Mix, Microsoft ReMix, Adobe MAX, and Devscovery. Grant is a contributing author on the Wrox titles Silverlight 1.0, Silverlight 3 Programmer’s Reference, and the Friends of Ed title Foundation Fireworks CS4. He has authored a number of utilities for the designer/developer community, notably the Fireworks to XAML exporter. You can find Grant’s latest creations at www.granthinkson.com. DAVID KELLEY has been building targeted customer experiences primarily on the web and offline for over 10 years. David’s main focus is on integrating technology into environments, ranging from using sensors to touch screens and Silverlight. David is currently the Principal User eXperience Architect for Wirestone and publishes a blog “Hacking Silverlight” as well as posts related to UX for Interact Seattle. Currently his main focus is in the retail space with touch experiences such as digital price tags and Silverlight-based kiosks. David’s other career highlights include the Silverlight Bill Gates demo at TechEd ‘08, the Entertainment Tonight Emmy Award site for the Silverlight launch, and achievement of a Silverlight MVP in 2009, as well as his work with Wirestone. In his spare time David helps run Interact (Seattle’s Designer Developer Interaction Group and the Seattle Silverlight User Group), travels, plays with his kids, Legos, and more. MIHAIL MATEEV is a senior software development engineer with Infragistics, Inc. He worked as a software developer and team lead on WPF and Silverlight Line of Business production lines of the company and now works as a Technical Evangelist. Over the past 10 years, he has written articles for Bulgarian ComputerWorld magazine as well as blogs about .NET technologies. Prior to Infragistics, he worked at ESRI Bulgaria as a software developer and a trainer. For several years Mihail has delivered lectures about geographic information systems for the Sofia University “St. Kliment Ohridski” Faculty of Mathematics and Informatics. Mihail is also a lecturer on computer systems for the University of the Architecture, Civil Engineering and Geodesy in Sofia, Bulgaria, in the Computer Aided Engineering Department. Mihail holds master’s degrees in Structural Engineering and Applied Mathematics and Informatics. www.it-ebooks.info [...]... enableNavigation allowHtmlPopupWindow Plug-In API 375 376 377 390 395 396 396 41 1 42 4 42 7 42 8 42 9 42 9 43 2 43 3 43 6 43 7 43 7 43 7 43 7 43 7 43 8 Creating Interaction between Silverlight and JavaScript JavaScript API HTML Bridge 43 8 43 9 44 1 Summary 44 6 Chapter 14: Securing Your Applications 44 9 Taking Advantage of ASP.NET 45 0 Forms-Based Authentication 45 0 xviii www.it-ebooks.info CONTENTS Windows-Based Authentication... Membership on the Client Working with Role Management on the Server Summary 45 5 46 0 46 1 46 1 46 8 47 0 47 7 Chapter 15: Accessing Audio and Video Devices Configuring Permissions Accessing Audio and Video Devices Capturing Images from a Video Feed Saving Images to the Filesystem Capturing an Audio Stream Summary 47 9 47 9 48 1 48 8 49 2 49 4 49 5 Chapter 16: Working with File I/O The OpenFileDialog and SaveFileDialog... Settings Buffering Detecting Download Progress Detecting Playback Quality Controlling Playback Responding to Video Markers Handling Failed Media Responding to State Changes Media Playlists 641 641 643 643 644 644 645 649 649 651 652 653 655 656 657 658 658 660 660 661 663 665 666 667 Server-Side Playlist (SSPL) Files Advanced Stream Redirector (ASX) Files Encoding Media with Expression Encoder Smooth Streaming... CONTENTS Chapter 17: Using Graphics and Visuals The Basics 541 541 Working with Rectangles and Borders Applying Rounded Corners Using the Ellipse Using the Path Using Geometries Using Clipping/Masking Elements Expression Blend Shapes Binding to Shape Properties 542 542 545 545 548 550 552 5 54 Images and Media 5 54 Displaying Images Displaying Media 5 54 559 Brushes 560 Painting with Solids Painting with Linear... Panels Silverlight Plug-In Sizing Summary 133 137 138 Chapter 6: Working with Visual Controls Where to Find Controls Using Text Display Controls 139 140 142 TextBlock Label 142 143 Using Input Editor Controls 144 Text Using Numeric Editor Controls Dates and Time Using Lists and Items Controls DataGrid DataForm ListBox, ComboBox, and TabControl DataPager Accordion TreeView Using Button Controls 144 147 ... Summary 1 2 5 6 8 11 12 12 13 14 15 18 20 21 22 22 23 23 24 25 26 27 27 27 28 29 Chapter 2: Building Applications with Visual Studio Creating a Basic Silverlight Application Using Silverlight Designer for Visual Studio Creating Silverlight Project and Web Application Project Files Using the Silverlight Design Surface Understanding the XAP File www.it-ebooks.info 31 31 35 40 41 47 CONTENTS Caching Assemblies... Introduction xxv Chapter 1: Introduction to Silverlight What Is Silverlight? Silverlight Versions Explained Application Development Scenarios Getting the Silverlight Plug-In Getting the Silverlight SDK Building Silverlight Applications Silverlight 4 Tour XAML NET Framework Support Graphics and Animations Page Layout and Design User Interface Controls Using Media in Silverlight Local Data Storage Out-of-Browser... Client Summary 3 24 328 332 336 Chapter 11: Building Line of Business Applications Line of Business Basics 337 337 Responding to Mouse Actions Enabling Right-Click Support Handling Multi-Touch Drawing with Ink Enabling Clipboard Access Adding Printing Support Supporting Drag-and-Drop Using the Web Browser Control Advanced Scenarios 338 340 342 343 345 347 349 350 351 Communicating between Silverlight Applications... Applications with Silverlight Creating a New Application on Facebook Using the Facebook Developer Toolkit Adding the Facebook Connect Components Using an Asynchronous API Request Adding Features from the Facebook API Summary 741 741 743 748 751 755 755 757 757 760 760 7 64 767 773 Appendix D: Integrating Silverlight into SharePoint 2010 775 The Sample Application Using the SharePoint Foundation 2010 Silverlight. .. and Wrox booParks To read the FAQs, click the FAQ link on any P2P page xxx www.it-ebooks.info 1 introduction to silverlight what’s in this chapter? ➤➤ Overviewing Silverlight ➤➤ Getting the Silverlight Plug-In and SDK ➤➤ Taking a Silverlight 4 Tour Silverlight 4, the fourth iteration of the Silverlight platform, continues to deliver on the promise of Adobe Flash–like and Flex-like rich Internet applications . between Silverlight and JavaScript 43 8 JavaScript API 43 9 HTML Bridge 44 1 Summary 44 6 SECURING YOUR APPLICATIONS 44 CHAPTER 14: 9 Taking Advantage of ASP.NET 45 0 Forms-Based. Strategy 42 4 Handling Performance 42 7 Summary 42 8 DOM INTERACTION 42 CHAPTER 13: 9 Configuring the Silverlight Plug-In 42 9 windowless 43 2 splashScreenSource 43 3 initParams

Ngày đăng: 15/03/2014, 10:20

Từ khóa liên quan

Mục lục

  • Professional Silverlight 4

    • About the Authors

    • About the Contributors

    • About the Technical Editors

    • Credits

    • Acknowledgments

    • Contents

    • Introduction

      • Who This Book Is For

      • What This Book Covers

      • What You Need to Use This Book

      • Conventions

      • Source Code

      • Errata

      • p2p.wrox.com

      • Chapter 1: Introduction to Silverlight

        • What Is Silverlight?

        • Silverlight Versions Explained

        • Application Development Scenarios

        • Getting the Silverlight Plug-In

        • Getting the Silverlight SDK

        • Building Silverlight Applications

        • Silverlight 4 Tour

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

Tài liệu liên quan