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

Can BusyIndicator Bind To More Than One Control

1 Answer 97 Views
BusyIndicator
This is a migrated thread and some comments may be shown as answers.
Jill
Top achievements
Rank 1
Jill asked on 26 Jan 2011, 12:04 AM
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?

1 Answer, 1 is accepted

Sort by
0
Teodor
Telerik team
answered on 31 Jan 2011, 11:21 AM
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>>
Tags
BusyIndicator
Asked by
Jill
Top achievements
Rank 1
Answers by
Teodor
Telerik team
Share this question
or