Regarding DockingManager

Hi,

I have opened a form as a tab in dockingmanager as follows:

            frmtest doc = new frmtest ();
            doc.FormBorderStyle = FormBorderStyle.None;
            this.dockingManager1.SetEnableDocking(doc, true);
            this.dockingManager1.SetDockIcon(doc, 0);
            this.dockingManager1.SetDockLabel(doc, doc.Text);
            dockingManager1.SetWindowMode(doc, WindowMode.Document);
            dockingManager1.DockAsDocument(doc);

Now I would like to open a modal form from the above opened form as a tab next to this form. Is it possible?

Thanks!


6 Replies 1 reply marked as answer

SN Sudharsan Narayanan Syncfusion Team March 2, 2022 03:44 AM UTC

Hi FARZIN,

In further analyze, Model form can’t be added as child to the control. It will be depending on the parent control by using the ShowDialog method. So, we can determine the model form as mentioned in the Microsoft Documentation. Please check the link for the more details,

Link: https://docs.microsoft.com/en-us/dotnet/api/system.windows.forms.form.modal?view=windowsdesktop-6.0

Regards,
Sudharsan



FA FARZIN March 7, 2022 11:23 AM UTC

Thanks for the response



FA FARZIN March 19, 2022 12:15 PM UTC

Hi,

Is there a way to hide the mazimize and menu button on a floating panel?

I've tried :

            dockingManager1.SetCloseButtonVisibility(panelSubMenu, false);
            dockingManager1.SetMenuButtonVisibility(panelSubMenu, false);
            dockingManager1.SetAutoHideButtonVisibility(panelSubMenu, false);
            dockingManager1.MaximizeButtonEnabled = false;
            dockingManager1.EnableContextMenu = false;



SN Sudharsan Narayanan Syncfusion Team March 21, 2022 02:03 PM UTC

Hi Farzin,

You can be able to achieve the “Hide the Menu and Maximize button in Float panel” requirement by using the Caption button collection in the StateChanged Event. Please find the attached code snippet below,

Code snippet:
 
dockingManager1.DockStateChanged += DockingManager1_DockStateChanged;
private void DockingManager1_DockStateChanged(object sender, DockStateChangeEventArgs arg) 
        { 
            if(arg.NewState == DockState.Float) 
            { 
                for (int i = 0; i < this.dockingManager1.CaptionButtons.Count; i++) 
                { 
                    if (this.dockingManager1.CaptionButtons[i].Name == "MaximizeButton" || this.dockingManager1.CaptionButtons[i].Name == "MenuButton") 
                    { 
                        this.dockingManager1.CaptionButtons.RemoveAt(i); 
                    } 
                } 
            } 
        } 
Please check the code snippet in the StateChanged event and let us know your concerns about this. We are happy to assist you.

Regards,
Sudharsan


Marked as answer

SN Sudharsan Narayanan Syncfusion Team March 22, 2022 07:19 AM UTC

Hi Farzin,

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.

Regards,
Sudharsan



FA FARZIN March 22, 2022 09:26 AM UTC

Works perfect! Thanks so much!


Loader.
Up arrow icon