Click here to Skip to main content
15,742,973 members
Articles / Desktop Programming / WPF
Posted 12 Apr 2011

Tagged as



Busy Indicator with the DomainDataSource Control

Rate me:
Please Sign up or sign in to vote.
0.00/5 (No votes)
12 Apr 2011CPOL
Using the BusyIndicator with the DomainDataSource control

We have seen a code-behind approach for the BusyIndicator where based on the Load operation, we set the IsBusy property of the BusyIndicator to true or false. The following example shows a sample code which enables the BusyIndicator during continuous operations and using the code-behind approach.

biLoading.IsBusy = true;

//-- Do Some Work//
biLoading.IsBusy = false;

The above approach is straightforward and this post is about how to use the BusyIndicator declaratively along with XAML code. As we know, the DomainDataSource control enables interaction between the XAML user interface and the DataContext. Mostly, it is used for achieving binding to a specific control through XAML.

The sample code used for data binding using the DomainDataSource control is as follows:

<riaControls:DomainDataSource AutoLoad="True" 
          d:DesignData="{d:DesignInstance my:CustomerPresentationModel, 
                        CreateList=true}" Height="0"
          QueryName="GetCustomersWithAddressQuery" Width="0"
          LoadSize="30" PageSize="10">
        <my:ADVWORKDomainContext />

More details about the DomainDataSource control can be found here.

Using the BusyIndicator Declaratively, Along with XAML

Let's say we want to implement the above BusyIndicator scenario not using the code behind. To do that, drag and drop the BusyIndicator control to the Silverlight page and make the following changes to the XAML code:

<toolkit:BusyIndicator Height="75" HorizontalAlignment="Center" 
   Margin="0" Name="biLoading"
   VerticalAlignment="Center" Width="200"
   IsBusy="{Binding Path=IsBusy, 
   IsEnabled="True" />

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


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Written By
India India
Nothing special .. I like challenges and love my critics.

Microsoft | Bangalore | India

Blog :


Comments and Discussions

-- There are no messages in this forum --