| |
| |
Preface | |
| |
| |
About the Author | |
| |
| |
About the Technical Reviewer | |
| |
| |
Acknowledgments | |
| |
| |
Introduction | |
| |
| |
About This Book | |
| |
| |
Chapter Overview | |
| |
| |
| |
Creating Usable Interfaces | |
| |
| |
Why Worry About the Interface? | |
| |
| |
A Brief History of User Interfaces | |
| |
| |
The Command-Line Era | |
| |
| |
The Question-Answer Model | |
| |
| |
The Menu-Driven Model | |
| |
| |
The GUI Era | |
| |
| |
Creativity vs. Convention | |
| |
| |
Consistency in .NET | |
| |
| |
The "Act-Like-Microsoft" Principle | |
| |
| |
Administrative Utilities | |
| |
| |
Know Your Application Type | |
| |
| |
Know Your User | |
| |
| |
Handling Complexity | |
| |
| |
Segmenting Information | |
| |
| |
Inductive User Interface | |
| |
| |
Helpful Restrictions | |
| |
| |
Restricting the User's Ability to Make a Mistake | |
| |
| |
Restricting the User's Choices | |
| |
| |
Restricting the User's Imagination | |
| |
| |
Programming User Interface for the Web | |
| |
| |
The Last Word | |
| |
| |
| |
Designing with Classes and Tiers | |
| |
| |
Classes and Objects | |
| |
| |
The Roles of Classes | |
| |
| |
Classes and Types | |
| |
| |
More About Objects | |
| |
| |
User Interface Classes in .NET | |
| |
| |
Controls Are Classes | |
| |
| |
Controls Contain Other Controls | |
| |
| |
Controls Derive from Other Controls | |
| |
| |
Inheritance and the Form Class | |
| |
| |
The Controls Collection | |
| |
| |
Generating Code with Visual Studio .NET | |
| |
| |
Interacting with a Control | |
| |
| |
The View-Mediator Pattern | |
| |
| |
Smart Controls | |
| |
| |
Smart Forms | |
| |
| |
Encapsulation | |
| |
| |
Use Enumerations and Resource Classes | |
| |
| |
Use Collections | |
| |
| |
Restrain from Sharing Control References | |
| |
| |
Define a Data Transfer Plan | |
| |
| |
Use a Central Switchboard | |
| |
| |
Create Data-Driven User Interfaces | |
| |
| |
Developing in Tiers | |
| |
| |
Problems with Three-Tier Design | |
| |
| |
Three-Tier Design Consistency | |
| |
| |
Fixing Three-Tier Design | |
| |
| |
The DataSet to the Rescue | |
| |
| |
Validation and Business Objects | |
| |
| |
Other Types of Application | |
| |
| |
The Last Word | |
| |
| |
| |
Control Class Basics | |
| |
| |
The Windows Forms Package | |
| |
| |
The .NET Solution | |
| |
| |
The Control Class | |
| |
| |
Position and Size | |
| |
| |
Color | |
| |
| |
Fonts and Text | |
| |
| |
Access Keys | |
| |
| |
Control Relations | |
| |
| |
Focus and the Tab Sequence | |
| |
| |
Responding to the Mouse and Keyboard | |
| |
| |
A Mouse/Keyboard Example | |
| |
| |
Mouse Cursors | |
| |
| |
Graphics and Painting | |
| |
| |
Low-Level Members | |
| |
| |
The Last Word | |
| |
| |
| |
Classic Controls | |
| |
| |
Types of Controls | |
| |
| |
Invisible Controls | |
| |
| |
Provider Controls | |
| |
| |
ActiveX Controls | |
| |
| |
Should You Import ActiveX Controls? | |
| |
| |
The Classic Control Gallery | |
| |
| |
Labels | |
| |
| |
LinkLabel | |
| |
| |
Button | |
| |
| |
TextBox | |
| |
| |
CheckBox and RadioButton | |
| |
| |
PictureBox | |
| |
| |
List Controls | |
| |
| |
Other Domain Controls | |
| |
| |
Organizational Controls | |
| |
| |
The Date Controls | |
| |
| |
The DateTimePicker | |
| |
| |
MonthCalendar | |
| |
| |
Menus | |
| |
| |
The Menu Class | |
| |
| |
The MainMenu and ContextMenu Classes | |
| |
| |
The MenuItem Class | |
| |
| |
The Visual Studio .NET Menu Designer | |
| |
| |
Attaching a Menu | |
| |
| |
Menu Events | |
| |
| |
Copying and Cloning a Menu | |
| |
| |
Merging a Menu | |
| |
| |
Owner-Drawn Menus | |
| |
| |
An Owner-Drawn Menu Control | |
| |
| |
Drag-and-Drop | |
| |
| |
"Fake" Drag-and-Drop | |
| |
| |
Authentic Drag-and-Drop | |
| |
| |
Validation | |
| |
| |
A Validation Example | |
| |
| |
Validating with the ErrorProvider | |
| |
| |
Validating with Regular Expressions | |
| |
| |
The Last Word | |
| |
| |
| |
Forms | |
| |
| |
The Form Class | |
| |
| |
Form Size and Position | |
| |
| |
Scrollable Forms | |
| |
| |
Showing a Form | |
| |
| |
Custom Dialog Windows | |
| |
| |
IgnoreForm Interaction | |
| |
| |
Form Ownership | |
| |
| |
Windows XP Styles | |
| |
| |
Prebuilt Dialogs | |
| |
| |
Resizable Forms | |
| |
| |
The Problem of Size | |
| |
| |
A Traditional Solution | |
| |
| |
Minimum and Maximum Size | |
| |
| |
Anchoring | |
| |
| |
Docking | |
| |
| |
Splitting Windows | |
| |
| |
Docking with Panels | |
| |
| |
Other Split Windows | |
| |
| |
Irregularly Shaped Forms | |
| |
| |
Shaped Form Content | |
| |
| |
Moving Shaped Forms | |
| |
| |
Forms with Holes | |
| |
| |
Visual Inheritance | |
| |
| |
Making an Ancestor Control Available | |
| |
| |
Adding an Ancestor Property | |
| |
| |
Overriding an Event Handler | |
| |
| |
The Last Word | |
| |
| |
| |
Modern Controls | |
| |
| |
The ImageList | |
| |
| |
Dealing with the ImageList in Code | |
| |
| |
ListView and TreeView | |
| |
| |
Basic ListView | |
| |
| |
Advanced ListView Tricks | |
| |
| |
Label Editing | |
| |
| |
Adding Information to a ListView | |
| |
| |
Basic TreeView | |
| |
| |
TreeView Structure | |
| |
| |
TreeView Navigation | |
| |
| |
Manipulating Nodes | |
| |
| |
Selecting Nodes | |
| |
| |
Advanced TreeView Tricks | |
| |
| |
Node Pictures | |
| |
| |
Expanding and Collapsing Levels | |
| |
| |
TreeView Drag-and-Drop | |
| |
| |
Taming the TreeView | |
| |
| |
A Project Tree | |
| |
| |
A Data-Aware TreeView | |
| |
| |
Unusual Trees | |
| |
| |
Design-Time Support for the Custom TreeView | |
| |
| |
The ToolBar | |
| |
| |
Synchronizing the ToolBar | |
| |
| |
The StatusBar | |
| |
| |
Basic StatusBar | |
| |
| |
Synchronizing the StatusBar to a Menu | |
| |
| |
The TabControl | |
| |
| |
The NotifyIcon | |
| |
| |
The Last Word | |
| |
| |
| |
Custom Controls | |
| |
| |
Types of Custom Controls | |
| |
| |
User Controls | |
| |
| |
Creating User Controls | |
| |
| |
The Progress User Control | |
| |
| |
The Bitmap Thumbnail Viewer | |
| |
| |
Testing the BitmapViewer | |
| |
| |
BitmapViewer Events | |
| |
| |
BitmapViewer Enhancements and Threading | |
| |
| |
Inherited Controls | |
| |
| |
Inherited Controls or User Controls? | |
| |
| |
The DirectoryTree Control | |
| |
| |
Testing the DirectoryTree | |
| |
| |
A Masked TextBox Control | |
| |
| |
Custom Extender Providers | |
| |
| |
The Menu Text Provider | |
| |
| |
The Help Icon Provider | |
| |
| |
The Last Word | |
| |
| |
| |
Design-Time Support for Custom Controls | |
| |
| |
Control Projects | |
| |
| |
The Class Library Project | |
| |
| |
Referencing a Custom Control | |
| |
| |
The GAC | |
| |
| |
Control Designer Basics | |
| |
| |
Attributes | |
| |
| |
Basic Serialization | |
| |
| |
The Toolbox Bitmap | |
| |
| |
Resource Files | |
| |
| |
Testing Custom Controls | |
| |
| |
Debugging Design-Time Support | |
| |
| |
Testing for Design Mode | |
| |
| |
The PropertyGrid Control | |
| |
| |
Custom Designers | |
| |
| |
Filtering Properties and Events | |
| |
| |
Designer Verbs | |
| |
| |
Control Designer Notifications | |
| |
| |
Data Types and UITypeEditors | |
| |
| |
Using Prebuilt UITypeEditors | |
| |
| |
Custom UITypeEditors | |
| |
| |
Licensing Custom Controls | |
| |
| |
Simple LIC File Licensing | |
| |
| |
Custom LIC File Licensing | |
| |
| |
Advanced License Providers | |
| |
| |
The Last Word | |
| |
| |
| |
Data Controls | |
| |
| |
Introducing Data Binding | |
| |
| |
Basic Data Binding | |
| |
| |
Simple List Binding | |
| |
| |
Binding Lists to Complex Objects | |
| |
| |
Single-Value Binding | |
| |
| |
ADO.NET Data Binding | |
| |
| |
Multiple Control Binding | |
| |
| |
Updating with Data Binding | |
| |
| |
Formatting Data Before Binding | |
| |
| |
Advanced Conversions | |
| |
| |
Row Validation and Changes | |
| |
| |
Data Binding Exposed | |
| |
| |
Navigation with Data Binding | |
| |
| |
Reacting to Record Navigation | |
| |
| |
Creating Master-Detail Forms | |
| |
| |
Creating a New Binding Context | |
| |
| |
The DataGrid Control | |
| |
| |
DataGrid Relations | |
| |
| |
DataGrid Column Mapping | |
| |
| |
Creating Custom DataGrid Column Styles | |
| |
| |
Encapsulation with Data Controls | |
| |
| |
Validating Bound Data | |
| |
| |
Data-Aware Controls | |
| |
| |
A Decoupled TreeView with Just-in-Time Nodes | |
| |
| |
Can There Be a Data-Bound ListView Control? | |
| |
| |
The Last Word | |
| |
| |
| |
MDI Interfaces and Workspaces | |
| |
| |
The Story of MDI | |
| |
| |
Types of MDI Applications | |
| |
| |
MDI Essentials | |
| |
| |
Finding Your Relatives | |
| |
| |
Synchronizing MDI Children | |
| |
| |
MDI Layout | |
| |
| |
Merging Menus | |
| |
| |
Managing Interface State | |
| |
| |
Document-View Architecture | |
| |
| |
A Document-View Ordering Program | |
| |
| |
Floating Windows and Docking | |
| |
| |
Floating Toolbars | |
| |
| |
Dockable Windows | |
| |
| |
The Last Word | |
| |
| |
| |
Dynamic User Interface | |
| |
| |
The Case for Dynamic User Interface | |
| |
| |
Creating Controls at Runtime | |
| |
| |
A System Tray Application | |
| |
| |
Using Controls in a Drawing Program | |
| |
| |
Dynamic Content | |
| |
| |
Localization | |
| |
| |
A Dynamic Menu Example | |
| |
| |
Data-Driven Programming | |
| |
| |
A Data-Driven Pricing Application | |
| |
| |
Control Layout Engines | |
| |
| |
The SingleLineFlow Layout Manager | |
| |
| |
Control Layout Engines As Extender Providers | |
| |
| |
The Last Word | |
| |
| |
| |
GDI+ Basics | |
| |
| |
Paint Sessions with GDI+ | |
| |
| |
Accessing the Graphics Object | |
| |
| |
Painting and Refreshing | |
| |
| |
Optimizing GDI+ Painting | |
| |
| |
Painting and Resizing | |
| |
| |
Painting Portions of a Window | |
| |
| |
Rendering Mode and Antialiasing | |
| |
| |
Double Buffering | |
| |
| |
Painting and Debugging | |
| |
| |
The Graphics Class | |
| |
| |
Coordinate Systems and Transformations | |
| |
| |
Pens | |
| |
| |
Brushes | |
| |
| |
Hit Testing | |
| |
| |
Hit Testing Nonrectangular Shapes | |
| |
| |
The ControlPaint Class | |
| |
| |
The Last Word | |
| |
| |
| |
GDI+ Controls | |
| |
| |
Simple GDI+ Controls | |
| |
| |
A Gradient Label | |
| |
| |
Improving the GradientLabel's Design-Time Support | |
| |
| |
A Marquee Label | |
| |
| |
Creating Button Controls | |
| |
| |
A Hot Tracking Button | |
| |
| |
Reconsidering the Vector Drawing Program | |
| |
| |
Solving the Bounding Problem | |
| |
| |
A Simple Graphing Control | |
| |
| |
The Last Word | |
| |
| |
| |
Help and Application-Embedded Support | |
| |
| |
The Case for Help | |
| |
| |
Types of Help | |
| |
| |
WinHelp | |
| |
| |
WinHelp 95 | |
| |
| |
HTML Help | |
| |
| |
MS Help 2 | |
| |
| |
Some Help Authoring Tools | |
| |
| |
Classic Bad Help | |
| |
| |
Basic Help with the HelpProvider | |
| |
| |
Control-Based and Form-Based Help | |
| |
| |
Invoking Help Programmatically | |
| |
| |
Help Without the HelpProvider | |
| |
| |
Using Database-Based Help | |
| |
| |
Using Task-Based Help | |
| |
| |
Creating Your Own Help | |
| |
| |
Application-Embedded Support | |
| |
| |
Affordances | |
| |
| |
Agents | |
| |
| |
The Last Word | |
| |
| |
Index | |