The following example illustrates a customized TreeView. By inheriting the TreeView class, this custom version has all the functionality of a normal TreeView. Changing various property values in the constructor provides a unique appearance. Because the ShowPlusMinus property is set to false, the customized control also overrides the OnAfterSelect method so nodes can be expanded and collapsed when they are clicked.

A control that is customized in this way can be used throughout an organization, making it easy to provide a consistent interface without requiring the control properties to be specified in each individual project.