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

Implementing data validation


In a perfect world, every user that uses our forms would enter the exact right data at the right places. In such a world, data validation would be useless. We aren't living in such world, and so data validation is a concept no form can go without. Whenever you are interacting with the user, you want to make sure that he inputs what you expect him to input and nothing else. Silverlight 4 introduced two new interfaces for validation—IDataErrorInfo and INotifyDataErrorInfo. These two interfaces join the other approach of data validation in Silverlight known as the data binding exception approach, which includes the NotifyOnValidationError, ValidatesOnExceptions, ValidatesOnDataErrors, and ValidatesOnNotifyDataErrors objects.

Throughout this topic, we are going to work with a sole project—Chapter5-DataValidation. The project contains a simple grid with a few text boxes that we will validate using the various data validation approaches in Silverlight. If you build...