Binding IsBusy to DomainContext IsLoading

3 posts, 0 answers
  1. Stefan Buys
    Stefan Buys avatar
    22 posts
    Member since:
    Dec 2009

    Posted 22 Feb 2011 Link to this post

    When I bind a RadBusyIndicator's IsBusy property to a (RIA Services) DomainContext's IsLoading property in code, it doesn't fire on the UI.

    I am therefor not using a DomainDataSource, but binding like this through code:

    NemoDomainContext context = Common.CreateNewNemoContext();
    RadBusyIndicator biStartup = new RadBusyIndicator();
    Binding bindingEnabled = new Binding();
    bindingEnabled.Source = context;
    bindingEnabled.Path = new PropertyPath("IsLoading");
    bindingEnabled.Mode = BindingMode.OneWay;
    biStartup.SetBinding(RadBusyIndicator.IsBusyProperty, bindingEnabled);

    Any advice / ideas are welcome.

  2. Stefan Buys
    Stefan Buys avatar
    22 posts
    Member since:
    Dec 2009

    Posted 23 Feb 2011 Link to this post

    Hi All,

    I managed to find the solution to the problem, its rather sneaky, but ensure that RadBusyIndicator has the correct Content scope:

    <telerik:RadBusyIndicator x:Name="biStartup" IsBusy="False" DisplayAfter="0" BusyContent="">
                    <StackPanel Orientation="Vertical">
                        <ContentControl x:Name="ccRibbon" />
                        <ContentControl x:Name="ccMain" />

  3. DevCraft banner
  4. Teodor
    Teodor avatar
    501 posts

    Posted 25 Feb 2011 Link to this post

    Hi Stefan Buys,

    Thank you for contacting us.

    We are glad, you have found a solution to your issue.

    Just for your information, RadBusyIndicator can be prevented from showing busy indication if the UI thread is blocked (for example if the DomainContext blocks it). Therefore it is recommended that long-running operations are executed asynchronously so that the UI remains responsive. This example shows a possible scenario. 

    Hope this explains the matter. Let us know in case you have further queries.

    Best wishes,
    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
Back to Top