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
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:
publicboolIsRdds1Busy //bind the first RDDS's IsBusy to this
{
get
{
returnthis.isRdds1Busy;
}
set
{
this.isBusy = value;
this.OnPropertyChanged("IsRdds1Busy");
this.OnPropertyChanged("IsBusy");
}
}
publicboolIsRdds2Busy //bind the second RDDS's IsBusy to this
{
get
{
returnthis.isRdds2Busy;
}
set
{
this.isBusy = value;
this.OnPropertyChanged("IsRdds2Busy");
this.OnPropertyChanged("IsBusy");
}
}
publicboolIsBusy //bind the RadBusyIndicator's IsBusy to this
{
get
{
returnthis.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>>