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. Image for the cookie policy date
close icon

Docking information at run time

Hi,
I need to keep track of what form certain form is docked to.
If I use OnDockAllow, I do not know whether the form was docked or not.
When I use OnDockStateChanged I do not know the target of the docking.
How can I know who is docked to who?

I'm using version 4.2.
Thanks,
Adi


4 Replies

AD Administrator Syncfusion Team March 26, 2008 07:33 AM UTC

Hi Adi,

Thank you for your interest in Syncfusion Products.

If your intention is to know which control's docking position is changed and the its docking style, please find the code snippet that illustrates this behaviour:

private void dockingManager1_DockStateChanged(object sender,

Syncfusion.Windows.Forms.Tools.DockStateChangeEventArgs arg)
{
if (dockingManager1.IsFloating(arg.Controls[0]))
{
MessageBox.Show(arg.Controls[0].Name + "is " + arg.Controls[0].Name.ToString() + " is in floating state");
}

else
{
MessageBox.Show(arg.Controls[0].Name + "is " + arg.Controls[0].Name.ToString() + "is docked to" +

dockingManager1.GetDockStyle(arg.Controls[0]).ToString());
}

}

Please find the simple sample in the following link:

http://websamples.syncfusion.com/samples/Tools.Windows/F72511/main.htm

If I have misunderstood your requirement, could you please explain me in detail of you requirement so that I could work in depth and provide you a better solution?

Please let me know if any concerns.

Regards,
Fathima



AD Adi March 26, 2008 09:34 AM UTC

Hi,
Thank you for your replay but it does not answer my question.
I'm asking who this ctrl is docked to, in case I have a ctrl that is not docked to a docking manager but to another form.
I need this information for layout persistence.
Unfortunately, I can not use Syncfusion built in mechanism due to existing implementation of persistence.
Regards,
Adi




AD Administrator Syncfusion Team April 8, 2008 12:41 PM UTC

Hi Adi,

Thank you for your interest in Syncfusion Products.

Please find the simple sample in the following link:

http://websamples.syncfusion.com/samples/Tools.Windows/F72511_1/main.htm

In the above sample, the panel is docked to the Form2 without using docking manager. When we click the button it displays the parent form in which the panel is docked.

If I have misunderstood your requirement, could you please provide me a simple sample, so that I could work out and provide you a better solution at the earliest?

Please let me know if any concerns.

Regards,
Fathima



AD Adi April 15, 2008 06:04 AM UTC

Thank you Fathima,
I have opened a direct track incident for this issue.
Adi


Loader.
Live Chat Icon For mobile
Up arrow icon