Book Image

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

By : Johnny Tordgeman
Book Image

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

By: Johnny Tordgeman

Overview of this book

Microsoft Silverlight is a powerful development platform for creating engaging, interactive applications for many screens across the Web, desktop, and mobile devices. Silverlight is also a great (and growing) Line-Of-Business platform and is increasingly being used to build data-driven business applications. Silverlight is based on familiar .NET languages such as C# which enables existing .NET developers to get started developing rich internet applications almost immediately. "MCTS: Microsoft Silverlight 4 Development (70-506) Certification Guide" will show you how to prepare for and pass the (70-506): TS: Microsoft Silverlight 4 Development exam.Packed with practical examples and Q&As, MCTS: Microsoft Silverlight 4 Development (70-506) Certification Guide starts by showing you how to lay out a user interface, enhance the user interface, implement application logic, work with data and interact with a host platform amongst others.
Table of Contents (15 chapters)
MCTS: Microsoft Silverlight 4 Development (70-506) Certification Guide
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface

Reading from and writing to the host filesystem


The new I/O dialog boxes in Silverlight allow our application to store and read files from outside of the isolated storage area, which we have discussed earlier.

To open a file in Silverlight, we use the OpenFileDialog class, which enables us to ask the user for one or more files from his system and load the data from these files to the memory. The OpenFileDialog class exposes the following three properties for customizing the selections presented to the user when the dialog box is launched:

  • Filter: This enables us to filter which type or types of files the user can select from this dialog box.

  • FilterIndex: If you allow the user to select from multiple file formats, setting this property will determine which filter is the default one.

  • MultiSelect: This is a Boolean property, which specifies whether the user can select a single file or multiple files. If not set, the default behavior of the dialog box is to allow the user to select a single...