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
About the Author
About the Reviewers

Handling alternative input methods

Apart from support for the good old left mouse button, Silverlight 4 has added support for the right mouse click and mouse wheel as well. Up until Silverlight 4, whenever you tried to right-click on an application, you were getting the Silverlight options menu. With the introduction of Silverlight 4, however, we can now override this default behavior and implement our own logic. In RIA applications, you would usually want to display a contextual menu.

Just like its left button sibling, handling the right mouse button can be done by handling the events of MouseRightButtonDown and MouseRightButtonUp. In order to prevent the default Silverlight options menu from showing up, you have to handle the MouseRightButtonDown event, and set the Handled property of the MouseButtonEventArgs object to true.

Open the Chapter6-RightClick project from the downloadable content. The project contains a simple Border control. Handlers were added on the Border control for both...