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

Detecting autohide

Hi,

I have a panel that is autohid on load, I want to run some code when this panel gets displayed when user clicks on the docking tab to make it visible.

With the AutoHideAnimationStart event, I can find out about the animation start, however this event also fires when the panel goes into hide mode and I don't want my code to run in that case.

Is there another event or property I can use to achieve this?

Thanks!


1 Reply

VK Vinoth Kumar K Syncfusion Team April 9, 2008 08:02 PM UTC

Hi GZ,

Sorry for the long delay in getting back to you.

You can stop the AutoHideAnimationStart event getting fired by using the width and height of the panel. AnimationStart event get fired when the width and height of the panel is zero. Please refer to the code snippet given below:


private void dockingManager1_AutoHideAnimationStart(object sender, Syncfusion.Windows.Forms.Tools.AutoHideAnimationEventArgs arg)
{
if (arg.Control.Size.Width == 0 && arg.Control.Size.Height == 0)
{
Console.WriteLine("Animation Start");
}
}


Please refer to the sample given below which illustrates the above:

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

Let me know if you have any questions.

Regards,
Vinoth


Loader.
Live Chat Icon For mobile
Up arrow icon