Creating Your Own Controls
The goal in creating your own custom control is to combine the necessary graphics and/or control elements to create a unique user interface element that performs a specific purpose. It is totally up to you how you want your control to look and function. To walk you through creating a custom control, we are going to create a control whose purpose is to edit a person's address. We could choose to just add a bunch of TextBoxes to a form in an application; however, the benefit of creating a control is that it can be used again and again in many different projects.
To create a custom control, you first need to create a new project. However, the type of project you need to create is a “Windows Control Library” project. You ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access