.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Articles >> Silverlight >> Post New Resource Bookmark and Share   

 Subscribe to Articles

Busy Indicator with DomainDataSource control

Posted By:Manas Patnaik       Posted Date: April 05, 2011    Points: 200    Category: Silverlight    URL: http://www.dotnetspark.com  

Busy Indicator with DomainDataSource control in Silverlight
 

We have seen code behind approach of Busy Indicator where based on Load operation we used to  set IsBusy property of Busyindicator as True or false.Following example shows a sample code which enables busy indicator while continuous operations and Code Behind approach

1
2
3
4
5
biLoading.IsBusy = true;
 
    //-- Do Some Work//
 
biLoading.IsBusy = false;

How ever the above approach is straight forward and this post is how to use Busy Indicator declaratively along with XAML code.As we know the DomainDataSource control enables interaction between XAML User interface and the DataContext .Mostly it used for achieving binding to specific control through XAML.

Sample code used for data binding usiing DomainDataSource control as follows

1
2
3
4
5
6
7
8
9
"True" d:DesignData="{d:DesignInstance my:CustomerPresentationModel, CreateList=true}" Height="0"
                              LoadedData="customerPresentationModelDomainDataSource_LoadedData"
                              Name="customerPresentationModelDomainDataSource"
                              QueryName="GetCustomersWithAddressQuery" Width="0"
                              LoadSize="30" PageSize="10">
    
        
    

More detail about DomainDataSource Control can be found from here.

Using BusyIndicator declaratively ,along with XAML

Well with above scenario we want to implement the Busy Indicator , not from code behind .To implement busy indicator Drag and drop the the Busy Indicator control to the silverlight page and make following changes to the xaml code.

1
2
3
"75" HorizontalAlignment="Center" Margin="0" Name="biLoading"
                       VerticalAlignment="Center" Width="200"
                       IsBusy="{Binding Path=IsBusy,  ElementName=customerPresentationModelDomainDataSource}" IsEnabled="True" />

Bind the Isbusy property of BusyIndicator to the DomainDataSourceControl , exactly same as above .


 Subscribe to Articles

     

Further Readings:

Responses

No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Find More Articles on C#, ASP.Net, Vb.Net, SQL Server and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend