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

Inserted in the percentage of progress BusyContent

3 Answers 149 Views
BusyIndicator
This is a migrated thread and some comments may be shown as answers.
Cristina
Top achievements
Rank 1
Cristina asked on 13 Dec 2010, 08:08 PM
Hi, I have in my project BusyIndicator control. Works great, but I would add in the BusyContent an indicator with the percentage of progress as they have in the example http://demos.telerik.com/silverlight/ # BusyIndicator / Configurator. I would appreciate an example code.
Thank you very much

3 Answers, 1 is accepted

Sort by
0
Teodor
Telerik team
answered on 14 Dec 2010, 09:48 AM
Hi Cristina,

To achieve that you need to set the following:

  • ProgressValue property of the RadBusyIndicator (value from 1 to 100), whenever you know in your code what progress you have made
  • IsIndeterminate property of the RadBusyIndicator - set it to false to enable it to report progress
  • BusyContent property of the RadBusyIndicator (optional) - in case you need for instance to write how many percent have passed.


Sample code for how all this can be implemented is just at the same example you have referred:
http://demos.telerik.com/silverlight/#BusyIndicator/Configurator

Just click on View Code and see the declaration in XAML:

<telerik:RadBusyIndicator x:Name="busyIndicator"
                IsBusy="{Binding IsBusy}"
                IsIndeterminate="{Binding IsIndeterminate}"
                ProgressValue="{Binding ProgressValue}"
                BusyContent="{Binding BusyContent}"
                DisplayAfter="{Binding DisplayAfter}">
            <Image Source="../Images/BusyIndicator/Scheduler.png" Style="{StaticResource AntiAliasedImageStyle}" />
        </telerik:RadBusyIndicator>

You can see how the properties can be set in the BusyIndicatorViewModel.cs file.

Hope this helps. Let us know in case you need further assistance.

Greetings,
Teodor
the Telerik team
Browse the videos here>> to help you get started with RadControls for Silverlight
0
Cristina
Top achievements
Rank 1
answered on 14 Dec 2010, 12:14 PM
Teodor, thanks for responding. As I commented in my code I have put everything he says in the above example and see only the busyIndicator without progress in percentage. The truth is I do not know what I'm doing wrong. This is my code:
<telerik:RadBusyIndicator x:Name="busyIndicator"
                                      BusyContent="{Binding BusyContent}"                                      
                                      IsBusy="{Binding IsBusy}"
                                      ProgressValue="{Binding ProgressValue}"
                                      Style="{StaticResource RadBusyIndicatorStyle1}"
                                      IsIndeterminate="{Binding IsIndeterminate}"
                                      >               

And BusyIndicatorViewModel.cs code is the same as the example.
Again I would appreciate a sample project so I can determine what my error.
Thanks
0
Teodor
Telerik team
answered on 20 Dec 2010, 11:10 AM
Hello Cristina,

Please accept our apology on the late response. 

Find attached a solution that shows how progress can be reported. Please note that we set the IsIndeterminate to false in the ViewModel's constructor:

public BusyIndicatorViewModel()
{
    this.IsIndeterminate = false;
    this.BusyContent = "Loading...";
    this.IsBusy = true;
     
    progressValueTimer = new DispatcherTimer();
    progressValueTimer.Interval = TimeSpan.FromMilliseconds(500);
    progressValueTimer.Tick += OnProgressValueTimerTick;
    progressValueTimer.Start();
}

Hope this helps. Let us know in case you need more assistance.

Best wishes,
Teodor
the Telerik team
Browse the videos here>> to help you get started with RadControls for Silverlight
Tags
BusyIndicator
Asked by
Cristina
Top achievements
Rank 1
Answers by
Teodor
Telerik team
Cristina
Top achievements
Rank 1
Share this question
or