Hello Elizabeth and David,
Basically, the BackColor
property that comes with the RadTextBox
control is inherited from the base Control
class that is part of the .NET Framework. By setting this property you change the background color of the control that serves as a surface for our RadTextBox to paint itself. As you may know, the Telerik controls are built upon the Telerik Presentation Framework which is very similar to the WPF architecture, i. e. the controls are built from primitives like FillPrimitive, BorderPrimitive, TextPrimitive
etc. This enables the more flexible customization of the appearance of our product. The primitive hierarchy of the RadTextBox is painted upon the surface control and thus you cannot see the result of setting the BackColor
property. This implementation enables the user to customize the RadTextBox by separately defining border properties, back color properties and text properties (by modifying the corresponding primitives) and thus creating stylish GUIs built from gradients, alpha blending and transformations.
However, the RadTextBox
control is slightly different since it also uses the standard Windows Forms TextBox
control, i.e. it wraps its functionality. Therefore, in order to set the background color of the RadTextBox
control, you have to separately set the color for the FillPrimitive
and the RadTextBoxItem
(which is actually the standard text box control) and thus achieving the effect of defining a background color for the whole control. You can do this by using the Element Hierarchy Editor
I hope this clarifies the reason why setting the BackColor property will not produce the expected result.
the Telerik team