Windows Forms Best Practices
This course demonstrates several best practices for Windows Forms application development by gradually improving a demo application. Topics covered include resizing, layout, accessibility, maintainable code, localization, usability, testability, threading, exception handling, custom control creation, and interoperability.
What you'll learn
This course demonstrates several best practices for Windows Forms development by taking a demo application and gradually improving it to improve the user experience and code quality. We'll see how you can improve the layout and resizing of your application, and how you can make it more accessible, usable, and navigable from the keyboard. We'll explore how to approach localization, exception handling, and threading. We'll also devote time to various patterns that will help you write more maintainable and testable code. Finally, we'll provide guidelines for creating your own custom controls, and see how you can interoperate other technologies such as hosting web and WPF content within a Windows Forms application.
Table of contents
- Module Introduction 1m
- Is Windows Forms Dead? 2m
- Why Use Windows Forms? 1m
- Building Great Windows Forms Applications 2m
- Moving Away From Windows Forms 1m
- Course Prerequisites and Contents 3m
- Introducing the Demo Application 2m
- Naming Controls 2m
- Using Data Binding 5m
- Setting Default Properties on Forms 5m
- Module Summary 3m
- Module Introduction 3m
- Unhandled Exceptions 2m
- Global Exception Handlers 2m
- Exception Handling Guidelines 2m
- Where to Handle Exceptions 2m
- Demo - Global Exception Handler 3m
- Demo - Handling Anticipated Exceptions 4m
- Ways to Start a Thread 7m
- Updating the User Interface 2m
- While a Task Is Running 2m
- Demo - Awaiting a Task 4m
- Demo - Thread Exceptions and Timeouts 2m
- Module Summary 2m
- Module Introduction 5m
- Segregate Your User Interface 3m
- Extract Business Logic From Code Behind 4m
- More Business Logic to Extract 1m
- The Model View Presenter Pattern 2m
- Creating View Interfaces 5m
- Connecting the Presenter 2m
- Refactoring the MainForm Presenter 2m
- The Command Pattern 2m
- Implementing the Command Pattern 5m
- Event Aggregators 3m
- Using an Event Aggregator 6m
- Module Summary 3m