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

DockControlDeactivated event in DockingManager

Thread ID:





1029 Sep 16,2002 05:12 AM UTC Sep 20,2002 06:57 AM UTC WinForms 6
Tags: Tools
Dadang Rachmad
Asked On September 16, 2002 05:12 AM UTC

Can I differentiate the event is pinned (pin click) or closed (button close click).

Prakash S [Syncfusion]
Replied On September 16, 2002 06:47 PM UTC

You can use the DockingManager.DockStateChanged and DockingManager.DockVisibilityChanged events to determine whether a control is being autohidden using the pushpin or closed through the 'X' button. The DockStateChanged event is fired whenever a control enters or exits the autohide mode. Querying for DockingManager.GetAutoHideMode() on the control should allow you to ascertain the autohide enter/exit state. The DockVisibilityChanged event, on the other hand, is fired only when the control is hidden/shown either by the DockingManager.SetDockVisibility() method or by clicking the Close button. Querying for the control's visibility state through the GetDockVisibility() method should allow you to determine whether the control is being hidden or shown. Prakash Syncfusion, Inc.

Dadang Rachmad
Replied On September 17, 2002 11:34 AM UTC

Thank you, what I need most is the DockVisibilityChanged I want to use the GetAutoHideMode but I want to get the control which name is "XXX" by iterating the DockingManager. It always failed in DockingManager1.Controls.Current. Whats wrong? dim controlName as string = "XXX" dim control as control DockingManager1.Controls.Reset() While DockingManager1.Controls.MoveNext control = DockingManager1.Controls.Current If control.Name = controlName Then Exit While End If End While

Prakash S [Syncfusion]
Replied On September 17, 2002 02:08 PM UTC

Hi, This seems like an implementation issue. You should not have any trouble accessing a docked control through it's Name property. Is it possible that the control may not have been dock-enabled? Please try to provide us with a sample that shows the problem. Thanks, Prakash Syncfusion, Inc.

Dadang Rachmad
Replied On September 17, 2002 10:42 PM UTC

Thanks the sample is in the mainform.vb but disable by remarks that I send for the topic "need to access textbox.text"

Prakash S [Syncfusion]
Replied On September 19, 2002 03:19 PM UTC

The problem was being caused by your code calling DockingManager.Controls several times; each call was returning a fresh instance of the collection's enumerator and consequently IEnumerator.Current was being accessed on a non-positioned instance. Modifying the code as shown below takes care of the problem, Dim enumerator As IEnumerator enumerator = Me.DockingManager1.Controls enumerator.Reset() While enumerator.MoveNext control = enumerator.Current If control.Name = "Identity" Then controlRet = control Exit While End If End While Prakash Syncfusion, Inc.

Dadang Rachmad
Replied On September 20, 2002 06:57 AM UTC

Thanks a lot. Best regards Dadang Rachmad


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