This is a migrated thread and some comments may be shown as answers.

Targeting the BusyIndicator of PanAndZoom from Code

2 Answers 26 Views
PanAndZoomImage
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
ThiefRiver
Top achievements
Rank 1
ThiefRiver asked on 11 May 2014, 07:32 AM
I have changed the way PanAndZoomImage loads it's image to combat some memory leak issues. The solution works great, but since the image is downloaded in a separate function and the source is null until the image is downloaded and then set, the BusyIndicator is not showing up.

How can I target the PanAndZoomImage busy indicator from the code?

2 Answers, 1 is accepted

Sort by
0
ThiefRiver
Top achievements
Rank 1
answered on 13 May 2014, 08:07 AM
Found a solution
1.var busy = this.GetTemplatePart<RadBusyIndicator>("busyIndicator", false);
2.if (busy != null)
3.{
4.    busy.AnimationStyle = AnimationStyle.AnimationStyle9;
5.    busy.InitialDelay = new TimeSpan(0,0,0,0);
6.    busy.IsRunning = true;
7.}
0
Victor
Telerik team
answered on 14 May 2014, 06:51 AM
Hi Lars,

You can access any inner element of a control this way. Please keep in mind however that depending what you do with the inner element, you may put the control in an invalid state.
Your current solution looks good.

Regards,
Victor
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
PanAndZoomImage
Asked by
ThiefRiver
Top achievements
Rank 1
Answers by
ThiefRiver
Top achievements
Rank 1
Victor
Telerik team
Share this question
or