I have a collection of ContentControls which I want to show them together as a tabbed group.
And this tabbed group should appear in a floating window.
How to do it programmatically?
I have tried using dockingManager.CreateHorizontalTabGroup and dockingManager.AddElementToTabGroup, but the tabbed group is spawn within the main document window.
I want them to be floated in one newly created floating window.
I have also tried adding a ContentConrtol (Name="Conrol1") with attached property setting it FloatState (DockingManager.SetState(controlToBeAdded1, DockState.Float)) to be floatted then add it to dockingManager (PART_DockingManager.Children.Add(controlToBeAdded1)), and then set the second ContentControl's attached property TargetNameInFloatingMode to be the name of the first ContentCtrol (DockingManager.SetTargetNameInFloatingMode(controlToBeAdded2, "Control1")) then add this secondControl into dockingManager (PART_DockingManager.Children.Add(controlToBeAdded2)).
This manages to add the second ContentControl to the newly spawn floating window of the first ContentContro, but the two controls are presented splitted-ly in the floating window without any tab, and they cannot be dragged and dropped into docking manager.
I am using UseNativeFloatWindow="True" and default the ContainerMode="TDI" by the way.
Edit: This is quite critical for my desktop app so it would be much appreciated if someone in the syncfusion team could address that they are noticing or even solving my problem. Well appreciated in advance.
Best regards
Hi King Cheong,
Regards,
Harinath N
Hi Harinath,
Thanks for your reply.
I am using DockingManager in WPF but not Winforms.
And if I do it manually, i.e. if I drag and drop a tabbed window in the main window to an existing floating window, it does do exactly what I want, i.e. the dropped window becomes a tabbed window inside the floating window.
I uploaded a gif showing what I mean. As you could see the left window is the main window with a DocumentContainer.
The right one is a floating window (UseNativeFloatWindow="True").
I can add "Control2" to the floating window as tabbed window by drag and drop.
I don't know if there is a DocumentContainer in the floating window or not though, as you said there is only one DocumentContainer in DockingManager.
But certainly it is a tabbed group in the floating window.
This is what I want, a collection of ContentControls added as tabbed group in a floating window.
I doubt if it can only be done with drag and drop. If this is the case then it is strange that we can do something by user dragging and dropping while it can't be done programmatically.
I noticed that for DockingManager WPF there is a LinkedManager feature too. But then the problem will be everytime I add a ContentCotrol to new a floating window, I need to wrap it with a new DockingManager.
I don't think this is the approach behind the seen when I do it by drag and drop.
Hope you understand my question.
Regards
Attachment: Recording_20221215_at_00.28.47.gif_a0e75dfd.zip
Hi King cheong,
Regards,
Harinath N
Hi Harinath,
Thank you very much. It works in exactly what I want.
What I missed is using SetSideInFloatMode.
I appreciate the help from you and your team a lot.
Best regards.
We are glad to know that your issue has been fixed. Please let us know if you need any other assistance. We are happy to assist you.