How to: Extend Component Containers
Component containers are completely extensible. You can inherit from the Container class and add properties or methods, add custom functionality to enforce rules, override base methods, or any other custom functionality you want your container to incorporate. For details on containers and extending containers, see Containers, Sites, and Components.
You extend a Container as you would extend any base class. You create a class that inherits the properties of the base class, override any base methods that you want to extend, and add any additional properties or methods that you need. You can then use your new class as you would a standard Container and use any of the new functionality you have encoded.
To extend the Container base class
Declare a new class that inherits from the Container class.
Override any base-class methods to add additional functionality. The following example shows how to override the Add method.
Add any new properties or methods you want your new container to incorporate.