A common question that we received from our customers regarding our RadPanel control was whether the scrollbars can be customized so that they are consistent with the current theme used in the application. Since RadPanel supports the standard Windows Forms scrolling behavior and the customization of the standard scrollbars is basically impossible, we decided, by using some nice trickery, to introduce a new control that provides the RadPanel functionality and also supports theming of the scrollbars. Here is a picture of what we achieved:

 

Screenshot1

 

In a nutshell, the RadScrollablePanel control is composed of two RadScrollBars and a panel that represents the container for the controls added. This panel gives also the scrolling functionality. With some non-client area calculations we managed to hide the standard scrollbars and map the RadScrollBars to the properties exposed by the container panel. In other words, without breaking the standard scrolling mechanism, we “replace” the standard scrollbars with ours and thus enable wider customization of the appearance of the panel.

 

Apart from all the magic behind it, this control is used exactly as a standard panel - any controls can be easily added to it with the standard Visual Studio drag-and-drop routine.

 

We hope that you will have fun using this nice control and would appreciate any feedback that could help us improve it!


Comments

Comments are disabled in preview mode.