)
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

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

Platform: WinForms |
Control: DockingManager |
Published Date: November 14, 2016 |
Last Revised Date: December 4, 2019

Visibility of DockingManager

In DockingManager, 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.

C#

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;
    else
       arg.RollState = AutoHideRollState.RolledOut;
    if (arg.RollState == Syncfusion.Windows.Forms.Tools.AutoHideRollState.RolledIn)
    {
       Debug.WriteLine("Control Visibility : Visible");
    }
    else
    {
       Debug.WriteLine("Control Visibility : Hidden");
    }
}

 

VB

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
    Else
       arg.RollState = AutoHideRollState.RolledOut
    End If
    If arg.RollState = Syncfusion.Windows.Forms.Tools.AutoHideRollState.RolledIn Then
       Debug.WriteLine("Control Visibility : Visible")
    Else
       Debug.WriteLine("Control Visibility : Hidden")
    End If
End Sub

 

Samples:

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

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

 

2X faster development

The ultimate WinForms UI toolkit to boost your development speed.
ADD COMMENT
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
Live Chat Icon