Perform the following steps to create a custom control
Chapter09, in the Projects panel and select Edit in Visual Studio. It is easier to create a custom control in Visual Studio as it provides a built-in template to create custom controls. This is shown in the following screenshot:
Chapter09, in Solution Explorer and select Add New Item….
SwitchCustomControl.cs, as shown in the following screenshot: