Animate Progressbar to Value

3 posts, 0 answers
  1. Philip
    Philip avatar
    2 posts
    Member since:
    Nov 2010

    Posted 25 May Link to this post

    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. Dinko
    Admin
    Dinko avatar
    206 posts

    Posted 30 May Link to this post

    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.
  3. DevCraft banner
  4. Evgenia
    Admin
    Evgenia avatar
    1407 posts

    Posted 31 May Link to this post

    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.
Back to Top