animation while loading wcf service

4 posts, 0 answers
  1. cielo valdoz
    cielo valdoz avatar
    33 posts
    Member since:
    Dec 2009

    Posted 07 May 2010 Link to this post

    Hi,

    Im getting data from sql database using linq but it takes time before it completes the execution. I want to have a loading animation while calling the wcf service. Pls help.

    Thanks
  2. Ross Wozniak
    Ross Wozniak avatar
    6 posts
    Member since:
    Jan 2010

    Posted 07 May 2010 Link to this post

    Hi Cielo,

    You may want to check out this post on my blog, which talks about displaying an ActivityControl every time a time-consuming operation is in progress.

    You may also want to download the source code for my Task-It (Silverlight 4) application so you can step through what I am talking about in the blog.

    Ross
  3. DevCraft banner
  4. cielo valdoz
    cielo valdoz avatar
    33 posts
    Member since:
    Dec 2009

    Posted 10 May 2010 Link to this post

    Hi,

    Thanks for the reply. I can now display animations using storyboard while calling the service. I used same loading animation on Silverlight startup, but i want to have a percentage (%) value to determine the remaining percent.
        Private Sub PopulateOptions() 
     
            'chartLayout.Visibility = Visibility.Collapsed 
            'RadProgressBar1.Visibility = Visibility.Visible 
            LoadingPopUp.IsOpen = True 
            Loading.Visibility = Visibility.Visible 
     
            Me.timer = New System.Windows.Threading.DispatcherTimer() 
            Me.timer.Interval = TimeSpan.FromMilliseconds(10) 
            AddHandler Me.timer.Tick, New EventHandler(AddressOf Me.timer_Tick) 
            Me.timer.Start() 
     
            Dim mService As DashboardService.DashboardClient = New DashboardService.DashboardClient() 
            AddHandler mService.GetCategoryGroupCompleted, AddressOf webService_GetCategoryGroupCompleted 
            AddHandler mService.GetCategoryCompleted, AddressOf webService_GetCategoryCompleted 
            AddHandler mService.GetTerminalCompleted, AddressOf webService_GetTerminalCompleted 
            AddHandler mService.GetSalesPersonCompleted, AddressOf webService_GetSalesPersonCompleted 
     
            mService.GetCategoryGroupAsync() 
            mService.GetCategoryAsync() 
            mService.GetTerminalAsync() 
            mService.GetSalesPersonAsync() 
     
        End Sub 
     
        Private Sub webService_GetSalesPersonCompleted(ByVal sender As ObjectByVal e As DashboardService.GetSalesPersonCompletedEventArgs) Handles webService.GetSalesPersonCompleted 
            cmbSalesItemSalesPerson.ItemsSource = e.Result 
            cmbSalesItemSalesPerson.SelectedValuePath = "Code" 
            cmbSalesItemSalesPerson.DisplayMemberPath = "Name" 
     
            cmbTotalSalesSalesPerson.ItemsSource = e.Result 
            cmbTotalSalesSalesPerson.SelectedValuePath = "Code" 
            cmbTotalSalesSalesPerson.DisplayMemberPath = "Name" 
     
            timer.Stop() 
            chartLayout.Visibility = Visibility.Visible 
            If chkSalesItemOption.IsChecked Then ChartSalesItem.Visibility = Windows.Visibility.Visible 
            If chkTotalSalesOption.IsChecked Then ChartTotalSales.Visibility = Windows.Visibility.Visible 
     
            LoadingPopUp.IsOpen = False 
            Loading.Visibility = Visibility.Collapsed 
     
        End Sub 
     
        Private Sub timer_Tick(ByVal sender As ObjectByVal e As System.EventArgs) 
            'LoadingText.Text = stepSize + Me.stepSize & "%" 
            'stepSize += Me.stepSize '+ "%" 
        End Sub 

    Thanks
  5. Yavor Georgiev
    Admin
    Yavor Georgiev avatar
    982 posts

    Posted 13 May 2010 Link to this post

    Hi Cielo,

     WCF operations don't really have a way to report on their progress. Please check out the following link: http://forums.silverlight.net/forums/p/169137/381135.aspx

    All the best,
    Yavor Georgiev
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Back to Top