Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / Silverlight > ProgressBar > Example on progress while calling WCF ?

Not answered Example on progress while calling WCF ?

Feed from this thread
  • NS Master avatar

    Posted on Sep 19, 2008 (permalink)

    Hello,
    On my usercontrol load, I do a call to a WCF service to get some data.
    There is a small delay while doing this, so I thought by using the progressbar while getting the data.

    I find examples on the web using WebClient to do this, but I want to use this using a async call eg:

    proxy.GetMyContextInfoCompleted += (sender2, e2) =>  
                {  
                    C = e2.Result;  
                     
                };  
     
                proxy.GetMyContextInfoAsync(); 
    Any ideas on how to do this ?

    Thanks,

    Reply

  • Valentin.Stoychev Valentin.Stoychev admin's avatar

    Posted on Oct 8, 2008 (permalink)

    Hello Nicolas,

    My apologies with the much delayed answer. So - what type of progress you need to display. Do you have the percent value that you want to display of you want something that will loop endlessly until you tell it to stop?

    Did you check the online examples for the RadProgressBar?

    http://demos.telerik.com/silverlight

    All the best,
    Valentin.Stoychev
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.

    Reply

  • NS Master avatar

    Posted on Oct 8, 2008 (permalink)

    Hi Valentin,
    Thanks for your anwser.
    I was able to solve this myself a while ago.

    Regards,
    Nicolas

    Reply

  • Kamachi avatar

    Posted on Mar 19, 2009 (permalink)

    Hi Nicolas,

    How did you solve the problem, I am trying to do the same display an progress bar while the app is waiting for response from WCF call. Any inputs would be appreciated.

    thanks,

    Ravi

    Reply

  • NS Master avatar

    Posted on Apr 7, 2009 (permalink)

    Hi Ravi,
    Typically I do a small increase of the progressbar using a Timer during the Async call. When the async call is completed I update the progressbar to it's max value :-)

    void usrCtrlChangePassword_Loaded(object sender, RoutedEventArgs e)  
    {  
       grdDetail.Visibility = Visibility.Collapsed;  
       rpbProgress.Visibility = Visibility.Visible;  
        
       this.timer = new System.Windows.Threading.DispatcherTimer();  
       this.timer.Interval = TimeSpan.FromMilliseconds(10.0);  
       this.timer.Tick += new EventHandler(timer_Tick);  
       this.timer.Start();  
                  
       ADDCInfo.DomainControllerInfoClient DIC = new ADPwdChange.ADDCInfo.DomainControllerInfoClient();  
                DIC.getDomainControllersCompleted += new EventHandler<ADPwdChange.ADDCInfo.getDomainControllersCompletedEventArgs>(DIC_getDomainControllersCompleted);  
                DIC.getDomainControllersAsync();  

     void timer_Tick(object sender, EventArgs e)  
            {  
                rpbProgress.Value += 50;  
            }  
     
            void DIC_getDomainControllersCompleted(object sender, ADPwdChange.ADDCInfo.getDomainControllersCompletedEventArgs e)  
            {  
                List<myDomainController> myDCList = new List<myDomainController>();  
                myDCList = e.Result;  
                rcbDomain.DataContext = myDCList;  
                rcbDomain.ItemsSource = myDCList;  
     
                var query = (from p in myDCList where p.Description == "EMEA" select p).FirstOrDefault();  
                rcbDomain.SelectedItem= query;  
     
                this.timer.Stop();  
                rpbProgress.Value = rpbProgress.Maximum;  
                grdDetail.Visibility = Visibility.Visible;  
                rpbProgress.Visibility = Visibility.Collapsed;  
     
            } 

    Reply

  • Paolo Master avatar

    Posted on Sep 14, 2009 (permalink)

    Excuse me NS,
    the way you've provided doesn't relate to the lenght of the wcf response size...it's almost a progress without real proportion...am I right?
    Thanks
    Paolo

    Reply

  • balaji avatar

    Posted on Oct 27, 2009 (permalink)

    Hi There,
    I Too Have the Same Problem.
    Like mi need to Display the Progress bar until the Response time of WCF Service.
    Help Appreciated.
    Thanks
    Regards
    N.Balaji

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / Silverlight > ProgressBar > Example on progress while calling WCF ?
Related resources for "Example on progress while calling WCF ?"

Silverlight ProgressBar Features  |  Documentation  |  Demos  |  Telerik TV  |  Self-Paced Trainer  ]