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

Animate Progressbar to Value

2 Answers 15 Views
ProgressBar
This is a migrated thread and some comments may be shown as answers.
Mike
Top achievements
Rank 1
Mike asked on 26 May 2016, 03:23 AM

Hello,

I have a number of progress bars in a bound listbox (MVVM) and I would like to animate each Progress Bar from 0 to "Value" when the Value property changes in the item it is bound to. I understand that I should be using the VisualStateManager but am unsure how to do this with an item in a bound list (I have very little experience with the VisualStateManager and animations).

Would this be possible?

Thanks.

2 Answers, 1 is accepted

Sort by
0
Dinko
Telerik team
answered on 30 May 2016, 04:43 PM
Hi Philip,

We need more time to check your scenario. We will contact you as soon as we have more information about your case.

Regards,
Dinko
Telerik
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
0
Evgenia
Telerik team
answered on 31 May 2016, 11:35 AM
Hi Philip,

To be honest Binding a control's property in XAML to a CLR property in the ViewModel is very common WPF question and it doesn't really relate to our RadProgressBar.  What you really need is something like:

<telerik:RadProgressBar Minimum="0" Maximum="0" Value="{Binding CurrentProgress}" />

In your ViewModel you can do: 

private double _currentProgress;
public double CurrentProgress
{
    get { return _currentProgress; }
    private set
    {
        _currentProgress = value;
        OnPropertyChanged("CurrentProgress");
    }
}

If demanded you might also create a Minimum and Maximum properties in your ViewModel and bind to them as well. Let me know how this works on your side and whether you need some additional help.

Regards,
Evgenia
Telerik
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
Tags
ProgressBar
Asked by
Mike
Top achievements
Rank 1
Answers by
Dinko
Telerik team
Evgenia
Telerik team
Share this question
or