Instant Silverlight 5 Animation

所需积分/C币:10 2016-05-16 17:58:06 3.7MB PDF

Instant Silverlight 5 Animation
Instant Silverlight 5 Animation Copyright o 2013 Packt Publishing All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews rt has been made in the preparation of this book to ensure the accuracy of the information presented However the information contained in this book is sold without warranty, cither express or implied. Neither the author nor Pacl Publishing and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals However, Packt Publishing cannot guarantee the accuracy of this information First published January 2013 Production reference: 1160113 Published by Packt Publishing ltd Livery place 35 Livery street Birmingham b3 2PB UK ISBN978-1-84968-714-0 Credits Author Proofreader Nick Polyak Bernadette Watkins Reviewer Indexer Thomas martinsen Rekha nair Acquisition Editor Graphics Rukhsana khambatta Sheetal Aute Commissioning editor Production coordinator Meeta rajal Melwyn D's Technical editor Cover work Jalasha d'costa Melwyn D'sa Project Coordinator Cover Image Shraddha bagadia Sheetal aute Esha thakker About the author ick Polyak is a technology enthusiast who enjoys building software and learning new technologies. For the past six years, Nick worked primarily on Silverlight/WPF projects, and prior to that he worked with C++ and Java. Nick is looking forward to harnessing the new capabilities coming with IItML5 and modern JavaScript libraries Nick got his Ph D. from Rensselaer Polytechnic Institute in 1998. He did his research in Wavelet based image processing and published a number of papers on the subject More recently Nick published several articles on codeproject. com some of which (a Prism tutorial and an article on MVvM) became quite popular Nick is the owner of the AWebPros com consulting company I would like to thank my wife and children for being patient with me while i worked on this book About the reviewer Thomas martinsen is a passionate developer with a focus on windows development. Thomas is a regular speaker at customer-oriented and developer-oriented events having worked as a consultant for more than 10 years Thomas is a partner in Bluefragments, a company with a focus on the newest Microsoft technologies. Bluefragments is among the best Windows developers in Denmark and has recently built a series of Windows 8 apps for the Windows Store For three years now, Thomas been awarded Microsoft MVP Support files, eBookS, discount offers and more Youmightwanttovisitwww.packtpub.comforsupportfilesanddownloadsrelatedtoyourbook Did you know that Packt offers e book versions of every book published, with PDF and ePub files available?YoucanupgradetotheeboOkversionatwww.Packtpub.camandasaprintbook customer, you are entitled to a discount on the ebook copy. Get in touch with us at service@ packtpub. com for more details Atwww.packtpub.comyoucanalsoreadacollectionoffreetechnicalarticlessignupforarange of free newsletters and receive exclusive discounts and offers on packt books and ebooks PIPACKTLIB° Do you need instant solutions to your If questions? PacktLib is Packt's online digital book library. Here you can access, read and search across packt's entire library of books Why Subscribe? Fully searchable across every book published by packt Copy and paste, print and bookmark content On demand and accessible via web browser Free Access for packt account holders Ifyouhaveanaccountwithpacktatwww.Packtpub.comyoucanusethistoaccessPacktlib today and view ninc entirely free books Simply usc your login credentials for immediate access Instant Updates on New Packt Books Get notified Find out when new books are published by following aPacktEnterprise on Twitter, or the Packt Enterprise Facebook page Table of contents Preface Chapter 1: Building Blocks of Animation Spinning control sample Defining a dependency property in C# code 7780 Defining visual presentation for spinning control Bindings 13 Transforms 13 Storyboards and animations 14 Adding a rotation animation to our code 14 a brief overview of different Silverlight animation classes 17 Attached properties 18 Summary 20 Chapter 2: Animations in Business Logic Silverlight Applications 21 Animating silverlight controls 21 Tools for animating controls 21 Animating a built-in button 22 Creating and animating custom button control 28 Animating navigation panels 29 Summary Chapter 3: Creating AnimatedTextures 41 Background on Perlin noise 41 A bit of history 41 Perlin noise algorithm 41 Multi-scale perlin noise Basic Perlin noise Perlin noise algorithm implementation 44 Image Processing Library 46 Table of contents Cloud simulation 47 Fire simulation 50 Summary 56 Chapter 4: 3D Animations in Silverlight 57 Perspective transform 57 Silverlight 5 three-dimensional functionality 60 3D models 60 Vertex and pixel shaders 60 Compiling pixel shaders 61 Enabling your Visual Studio 2010 SP1 or Visual Studio 2012 to create and compile shaders 62 Creating the moving triangle application The moving prism application The 3D related topics that were left out 76 Summary 76 Chapter 5: Building an Animated Banner 77 What we aim to build The globe image 78 Perspective transform 78 Code description 78 Referring to the globe image within an XAMl file 78 Creating rotating lines of text Animation storyboard 83 Placing the Silverlight banner within an HTML file 85 Summary 86 Appendix A: Creating and starting a Silverlight project 87 Appendix B: Changing the XAML formatting 89 Appendix C: Installing snippets AppendiX D: Using snippets 93 Index 95 Preface What is silverlight Silverlight is a relatively new technology introduced by Microsoft in order to enable the developers to build multi-platform client GUI applications that can run within or outside of internet browsers Why should I use Silverlight Silverlight empowers developers with great new GUI capabilities, combined with revolutionary GUI coding concepts that came to Silverlight from WPF. While some think that html 5 gives the developers functionality that is almost as powerfu as Silverlight, the programming model of HTML 5 is indisputably old, while the Silverlight/WPF programming model is ahead of that of any competing software Unlike the currently available versions of hTml, silverlight is 98 percent multi-platform (between Windows and Macs) and its list of non multi-platform features is freely available. As long as you avoid using those features, any application you build for Windows is guaranteed to run on Mac Silverlight is close to being 100 percent multi-browser(if there are any features that do not perform the same on different browsers, I am not aware of them) and any application you write using Internet Explorer is guaranteed to run within Firefox on the same platform, while this might not be the case with HTML Silverlight has a very small footprint -in order to make silverlight 5 run on your machine you need to download and install only a 6 mb package


关注 私信 TA的资源