Targeting the BusyIndicator of PanAndZoom from Code

3 posts, 0 answers
  1. ThiefRiver
    ThiefRiver avatar
    12 posts
    Member since:
    Mar 2014

    Posted 11 May 2014 Link to this post

    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. ThiefRiver
    ThiefRiver avatar
    12 posts
    Member since:
    Mar 2014

    Posted 13 May 2014 Link to this post

    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.}
  3. DevCraft banner
  4. Victor
    Admin
    Victor avatar
    1351 posts

    Posted 14 May 2014 Link to this post

    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.

     
Back to Top