Using Custom Controls and User Controls

In this chapter, we will cover the following recipes:

  • Creating a custom control
  • Customizing the template of a custom control
  • Exposing properties from a custom control
  • Exposing events from a custom control
  • Extending the functionality of a control using behavior
  • Creating a User Control interface
  • Exposing events from a User Control
  • Customizing the XMLNS namespace

Introduction

A custom control is a loosely coupled control defined in a class which derives from the System.Windows.Controls.Control class. You may also derive it from a different custom control, depending on your requirement.

The UI of custom ...

Get Windows Presentation Foundation Development Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.