telerik:RadDocking custom ToolWindow base type

1 Answer 19 Views
Docking
Psy
Top achievements
Rank 1
Psy asked on 17 Mar 2025, 08:47 AM

Hello,

With the telerik:RadDocking the content of the tab that I open expect a specific parent Window (of type like WindowBase) with utilities, notification, modals, ...

Then I drag out one of the docking pane the parent window is a ToolWindow, is there a way to create a custom ToolWindow or wrap the content of a ToolWindow in a custom UserControl ?

Thanks you,

1 Answer, 1 is accepted

Sort by
0
Martin Ivanov
Telerik team
answered on 19 Mar 2025, 08:04 AM

Hello Davy,

You can replace the default ToolWindow with a custom one that derives from ToolWindow using a custom generated items factory.

public class CustomGeneratedItemsFactory : DefaultGeneratedItemsFactory
{
    public override ToolWindow CreateToolWindow()
    {
        return new CustomToolWindow();
    }
}

public class CustomToolWindow : ToolWindow
{
}


this.radDocking.GeneratedItemsFactory = new CustomGeneratedItemsFactory();

In case you want to customize the content inside the you can consider modifying the ControlTemplate of ToolWindow. The customized template can be applied via an implicit style as shown here.

I hope that helps.

Regards,
Martin Ivanov
Progress Telerik

Enjoyed our products? Share your experience on G2 and receive a $25 Amazon gift card for a limited time!

Psy
Top achievements
Rank 1
commented on 21 Mar 2025, 01:17 PM

Ok perfect, thank you !

Just a small detail, the CustomToolWindow inside a WindowHostWindow and is not directly in the parent of the element that is being "docked out".

Tags
Docking
Asked by
Psy
Top achievements
Rank 1
Answers by
Martin Ivanov
Telerik team
Share this question
or