This is a migrated thread and some comments may be shown as answers.

How to set the RadPane Background Programmatically

1 Answer 114 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
Scott asked on 11 Jul 2010, 06:21 PM

I think this is a simple one, but still having problems. I am creating the RadPane, and RadPaneGroup objects dynamically, and adding them to the XAML defined RadDocking and RadSplitter controls. My RadPane appears, but I can't seem to get the background to set.

I'm certainly missing something obvious but its is eluding me at present.

           var brush = new SolidColorBrush() { Color = Colors.Purple };

            RadPane pane = new RadPane();
            pane.CanFloat = true;
            pane.Header = "Software";
            pane.Background = brush;

            var DashboardPaneGroup= new RadPaneGroup();

Also, how could I specify the starting position of the dynamically added panes? I was doing it like this:

DashboardPaneGroup.AddItem(pane1, DockPosition.Left);

But read a post indicating that was not correct.

Thanks for your help,


1 Answer, 1 is accepted

Sort by
Miroslav Nedyalkov
Telerik team
answered on 13 Jul 2010, 12:29 PM
Hello Scott,

 If you want to set the background of the content of the Pane you should set the background of its root element. The background of the Pane is used for the TabItem. You could use the following code:

 <Grid Background="Red">

In the code-behind you could find the Content first and set its Background.

Panes are added in the Items collection of the groups and if you want to insert a Pane you just need to insert it in the Items collection of the group in the index you wish. The AddItem method is used by the Drag&drop of panes to position a pane relatively to a group.

All the best,
Miroslav Nedyalkov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Asked by
Top achievements
Rank 1
Answers by
Miroslav Nedyalkov
Telerik team
Share this question