I have got docking working just fine, but all the docked windows(Docked or floating) only have a title, with no supporting buttons such as auto-hide.
I have tried the enable/this/that functions apart of docking manager, but this makes no difference.
Here's a small bit of my code, in case it helps spot the problem.
public void SetupDock()
{
this.dockingManager1 = new Syncfusion.Windows.Forms.Tools.DockingManager(this.components);
this.dockingManager1.ThemesEnabled = false;
this.dockingManager1.HostControl = this;
this.dockingManager1.VisualStyle = Syncfusion.Windows.Forms.VisualStyle.VS2010;
this.dockingManager1.AutoHideEnabled = true;
dockingManager1.EnableDocumentMode = true;
DockSceneGraph = new DSceneGraph();
DockContentBrowser = new DContentBrowser();
DockNodeEditor = new DNodeInspector();
DockConsoleOutput = new DConsoleOutput();
DockSceneView = new DSceneView();
DockGameView = new DSceneView();
dockingManager1.DocumentWindowSettings.ShowCloseButton = false;
dockingManager1.SetAutoHideButtonVisibility(DockSceneGraph, true);
this.dockingManager1.SetEnableDocking(DockSceneGraph, true);
this.dockingManager1.SetEnableDocking(DockContentBrowser, true);
this.dockingManager1.SetEnableDocking(DockNodeEditor, true);
this.dockingManager1.SetEnableDocking(DockConsoleOutput, true);
dockingManager1.DockAsDocument(DockSceneView);
dockingManager1.DockAsDocument(DockGameView);
dockingManager1.SetWindowMode(DockSceneView, WindowMode.Document);
dockingManager1.SetWindowMode(DockGameView, WindowMode.Document);
//this.dockingManager1.SetEnableDocking(DockSceneView, true);
this.dockingManager1.SetDockLabel(DockSceneGraph, "Scene Graph");
this.dockingManager1.SetDockLabel(DockContentBrowser, "Content Browser");
this.dockingManager1.SetDockLabel(DockNodeEditor, "Node Editor");
this.dockingManager1.SetDockLabel(DockConsoleOutput, "Console");
this.dockingManager1.SetDockLabel(DockSceneView, "Scene");
this.dockingManager1.SetDockLabel(DockGameView, "Game");
this.dockingManager1.DockControl(DockConsoleOutput, this, DockingStyle.Bottom, 200);
this.dockingManager1.DockControl(DockContentBrowser, DockConsoleOutput, DockingStyle.Tabbed, 200);
this.dockingManager1.DockControl(DockSceneGraph, this, Syncfusion.Windows.Forms.Tools.DockingStyle.Left, 250);
this.dockingManager1.DockControl(DockNodeEditor, this, DockingStyle.Right, 250);
//this.dockingManager1.DockControl(DockSceneView, this, DockingStyle.Fill, 200);
dockingManager1.SetAutoHideButtonVisibility(DockSceneGraph, true);
this.dockingManager1.SetMenuButtonVisibility(DockSceneGraph, true);
}
And my other problem is that
dockingManager1.DocumentWindowSettings.ShowCloseButton = false;
does not work, the document docked windows still have close buttons.
Here is a pic of the app running.
Hi Anthony Wells,
We
are validating the reported issue. We will validate and update you in two
business days on or before 10th July 2023. We appreciate your patience until
then.
Regards,
Vignesh
For Query1, you can enable auto-hide or close buttons with the below code snippets. Please refer to the attached sample for your reference.
Code Snippets:
|
this.dockingManager1.CaptionButtons.Add(new Syncfusion.Windows.Forms.Tools.CaptionButton(Syncfusion.Windows.Forms.Tools.CaptionButtonType.Close, "CloseButton")); this.dockingManager1.CaptionButtons.Add(new Syncfusion.Windows.Forms.Tools.CaptionButton(Syncfusion.Windows.Forms.Tools.CaptionButtonType.Pin, "PinButton")); this.dockingManager1.CaptionButtons.Add(new Syncfusion.Windows.Forms.Tools.CaptionButton(Syncfusion.Windows.Forms.Tools.CaptionButtonType.Maximize, "MaximizeButton")); this.dockingManager1.CaptionButtons.Add(new Syncfusion.Windows.Forms.Tools.CaptionButton(Syncfusion.Windows.Forms.Tools.CaptionButtonType.Restore, "RestoreButton")); this.dockingManager1.CaptionButtons.Add(new Syncfusion.Windows.Forms.Tools.CaptionButton(Syncfusion.Windows.Forms.Tools.CaptionButtonType.Menu, "MenuButton")); |
For Query2, dockingManager1.DocumentWindowSettings.ShowCloseButton = false; (no way to disable document close button)
By using ShowCloseButton, you can show/hide the close button in the DocumentWindow.
Furthermore we don't have direct support to hide the close button for the DocumentTab. We are still searching for a workaround for this solution. We will validate and update you on or before 12th July 2023.
You can show/hide the close button for the document tab by using the below code snippets. Please refer to the attached sample for your reference.
Code Snippets:
|
if (dockingManager1.GetType() != null) { PropertyInfo property = dockingManager1.GetType().GetProperty("DocumentContainer", BindingFlags.Instance | BindingFlags.NonPublic); if (property != null) { var source = property.GetValue(dockingManager1, null);
if (source != null) { TabbedMDIManager documentContainer = (TabbedMDIManager)source; if (documentContainer != null && documentContainer.TabGroupHosts != null) { foreach (TabHost tabHost in documentContainer.TabGroupHosts) { if (tabHost != null && tabHost.MDITabPanel != null) { TabControlAdv tabControl = tabHost.MDITabPanel as TabControlAdv;
if (tabControl != null) { tabControl.ShowTabCloseButton = false; } } } } } } } |