We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Dock only state

Thread ID:

Created:

Updated:

Platform:

Replies:

103004 Mar 22,2012 01:51 AM Mar 29,2012 05:12 AM Windows Forms 5
loading
Tags: Tools
Maor
Asked On March 22, 2012 01:51 AM

Hi, Question please :)

can i create a "dock only" control in the docking manager?
meaning the user will not be able to detach this control from the docking to a floating window?

thanks,
Maor


Selva Ganapathy K [Syncfusion]
Replied On March 23, 2012 07:00 AM

Hi Maor,

Thank you for your interest in Syncfusion product.

You can acieve you requirement to disallow floating by setting dockingManager's DisallowFloating as true as per the following code snippet.

[Code Snippet]
this.dockingManager1.DisallowFloating = true;

Please let us know if you have any concerns.

Regards,

Selva Ganapathy K


Maor Cohen Saban
Replied On March 26, 2012 01:23 AM

Yes please,
when i set this property to 'true' i still undocked successfully panels from the docking.

anyway, there is a way to set only one control to 'dock only' state? and not disallow floating windows at all?

Thank you,
Maor


Selva Ganapathy K [Syncfusion]
Replied On March 28, 2012 12:04 AM

Hi Maor,

Thanks for the update,

You can avoid floating for a control in docking manager using "SetAllowFloating" as per the following code snippet. Also i have attached a simple sample for the same.

[Code Snippet]
this.dockingManager1.SetAllowFloating(this.panel2, false);

Please let us know if you have any concerns.

We are glad to help you out.

Regards,

Selva Ganapathy K




floatpanel_7d7a8b12.zip

Maor Cohen Saban
Replied On March 28, 2012 03:48 AM

this is not really my scenario.
i have a predefined docked control, that i want to disallow the user from pull it out of the docking.

the API of "SetAllowFloating" is not really works.

video attached.

thank you,
Maor



capture-1_d854962c.zip

Selva Ganapathy K [Syncfusion]
Replied On March 29, 2012 05:12 AM

Hi Maor,

Thanks for the update.

You can avoid the floating of a docked control using the "SetAllowFloating" while the control is in floating or dragging Please have the following code snippet for the same. And for more reference kindly look into the sample updated on March 28 2012 which has following code snippet.

[Code Snippet]
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
this.dockingManager1.DragFeedbackStop += new System.EventHandler(this.dockingManager1_DragFeedbackStop);
}

private void dockingManager1_DragFeedbackStop(object sender, EventArgs e)
{
this.dockingManager1.SetAllowFloating(this.panel2, false);
}
}

Please let us know if you have any concerns.

Regards,

Selva Ganapathy K



CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;