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

Loading Animator

Thread ID:

Created:

Updated:

Platform:

Replies:

114504 Nov 21,2013 05:38 PM Nov 25,2013 10:44 PM Windows Forms 2
loading
Tags: Tools
Benson Butt
Asked On November 21, 2013 05:38 PM

Using the loadingAnimator that is provided by syncfusion (AnimatedLoading_GGC-1146142389.zip), I'm trying to implement the behavior in ribbon backstage as shown in the following code snippet.

private void backStage1_SelectedIndexChanged(object sender, EventArgs e)

{

    LoadingAnimator.Wire(backstage1)

    .... doing something

    LoadingAnimator.UnWire(backstage1)

}

the image never show up, it is working fine in the main form with regular control.







{



Benson Butt
Replied On November 22, 2013 11:09 AM

Resolved.

Create a picturebox the same size as the image.  Modify the

private static void PaintControl(object sender)




{



Control ctrl = sender as Control;


if (isAnimate)




{



using (Graphics gr = ctrl.CreateGraphics())




{



ImageAnimator.UpdateFrames(Image);


//gr.DrawImage(Image, new Point(ctrl.Bounds.Width / 2, ctrl.Bounds.Height / 2));


gr.DrawImage(Image, new Point(0,0));




}


}


}

then just bringToFront() the picturebox before calling Wire, and then sendToBack when calling Unwire.

Of course, you can center the picturebox by doing the following

picturebox.left = this.width/2 - picturebox.width/2

picturebox.top = this.height/2 = picturebox.height/2


Hope it helps.




Kannan R [Syncfusion]
Replied On November 25, 2013 10:44 PM

Hi Benson,

 

Thank you for using Syncfusion products.

 

We are glad that, you have found solution for your requirement. Please let us know if you need any further assistance.

 

Regards,

Kannan.R


CONFIRMATION

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.

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.

;