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

Question regarding floating

2 Answers 119 Views
Docking
This is a migrated thread and some comments may be shown as answers.
Guido
Top achievements
Rank 1
Guido asked on 16 Mar 2016, 10:42 AM

Hi,

I have built an application with the Telerik WPF UI which is used to host other application using the Win32 SetParent function. Basically I can use it to host a number of other applications, similar as to how Chrome or Edge works. It works fine: I can host any application inside a number of radpanes. To achieve this, I have a WindowsFormsHost with a Panel on it. I use the Hwnd of the Panel to reparent the window of another process.

However, when I start undocking a pane by dragging it, the reparented window suddenly disappears and the pane is empty. I tried to handle this by listening to the PaneStateChange and PreviewPin events but that is not enough. I need to know that the pane will become undocked so I can park the parented window somewhere else while the pane is made to float. Is there a formal way to achieve this?

Thanks

2 Answers, 1 is accepted

Sort by
0
Nasko
Telerik team
answered on 17 Mar 2016, 11:20 AM
Hello Guido,

We suggest you to check our sample project that demonstrates how to use RadDocking controls with WinForms:
https://github.com/telerik/xaml-sdk/tree/master/Docking/WinFormsInsideDocking

The sample demonstrates how you could preserve the content of the pane when it becomes floating or is pinned/unpinned. In the sample we use System.Windows.Forms.User Control instead of WindowsFormsHost.

Please, give it a try and let us know if it helped you to resolve your issue.

We hope this will help you.

Regards,
Nasko
Telerik
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
0
Guido
Top achievements
Rank 1
answered on 17 Mar 2016, 01:43 PM
Thanks, this seems to solve my issue!
Tags
Docking
Asked by
Guido
Top achievements
Rank 1
Answers by
Nasko
Telerik team
Guido
Top achievements
Rank 1
Share this question
or