ebook img

MCTS: Microsoft Silverlight 4 Development (70-506) Certification Guide PDF

291 Pages·2012·7.296 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview MCTS: Microsoft Silverlight 4 Development (70-506) Certification Guide

www.it-ebooks.info MCTS: Microsoft Silverlight 4 Development (70-506) Certification Guide A compact certification guide to help you prepare for, and pass, the (70-506): TS: Microsoft Silverlight 4, Development exam Johnny Tordgeman BIRMINGHAM - MUMBAI www.it-ebooks.info MCTS: Microsoft Silverlight 4 Development (70-506) Certification Guide Copyright © 2012 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. Every effort 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, either express or implied. Neither the author, nor Packt 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: June 2012 Production Reference: 1180612 Published by Packt Publishing Ltd. Livery Place 35 Livery Street Birmingham B3 2PB, UK. ISBN 978-1-84968-466-8 www.packtpub.com Cover Image by Artie Ng ([email protected]) www.it-ebooks.info Credits Author Project Coordinator Johnny Tordgeman Vishal Bodwani Reviewers Proofreader Kunal Chowdhury Linda Morris Evan Hutnick Indexer Rekha Nair Acquisition Editor Kerry George Production Coordinator Melwyn D'sa Development Editor Susmita Panda Cover Work Melwyn D'sa Technical Editor Devdutt Kulkarni www.it-ebooks.info About the Author Johnny Tordgeman is a professional SharePoint, FAST, and frontend developer and trainer, who has over six years of experience in the development of web applications. Johnny serves as the CTO at E4D Solutions where he specializes in building enterprise applications based on SharePoint and Silverlight, for the telecom, financial, and government industries. Johnny is a frequent speaker at user groups and conferences on SharePoint and client-side technologies. First, I would like to thank everyone at Packt Publishing, and especially Vishal Bodwani, for making this book a reality. Secondly, I would like to dedicate this book to my amazing wife Ayelet , my dear parents Itzik and Varda, my brothers Shirley and Yuval, and my friends Yossi, Idan, Leon, Niv, Itzik, Tal, and Zvi for believing in me in every step of the way.. Last, but not least, I would like to thank my academic mentor, Dr. Amnon Dekel, for giving me the confidence to know that even when things go wrong, someone is there for you. www.it-ebooks.info About the Reviewers Kunal Chowdhury is a Microsoft MVP (Silverlight), Telerik MVP, Codeproject MVP, and Mentor, and also a frequent speaker at various Microsoft events. Apart from being an author and passionate blogger, he is a software engineer by profession. He is very passionate about Silverlight, WP7, WPF, Windows 8 Metro UI, and LightSwitch. Kunal shares his findings at his technical blog—http://www. kunal-chowdhury.com/. He has also worked as a technical reviewer for the book, Fun with Silverlight 4. He is the owner of http://www.silverlight-zone.com/. If you wish, you can follow him on Twitter (@kunal2383), or you can connect with him on his Facebook page—facebook.com/blog.kunal2383. Evan Hutnick works as a Developer Evangelist and Solutions Consultant for Telerik, empowering customers to make the most out of the XAML platforms, as well as offering best practices, mentoring, and custom development services. Evan has previously provided a technical review for the Silverlight 5 Data and Services Cookbook, and also hosts a brand new XAML-based site named http://xamlwatch.com/, designed to deliver fresh and interesting content covering all of the XAML platforms. Last, but certainly not least, I would like to thank my wonderful wife and daughter, for supporting me in my development pursuits, and allowing me to geek it up on nights and weekends. www.it-ebooks.info www.PacktPub.com Support files, eBooks, discount offers and more You might want to visit www.PacktPub.com for support files and downloads related to your book. Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at [email protected] for more details. At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks. http://PacktLib.PacktPub.com Do you need instant solutions to your IT 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 If you have an account with Packt at www.PacktPub.com, you can use this to access PacktLib today and view nine entirely free books. Simply use your login credentials for immediate access. Instant Updates on New Packt Books Get notified! Find out when new books are published by following @PacktEnterprise on Twitter, or the Packt Enterprise Facebook page. www.it-ebooks.info Table of Contents Preface 1 Chapter 1: Overview of Silverlight 5 What is Microsoft Silverlight 5 Setting up your development environment 8 Introducing XAML 8 Content controls 10 Namespaces 11 Naming your objects 12 Setting properties 13 The Silverlight application model 13 Integrating Silverlight with HTML 16 Using the object tag 17 Using the JavaScript helper files 19 In and out-of-browser support 20 Summary 22 Chapter 2: Laying out Our User Interface 23 Arranging content with panels 23 Creating your first Silverlight application 24 Grid 26 StackPanel 33 Canvas 34 Border 36 ScrollViewer 37 ViewBox 38 Controlling the visibility 39 Using core and content controls 40 Using core controls 40 TextBox 40 TextBlock 41 Buttons 42 www.it-ebooks.info Table of Contents Using content controls 46 Creating user controls 48 Creating your first user control 48 The navigation framework 52 Adding new pages 53 Navigation events 54 NavigationService 55 The UriMapper class 57 The journal 58 Implementing caching 59 Displaying a collection of items 59 ItemsControl 60 ListBox 60 ComboBox 61 TreeView 62 DataGrid 64 Displaying data in DataGrid 65 DataGrid templating 66 Sorting 67 Playing media files 68 The MediaElement control 68 Digital Rights Management 69 Working with audio files 70 AudioStreamCount and AudioStreamIndex 70 Balance 70 Volume 70 IsMuted 71 Displaying closed captioning 71 Test your knowledge 73 Summary 76 Chapter 3: Enhancing the User Interface 77 Creating or modifying the control styles 77 Styling at the element level 78 Styling at the page level 80 Explicit styling 80 Implicit styling 83 BasedOn styling 84 Styling at the global level 85 Styles hierarchy 86 Creating control templates 87 TemplateBinding 88 Showing the content 89 [ ii ] www.it-ebooks.info Table of Contents The ContentPresenter element 89 The ItemPresenter element 90 Attaching the style 91 Creating or modifying data templates 92 Creating your first data template 92 DataForm templates 94 Using UserControl as a data template 97 Manipulating visuals 98 Getting ready 98 Skew transform 99 Rotate transform 100 Scale transform 101 Translate transform 102 Perspective transforms 103 Grouping transformations together 104 Pixel shaders 105 Animating visuals 107 Creating storyboards 108 Controlling the storyboard 110 Repeating and reversing storyboards 110 Implementing easing functions 111 Configuring bitmap caching 112 Implementing behaviors 113 Triggering storyboards by using behaviors 113 Creating your own behavior 115 Managing the visual state 117 Test your knowledge 120 Summary 123 Chapter 4: Implementing Application Logic 125 Handling events 125 Adding events 126 Handling routed events 127 The AddHandler method 130 Consuming services asynchronously 131 Adding your first service reference 131 Configuring service endpoint 134 Handling timeouts 136 Cross-domain networking 136 Working with background threads 137 Spawning a background thread to execute code 137 Creating your first BackgroundWorker 138 [ iii ] www.it-ebooks.info

See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.