Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
845
BusyIndicator not displaying when view is displayed inside a XamDialogWindow
posted

We have the following view:

<UserControl x:Class="DetailedSalesView" ...
  <Grid x:Name="LayoutRoot">
    <toolkit:BusyIndicator x:Name="activityControl"
IsBusy="{Binding IsBusy}"
BusyContent="{Binding}" >
<Grid> The rest of the control </Grid> </toolkit:BusyIndicator> </Grid> </UserControl>

When this is instantiated normally the busy indicator appears as expected. The view model implements `INotifyPropertyChanged` and has the property `IsBusy` which gets set at the appropriate places.

We are trying to display this same view in a XamDialogWindow and everything is working except for the BusyIndicator.

The code we have is:

    this._eventAggregator = container.Resolve<IEventAggregator>();

Where `container` is an `IUnityContainer`

    var childViewModel = new DetailedSalesVM(dataService, _eventAggregator);
    var childView = new DetailedSalesView(_eventAggregator, childViewModel);

    var window = new XamDialogWindow
    {
        Width = 800,
        Height = 600,
        Content = childView,
        StartupPosition = StartupPosition.Center,
        Header = headerText
    };

    parent.Children.Add(window);

Where `dataService` is a class that implements the RIAServices connection to the database, and `parent` is the `UIElement` we wish to display the dialog window in.

The view populates correctly and the `IsBusy` property on the view model is set as expected, but the `BusyIndicator` just doesn't display.

What are we missing?

Parents
No Data
Reply
  • 138253
    Verified Answer
    Offline posted

    Hello Chris,

    It has been a while since you have made your post, in case you still need support I will be glad to assist you further. I suppose the other community members can benefit from this answer as well. I have been looking into your post and I modified your sample, so now it works as you want. Basically I used Dispatcher to set the Content of the XamDialogWindow, because the BusyIndicator renders faster and it seems like that it remains below the Window.

    Feel free to write me if you have further questions.

Children
No Data