RadBusyIndicator while loading window

2 posts, 0 answers
  1. Paweł
    Paweł avatar
    46 posts
    Member since:
    May 2013

    Posted 19 Jun 2013 Link to this post

    Hi.
    I've added RadBusyIndicator to my window, so it's looks like :
        <telerik:RadBusyIndicator Name="rbi" IsBusy="True" IsIndeterminate="False">
        <Grid>
            
            <Grid.RowDefinitions>

    (......)

    //all grids/wrappanels/buttons/radgridviews goes here

        </Grid>
        </telerik:RadBusyIndicator>
    </Window>

    And in window i've added method .Loaded, so it changes busyIndicator isBusy value to false.
    Problem is that, when im pressed button to open this window all i can see is white screen (without anything), that tooks couple seconds, and then just viewing all controls in window.
    How can i force busyIndicator to work while window isn't loaded?

    Thanks!
  2. Vladi
    Admin
    Vladi avatar
    744 posts

    Posted 24 Jun 2013 Link to this post

    Hi,

    It seems that you are trying to show the RadBusyIndicator control while the UI is rendering which is causing this behavior. The BusyIndicator as all UI controls is rendered in the UI thread and if that thread is frozen it will not show.

    I would recommend you to set the IsBusy not in the Loaded event of the Window as this event would be called after all of the controls are rendered (during which time the UI thread is frozen) but for example while the data from the controls is being fetched (possibly with the use of BackgroundWorker). Hope this is helpful.

    Regards,
    Vladi
    Telerik

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. UI for WPF is Visual Studio 2017 Ready
Back to Top