RadDocking Control Theme Override.

1 Answer 117 Views
Docking
Harshit
Top achievements
Rank 1
Harshit asked on 13 Apr 2023, 10:14 AM

HI Team,

I wanted to override the theme of RadDocking Control.

I'm using DocumentHost and RadDocumentPane with properties IsDockable="False" CanFloat="False"  CanUserClose="False" CanUserPin="False" but after that in the application Border is coming with thickness "2" .

I used snoop tool where if I set this thickness to 0 then border goes away but when I make changes in RadDockingDocument Style BorderLayer3 control to 0 it doesn't work .

Please help me to remove the border in case we use DocumentHost.

 <telerik:RadDocking.DocumentHost>
                <telerik:RadSplitContainer Margin="0,0,0,0" BorderThickness="0" Padding="0">
                    <telerik:RadPaneGroup BorderThickness="0" >
                        <telerik:RadDocumentPane Style="{StaticResource LayoutRadDocument}" PaneHeaderVisibility="Collapsed"  telerik:RadDocking.SerializationTag="AnotherDocPane" Background="Transparent" Margin="0,0,0,0" BorderThickness="0" Padding="0" Header="DocPane" Visibility="Collapsed" IsDockable="False" CanFloat="False"  ContextMenuTemplate="{x:Null}"  CanUserClose="False" CanUserPin="False">
                            <Grid x:Name="RighHandColumn">

Please look into the SS.

 

1 Answer, 1 is accepted

Sort by
0
Stenly
Telerik team
answered on 17 Apr 2023, 05:08 AM

Hello Harshit,

Looking at the provided information and image, it seems that the Office_Black theme is being used. If this theme is being used, to change the border thickness of the Border control with x:Name="BorderLayer3", you could subscribe to the Loaded event of RadDocking. Then, using the ChildrenOfType extension method, retrieve the mentioned Border element and modify its BorderThickness property

The following code snippet shows this suggestion's implementation:

private void RadDocking_Loaded(object sender, RoutedEventArgs e)
{
    RadDocking radDocking = (RadDocking)sender;

    Border borderLayer3 = radDocking.ChildrenOfType<Border>().FirstOrDefault(x => x.Name == "BorderLayer3");

    if (borderLayer3 != null)
    {
        borderLayer3.BorderThickness = new Thickness(0);
    }
}

The produced result is as follows:

If you need to remove the whole border and have only the pane's content area displayed, you could retrieve the Border elements with x:Name="BorderLayer2" and x:Name="BorderLayer1" and modify their BorderThickness properties in the same manner as with the BorderLayer3 Border.

With this being said, I hope the provided information will be of help to you.

Regards,
Stenly
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
Docking
Asked by
Harshit
Top achievements
Rank 1
Answers by
Stenly
Telerik team
Share this question
or