Edit this page

Styling the RadSplitContainer

As the RadSplitContainer is created dynamically you cannot set the style for it declaratively. The easiest way to do this is to create a theme for your RadDocking control, add the created style for the RadSplitContainer in it and apply the theme to the control. To learn how to do it read this topic.

To create the needed style for the Theme you should use a dummy control. This will allow you to copy the default style for the RadSplitContainer and modify it to your liking. To do so open the UserControl that hosts your RadDocking in Expression Blend.

From the Assets tab select Controls -> All -> RadSplitContainer.

Draw one dummy control of this type somewhere on the scene.

Select it and from the menu choose Object -> Edit Style -> Edit a Copy. You will be prompted for the name of the style and where to be placed within your application.

After clicking OK, a style for your RadSplitContainer control will be created and the properties that can be set through it will be loaded in the 'Properties' pane.

Now go to the template of the RadSplitContainer control, so you can style the DockResizer control.

The DockResizer control holds the visual elements that regard the resizing functionality. Select it from the 'Objects and Timeline' pane.

From the menu select Object -> *Edit Style -> Edit a Copy. *You will be prompted for the name of the style and where to be placed within your application.

After clicking OK, a style for your RadGridResizer control will be created and the properties that can be set through it will be loaded in the 'Properties' pane.

For example select the Background property and modify its value.

After finishing with the modifications you have to add the created style to the theme for your RadDocking. To learn how to do this take a look at the Theming the RadSplitContainer topic.

After moving the style to the theme you can remove it from the resources of your UserControl. Also don't forget to delete the dummy control that you have created.

Here is a snapshot of the final result.

See Also