I have spent a good amount of time looking for a way to do this but I finally had to contact support y'day. I did not find any hits in the forum archive as well so, cross-posting this solution here for any mortals like me could find it in future. To their credit, support team was swift in getting the answer!
If you need a way to set RadPane's background differently based on whether it is docked or floating, you will have to do this from the RadPaneGroup that the pane belongs to. Although, the group can be styled in XAML, I prefer the following because I needed this be done only for the panes that go floating in runtime while all docked panes remain transparent.
XAML:
CodeBehind:
If you need a way to set RadPane's background differently based on whether it is docked or floating, you will have to do this from the RadPaneGroup that the pane belongs to. Although, the group can be styled in XAML, I prefer the following because I needed this be done only for the panes that go floating in runtime while all docked panes remain transparent.
XAML:
<
telerik:RadDocking
PaneStateChange
=
"Dock_PaneStateChanged"
/>
CodeBehind:
private void Dock_PaneStateChanged(object sender, Telerik.Windows.RadRoutedEventArgs e)
{
RadPane pane = e.OriginalSource as RadPane;
if(pane == null) return;
RadPaneGroup pGroup = pane.ParentOfType<
RadPaneGroup
>();
pGroup.Background = pane.IsFloating? Brushes.DarkMagenta : Brushes.Transparent;
}