Can BusyIndicator Bind To More Than One Control

2 posts, 0 answers
  1. Jill
    Jill avatar
    20 posts
    Member since:
    Nov 2010

    Posted 25 Jan 2011 Link to this post

    Hi All,

    Can I bind a busy indicator control to more than one control? It works great when I bind it to a RDDS for example. But what if I have more than one domain data service on my page, do I need to create more than one indicator?
  2. Teodor
    Admin
    Teodor avatar
    501 posts

    Posted 31 Jan 2011 Link to this post

    Hello Chris,

    Thank you for contacting us.

    Typically, in Silverlight 4 you cannot bind a property to multiple sources. However, you may use a custom MultiBinding solution (like this) which could help you achieve your goal through XAML

    As another workaround for avoiding multiple RadBusyIndicators, if you have a ViewModel class, you can create 3 properties like this:

    public bool IsRdds1Busy //bind the first RDDS's IsBusy to this
    {
        get
        {
            return this.isRdds1Busy;
        }
        set
        {
            this.isBusy = value;
            this.OnPropertyChanged("IsRdds1Busy");      
        this.OnPropertyChanged("IsBusy");
        }
    }
     
    public bool IsRdds2Busy //bind the second RDDS's IsBusy to this
    {
        get
        {
            return this.isRdds2Busy;
        }
        set
        {
            this.isBusy = value;
            this.OnPropertyChanged("IsRdds2Busy");
            this.OnPropertyChanged("IsBusy");
        }
    }
     
    public bool IsBusy //bind the RadBusyIndicator's IsBusy to this
    {
        get
        {
            return this.IsRdds1Busy || this.IsRdds2Busy;
        }
    }

    Hope this guides you to a right direction. Let us know in case you need further assistance.

    Regards,
    Teodor
    the Telerik team
    Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
  3. DevCraft banner
Back to Top