# Building TPF Based Controls

RadControls are built by composing RadElement trees instead of overriding the OnPaint method. [Elements](https://www.telerik.com/products/winforms/documentation/telerik-presentation-framework/elements/overview) can take the form of lightweight [primitive elements](https://www.telerik.com/products/winforms/documentation/telerik-presentation-framework/elements/overview) that draw the individual parts of a control to the form, [layout elements](https://www.telerik.com/products/winforms/documentation/telerik-presentation-framework/elements/overview) that are responsible for arranging primitives on the form, and [component elements](https://www.telerik.com/products/winforms/documentation/telerik-presentation-framework/elements/overview) that handle user input and are responsible for creating layout and primitive elements. Elements can be nested to any arbitrary level of complexity.

* A number of pre-built [primitives](https://www.telerik.com/products/winforms/documentation/telerik-presentation-framework/primitives/overview) are available for building themable user interfaces quickly including [text](https://www.telerik.com/products/winforms/documentation/telerik-presentation-framework/primitives/textprimitive), [gradient fills](https://www.telerik.com/products/winforms/documentation/telerik-presentation-framework/primitives/fillprimitive), [borders](https://www.telerik.com/products/winforms/documentation/telerik-presentation-framework/primitives/borderprimitive), [checks](https://www.telerik.com/products/winforms/documentation/telerik-presentation-framework/primitives/checkprimitive), [arrows](https://www.telerik.com/products/winforms/documentation/telerik-presentation-framework/primitives/arrowprimitive), [lines](https://www.telerik.com/products/winforms/documentation/telerik-presentation-framework/primitives/lineprimitive), [radio buttons](https://www.telerik.com/products/winforms/documentation/telerik-presentation-framework/primitives/radioprimitive), [images](https://www.telerik.com/products/winforms/documentation/telerik-presentation-framework/primitives/imageprimitive) and [trackbars](https://www.telerik.com/products/winforms/documentation/telerik-presentation-framework/primitives/trackbarprimitive).

* [Elements](https://www.telerik.com/products/winforms/documentation/telerik-presentation-framework/elements/overview) combine primitives to form the basis of a functioning control. For example, RadLabelElement combines a [BorderPrimitive](https://www.telerik.com/products/winforms/documentation/telerik-presentation-framework/primitives/borderprimitive), [FillPrimitive](https://www.telerik.com/products/winforms/documentation/telerik-presentation-framework/primitives/fillprimitive) and [TextPrimitive](https://www.telerik.com/products/winforms/documentation/telerik-presentation-framework/primitives/textprimitive), then adds specific label properties **TextAlignment** and **BorderVisible**.

* Layout elements descending from [LayoutPanel](https://www.telerik.com/products/winforms/documentation/telerik-presentation-framework/class-hierarchy/layoutpanel) manage the arrangement of child elements. For example, StackLayoutPanel arranges elements in a horizontal or vertical stack that may wrap to new lines. StripLayoutPanel orders elements in a single vertical or horizontal line.

* [RadControls](https://www.telerik.com/products/winforms/documentation/telerik-presentation-framework/class-hierarchy/radcontrol) are typically thin wrappers around a component element, handle any direct communication with Windows and establish communication to the RadElement tree by creating a root element and adding elements to the root element. RadLabel for example simply creates a root element and then creates and adds a RadLabelElement to the root element.

## See Also

* [Telerik Presentation Framework Overview](https://www.telerik.com/products/winforms/documentation/telerik-presentation-framework/overview/overview)
* [Getting Started](https://www.telerik.com/products/winforms/documentation/telerik-presentation-framework/getting-started/getting-started)
