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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Enabled for Floating Windows

Thread ID:





10815 Feb 12,2004 08:11 PM UTC Feb 13,2004 11:33 AM UTC WinForms 1
Tags: Tools
Melissa Ortego
Asked On February 12, 2004 08:11 PM UTC

I have a main form; this has a docking manager that has several windows that can be docked and/or floated. I want to disable the main form and all of the docking manager''s forms. When I set the Enabled property on the main form, the UI interaction with its children should be disabled as well. The docked windows get disabled, but I am still able to interact with the floating windows. One way to fix this (and probably not the best) is to enumerate through the docking manager''s controls and individually set Enabled to false for each one. Is there a better way to do this?

Administrator [Syncfusion]
Replied On February 13, 2004 11:33 AM UTC

Hi Melissa, Thanks for bringing this to our attention. I have tested for this issue here, and have observed that the floating windows are still active eventhough the HostForm is disabled. I have notified the development team in this regard, and we have logged a QA report #389 on this. Like you mentioned above, the only workaround that you could use is to iterate through the list of DockingManager''s Controls and disable all the floating windows. But please note that you cannot directly set the Control.Enabled property to false here. This is because the floating window is a slightly more complex structure than a docking window, consisting of 2 Containers within which the Control is embedded. In a floating window, the Control is hosted within a DockHost Container, and the the DockHost in turn is hosted within a FloatingForm (outer most Container). You should set the FloatingForm.Enabled to false to disable the floating window. Please refer to the code snippet below for this purpose : IEnumerator ienum = this.dockingManager1.Controls; ArrayList dockedctrls = new ArrayList(); while(ienum.MoveNext()) dockedctrls.Add(ienum.Current); foreach(Control ctrl in dockedctrls) { if (this.dockingManager1.IsFloating(ctrl)) { DockHost dhost = ctrl.Parent as DockHost; FloatingForm fform = dhost.ParentForm as FloatingForm; fform.Enabled = false; } } I have also attached the complete sample illustrating this here. Please let me know if you have any other questions. Regards, Guru Patwal Syncfusion, Inc.


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon

Live Chat Icon For mobile
Live Chat Icon