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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to find the control visibility when the AutoHideAnimation starts in WinForms Docking Manager?

Platform: WinForms |
Control: DockingManager

Visibility of DockingManager

In WinForms Docking Manager, the control visibility can be determined by handling the event named AutohideAnimationStart event.

If the control is autohidden before the animation starts, then the size of the display rectangle will be empty. Hence by ensuring the size of the display rectangle the visibility of the control can be determined in the AutoHideAnimationStart event. The following code example demonstrates the same.


void dockingManager1_AutoHideAnimationStart(object sender, Syncfusion.Windows.Forms.Tools.AutoHideAnimationEventArgs arg)
    //Calculating display rectangle to determine whether RollState is In or Out
    DockHost dh = arg.Control.Parent as DockHost;
    if (dh.DisplayRectangle != Rectangle.Empty)
       arg.RollState = AutoHideRollState.RolledIn;
       arg.RollState = AutoHideRollState.RolledOut;
    if (arg.RollState == Syncfusion.Windows.Forms.Tools.AutoHideRollState.RolledIn)
       Debug.WriteLine("Control Visibility : Visible");
       Debug.WriteLine("Control Visibility : Hidden");



Private Sub dockingManager1_AutoHideAnimationStart(ByVal sender As Object, ByVal arg As Syncfusion.Windows.Forms.Tools.AutoHideAnimationEventArgs)
    'Calculating display rectangle to determine whether RollState is In or Out
    Dim dh As DockHost = TryCast(arg.Control.Parent, DockHost)
    If dh.DisplayRectangle <> Rectangle.Empty Then
       arg.RollState = AutoHideRollState.RolledIn
       arg.RollState = AutoHideRollState.RolledOut
    End If
    If arg.RollState = Syncfusion.Windows.Forms.Tools.AutoHideRollState.RolledIn Then
       Debug.WriteLine("Control Visibility : Visible")
       Debug.WriteLine("Control Visibility : Hidden")
    End If
End Sub



C#: https://www.syncfusion.com/downloads/support/directtrac/general/AUTOHI~11716454616.ZIP

VB: https://www.syncfusion.com/downloads/support/directtrac/general/ze/AutoHideVisibility_VB-209878711


2X faster development

The ultimate WinForms UI toolkit to boost your development speed.
You must log in to leave a comment

Please sign in to access our KB

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

Up arrow icon

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