)
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

What is the event used to detect a WinForms XPTaskBar animation?

Platform: WinForms |
Control: XPTaskbar |
Published Date: April 30, 2011 |
Last Revised Date: February 6, 2020

Animation events

The following events can be subscribed to detect an XPTaskBarBox animation.

1. BeforeAnimation

2. AfterAnimation

BeforeAnimation - This event is fired before the XPTaskBarBox expands and collapses.

AfterAnimation - The event is fired after the XPTaskBarBox expands and collapses.

C#

//Raises the BeforeAnimation event.
this.xpTaskBarBox1.BeforeAnimation += new EventHandler(xpTaskBarBox1_BeforeAnimation);
//Raises the AfterAnimation event.
this.xpTaskBarBox1.AfterAnimation += new EventHandler(xpTaskBarBox1_AfterAnimation);
//The event is raised before the TaskBarBox expands and collapses.        
void xpTaskBarBox1_BeforeAnimation(object sender, EventArgs e)
{
    this.richTextBox1.AppendText("\n Before Animation fired on XPTaskBarBox1");
}
//The event is raised after the TaskBarBox expands and collapses.
void xpTaskBarBox1_AfterAnimation(object sender, EventArgs e)
{
    this.richTextBox1.AppendText("\n After Animation fired on XPTaskBarBox1");
}

VB

'Raises the BeforeAnimation event.
AddHandler xpTaskBarBox1.BeforeAnimation, AddressOf xpTaskBarBox1_BeforeAnimation
'Raises the AfterAnimation event.
AddHandler xpTaskBarBox1.AfterAnimation, AddressOf xpTaskBarBox1_AfterAnimation
'The event is raised before the TaskBarBox expands and collapses.        
Private Sub xpTaskBarBox1_BeforeAnimation(ByVal sender As Object, ByVal e As EventArgs)
   Me.richTextBox1.AppendText(Constants.vbLf & " Before Animation fired on XPTaskBarBox1")
End Sub
'The event is raised after the TaskBarBox expands and collapses.
Private Sub xpTaskBarBox1_AfterAnimation(ByVal sender As Object, ByVal e As EventArgs)
   Me.richTextBox1.AppendText(Constants.vbLf & " After Animation fired on XPTaskBarBox1")
End Sub

 

Note:

You would typically do this when you have to resize your form (or some other control in the form) based on the current size of the XPTaskBar control.

 

Before firing XPTaskBarBox animation event

Figure 1: Before firing XPTaskBarBox animation event

After firing XPTaskBarBox animation event

Figure 2: After firing XPTaskBarBox animation event

Samples:

C#: XPTaskBar_Animation_C#

VB: XPTaskBar_Animation_VB

Reference link: https://help.syncfusion.com/windowsforms/xptaskbar/xptaskbar-events

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