The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
Can you please provide me a sample of converting the dockpanel during runtime to a tabbed document through C# code. I tried converting the already existind control to a tabbed document through C# code but i was unable to do so.
BABalavasanth Syncfusion Team May 14, 2009 04:35 PM UTC
Hi Aishwarya,
Thanks for your interests in Syncfusion products.
When you have a Docking Manager control created dynamically with two dock panels in Dock side set to Left and Right, it is possible to change the DockSide value to Tabbed mode by setting the SideInDockedMode property for the dock panel and setting the TargetNameInDockMode. Kindly make use of the code snippet for more idea.
//creating first panel StackPanel stackPanel1 = new StackPanel(); DockingManager.SetSideInDockedMode(stackPanel1, DockSide.Left); DockingManager.SetState(stackPanel1, DockState.Dock); DockingManager.SetHeader(stackPanel1, "StackPanel"); stackPanel1.Name = "stackPanel";
//creating second panel DockPanel panel1 = new DockPanel(); panel1.Name = "dockpanel"; DockingManager.SetSideInDockedMode(panel1, DockSide.Right); DockingManager.SetHeader(panel1, "dockpanel"); //DockingManager.SetTargetNameInDockedMode(panel1, "stackPanel");
//adding the children DocManager1.Children.Add(stackPanel1); DocManager1.Children.Add(panel1);
Dynamically changing can be done as follows
//changing the side in Dock Mode to tabbed state DockingManager.SetSideInDockedMode(panel1, DockSide.Tabbed);
//setting the Target Name in Docked Mode DockingManager.SetTargetNameInDockedMode(panel1, "stackPanel"); UpdateLayout();
This is the way it has to be done. But unfortunately on analyzing we found that we have some issues now while we change to the TabbedMode. Currently we are working on fixing this issue, we will update you once the issue gets fixed.