Introdução silver light
Introducing Microsoft Silverlight 3 Laurence Moroney PUBLISHED BY Microsoft Press A Division of Microso One Microsoft Way Redmond, Washingto Introdução silver light Premium 3 Wookie123 anpenR 09, 2012 2g2 pages Based on Silverlight 3 Beta—Updates Online Swipe to r. t page 1 or292 Copyright 0 2009 by Laurence Moroney All rights reserved. No part of the contents of this book may be reproduced or transmitted in any form or by any means without the written permission of the publisher. Library of Congress Control Number: 2009929278 Printed and bound in the United States of America. 123456789 QM432109
Distributed in Canada by H. B. Fenn and Company Ltd. A CIP catalogue record for this book is available from the British Library. Microsoft Press books are available through booksellers and distributors worldwide. For further information about international editions, contact your local Microsoft Corporation office or contact Microsoft Press International directly at fax (425) 936-7329. Visit our Web site at www. microsoft. com/ and events depicted herein are fictitious. No association with any real company, organization, product, domain name, e-mail address, logo, person, place, or event is intended or should be nferred.
This book expresses the authors views and opinions. The information contained in this book is provided without any express, statutory, or implied warranties. Neither the authors, Microsoft Corporation, nor its resellers, or distributors Will be held liable for any damages caused or alleged to be caused either directly or indirectly by this book. Acquisitions Editor: Ben Ryan Developmental Editor: Devon Musgrave Project Editor: Rosemary Caperton Editorial Production: Waypoint Press Technical Reviewer: Per Blomqvist. Technical Review services provided by Content Master, a member of CM Group, Ltd.
Cover: Tom Draper Design Body Part No. XI 5-8861 It’s always hard to know What to say when dedicating a book. You have few words to speak about something that has a huge meaning. So Will use the words that mean the most to the people that mean the most to me: my wife Rebecca and my children Claudia and Christopher. dedicate this book to you to thank you for being you. I also want to thank the One who makes it all posslble: the God of Abraham, Isaac, jacob, and Jesus, for giving us life, love, happiness, and hope. Contents at a Glance PAGF 7 OF Silverlight . 55 4 Silverlight XAML Basics 311 77 XAML Transformation and Anmation — . 11 6 The Silverlight Browser Object Part II Programming Silverlight 3 with -NET 7 The Silverlight Browser Bridge . 179 8 Silverlight Core Controls . 9 Silverlight Controls: Advanced Controls 221 10 Media in Silverlight: Video 11 Media in Silverlight: Rich Imaging . 267 145 199 237 12 Building Connected Applications with Silverlight 287 13 Styles and Templates in Silve n i gm — 14 Data Binding with Silverlight 15 Using Dynamic Languages in Silverlight . 333 Table of Contents Acknowledgments . Introduction PAGF 3 OF 321 Silverlight and User Experience — Silverlight Architecture.. Silveriight and XAML — 8 Silverlight and Expression Studio . 12 Design . Blend 15 Encoder 19 Summary 22 2 Using Expression Blend with 25 Getting Started with Expression Blend . Creating a Silverlight Application…. . • 26 The Expression Blend IDE . 31 The TOOIS pane 31 The Objects And Timeline Pane • 32 32 The Design Surface The projects The Properties Using Expression Blend to Build Silverlight Applications — 37 Layout . 38 46 33 34 35 placlng and Customizing Visual Elements Placing and Customizing Controls Using Expression Blend to Design Animations……………
Using SketchFlow . 49 53 44 45 What do you think of this book? We want to hear from you! Microsoft is interested in hearing your feedback so we can continually improve our books and learning resources for you. To participate in a brief online survey, please visit: www. microsoft. com/learning/booksurvey PAGF s OF agi Using Visual Studio to Build a Silverlight Application 57 Creating a Silve light Application in Visual Studio 2008 57 Project Code…. The Silverlight Control The Web Project „ — 66 Building a Silverlight Creating the Ul in Writing the Game 76 4 Silveriight XAML Basics .
XAML positioning Properties XAML arushes 79 SolidColorBrush LinearGradientBrush RadialGradientBrush PAGF 6 OF • 60 67 .. 68 68 83 Using ImageBrush 88 VideoBrush . 90 XAML Visual Properties 91 Using XAML Dimension and Position USIng Opacity Cursor 92 Controlling Stroke . Shapes in XAM 97 Using the Ellipse Using the Rectangle Using the Line Using Paths and Geometries . Using the GeometryGroup The path Language 107 • 92 . 98 98 . 106 XAML . 109 XAML Transformation and Animation . Transformations Rotating with the RotateTransform Property 117 108 Scaling with the ScaleTransform 112 . 13 Moving an Object with the TranslateTransform 16 Skewing an Object with the SkewTransform property Simulating 3-D Perspective with SkewTransform. Defining Your Own Transforms with MatrixTransform Combining 3-D Effects Using the Perspective Transform . Animation 122 . 118 1 19 120 Using Triggers and Event Triggers Usine BeeinStorvboard an 121 PAGF 8 OF agi Animation and Expression Blenda….. 141 Summary _ 143 5 The Silverlight Browser Object — 145 Hosting Silverlight in the Browser — Responding to Page Coad Events „ Responding to Page Error Events . The Default Event Using Your Own Error Handler . Silverlight Control Methods .
The Downloader Using the Object Model to Build an Install 156 Experience — — Experience Programming the Install IJser 132 135 . 143 . 147 — 147 148 150 — 152 153 157 Exploring the Finished Page with Install UX PAGF agi Exploring the Finished Page with Install . 167 Running Silverlight Applications Out of the Browser • 171 Summao,’ 176 7 Programming Silverlight 3 with . NET Application 179 181 Together 183 Bridge Creating the Base Creating the Data Creating the Data in Rendering the Data with an ItemsControl . Putting It All Controlling the Application with JavaScript . Editing the Hosting page PAGF . 179 180 182