PacktLib: GDI+ Application Custom Controls with Visual C# 2005

GDI+ Custom Controls with Visual C# 2005

Credits

About the Authors

About the Reviewer

Preface

Introduction to Custom Controls

What Are Controls?

Introducing Custom Controls

Preparing Your Environment

What Are Custom Controls Made Of?

Building TinyNoiseMaker

Extending TinyNoiseMaker

Summary

Introduction to GDI+

Understanding Control Drawing

Simple Drawing on a Form

Drawing Inside a Panel Object

Drawing Inside a Control

Summary

Basic Drawing

The GDI+ Coordinate System

Drawing with GDI+

Building the GradientLabel Control

Summary

Drawing Complex Shapes and Using Transformations

Drawing Complex Shapes

Clipping Drawing Using Region Objects

Graphics Transformations

Creating the Clock Control

Summary

Drawing Control Parts, Borders, and Adornments

Rendering Common Control Parts

Rendering Borders and Frames

Rendering Control Adornments

Creating Multiple Controls that Reuse the Same Functionality

Creating Derived Controls

Extending Existing Controls

Summary

Working with Images

Drawing Images

Image Effects

Skewing, Rotation, and Scaling

The ImageWarperControl

Summary

Printing

.NET Printing Explained

Your First Print Job

The SimpleReportPrinter

User Involvement

Our Responsibilities as Programmers

Printing Custom Controls

Summary

Collections

Collections in the .NET Framework

Generics

Building the Font Picker

Summary

Double Buffering

Introduction to Double Buffering

The Scroll Bar

Summary

Handling Mouse Events

Handling Mouse Events

Dragging and Dropping

Dragging and Dropping

Summary

Implementing Design-Time Support

Building Designer-Friendly Controls

Summary

Designing Intuitive Interfaces

The Relationship between User and Computer

Requests, Input Parsing, Fault Tolerance, and Feedback

Looking Further Into Input Parsing

Our Regex Pattern in Detail

Optimization and Coding Conventions

Summary

The PieChart Control

Creating the PieChart Control

Adding Slice Names and Delimiters

PieChart Legend

Printing the PieChart

Adding and Removing Slices

Summary

Distributing Custom Controls

Distributing Custom Controls

Distributing Custom Controls

Distributing Custom Controls

Index