50244:
Essential Windows Forms
Four days—Instructor-led

About this Course
This course provides developers with the knowledge and skills needed to
build multi-tier user interface applications. Acquire mastery of
techniques for creating custom, interactive visualizations of data,
writing multi-threaded user interface applications, and connecting
applications to back-end services. Explore ClickOnce deployment over the
Web, Windows Forms internals, control layout, and data binding.
You’ll get answers to these questions:
• How do I handle complicated user interface layout tasks?
• How do I display database content in my application?
• How do I make my user interface responsive while performing background
operations?
• What are the different deployment strategies for my application?
• What are the different techniques for embedding resources in my
application?
Learn how to design and implement multi-tier user interface
applications!
Audience Profile
This course is intended for developers who want to build rich client
front ends to distributed applications.
At Course Completion
After completing this course, students will be able to:
• Build dialog, single-document interface, and multiple-document
interface applications
• Use the new Windows Forms 2.0 classes, such as the ToolStrip,
MenuStrip, and SplitContainer
• Integrate custom controls into Visual Studio .NET
• Customize windowing behavior through subclassing
• Use resources to internationalize your application
• Access databases and bind data to controls using the new BindingSource
class
• Deploy your application over the web to create “smart clients” using
ClickOnce
• Use the BackgroundWorker class to provide a responsive UI while
handling long background operations
Prerequisites
• A basic knowledge of C# and
the .NET framework
• Taken Essential .NET 1.1 or Essential .NET 2.0 (or equivalent
experience/training)
Course Outline
Module 1: Overview
This is an introduction to Windows Forms and its place in the .NET
architecture. It describes the fundamental elements of any Windows Forms
application.
Module 2: Controls
The Controls module describes the core of the Windows Forms framework:
the Control class. We discuss its features, and show how it makes UI
development much easier than with predecessors such as VB6 or MFC.
Module 3: Forms
This section shows features for displaying and managing windows, and
using the standard dialogs common to all Windows applications.
Discussion of the ToolStrip and MenuStrip classes that are new to
Windows Forms 2.0 is also provided.
Module 4: Applications and Configurations
This section shows various styles of lifecycle management for your
applications. It also shows the options available for storing and
managing the various kinds of configuration information used in .NET
applications, including application and user settings, the registry,
special folders, and isolated storage.
Module 5: Data Access
In this module, we show how to use ADO.NET from within a Windows Forms
application, and how to bind the results of database queries to controls
in the user interface. We also show how data binding can be used in
other contexts without needing a live database connection. The module
presents the new data binding architecture in Windows Forms 2.0, with
discussion of the BindingSource and BindingNavigator classes and the
INotifyPropertyChanged interface.
Module 6: Drawing
In this section, we begin by describing the windows message dispatching
and painting model. We continue with discussion of the drawing
facilities that enable you to take control of your application's
appearance, providing custom visualization of information. The module
concludes with more advanced drawing topics, specifically, double
buffering, antialiasing, and owner drawing.
Module 7: Resources
Here we show the facilities for managing and localizing application
resources.
Module 8: Serialization
This chapter describes the two technologies offered by the .NET
Framework, and explains their pros and cons in the context of a Windows
Forms application.
Module 9: Subclassing
Customizing UI behavior requires understanding how the windows layer
works. This module describes the windows architecture and presents the
different techniques for handling events. It then shows how to process
low-level window messages to provide functionality that is not directly
exposed through Windows Forms events.
Module 10: Multithreading
In this section, we show how to assure that long-running operations do
not cause the user interface to become unresponsive. We discuss both
single and multithreaded techniques for ensuring a responsive UI, and
why the multithreaded technique is generally superior. We also show how
to avoid the pitfalls inherent in using these techniques in a rich
client application, and how the new Windows Forms 2.0 BackgroundWorker
class facilitates writing thread safe UI code.
Module 11: Code Access Security
For many deployment models, Windows Forms applications will be subject
to the restrictions imposed by .NET Code Access Security (CAS). This
chapter describes how best to configure it in smart-client deployment
scenarios.
This section describes the exciting new deployment strategies that
Windows Forms 2.0 applications offer. It shows how to use the much
talked-about ClickOnce technology to deploy an application locally or
over the web.
Module 12: Deployment