This is a migrated thread and some comments may be shown as answers.

Show busy indicator while doing a background job using WindowsFormsHost?

1 Answer 314 Views
BusyIndicator
This is a migrated thread and some comments may be shown as answers.
Adnan
Top achievements
Rank 1
Adnan asked on 09 Jan 2017, 10:47 AM
<telerik:RadBusyIndicator IsIndeterminate="True" Grid.Row="1" Grid.ColumnSpan="2" IsBusy="False" x:Name="MainIndicator">
    <Grid x:Name="grdChart">
         <WindowsFormsHost Name="host" Background="Black" >
         </WindowsFormsHost>
     </Grid>
</telerik:RadBusyIndicator>

 

public void ActiveXControlDataLoaded()
{
    this.Dispatcher.BeginInvoke(new System.Action(() =>
    {
           MainIndicator.IsBusy = true;
    }));
}

 

The above XAML code is showing WindowsFormsHost element that is used to host an ActiveX control.

ActiveXControlDataLoaded method will be fired by the ActiveX control whenever it has a new data record.

My problem is RadBusyIndicator is always getting behind WindowsFormsHost element when the later UI is loaded. I tried to disable WindowsFormsHost and Its ActiveX control child but RadBusyIndicator keeps disappearing. Is there any way to show RadBusyIndicator on top of WindowsFormsHost ?

Thanks in advance.

1 Answer, 1 is accepted

Sort by
0
Nasko
Telerik team
answered on 11 Jan 2017, 08:26 AM
Hi Adnan,

The observed by you behavior is an expected one when WindowsFormsHost is used in WPF project. The WinForms controls are always displayed on top of the the WPF control and this is a known limitation of the the Framework - it could be reproduced with any WPF control.

Some more information about the limitation you could find on the following link:
https://blogs.msdn.microsoft.com/dwayneneed/2013/02/26/mitigating-airspace-issues-in-wpf-applications/

As this is a limitation of the Framework not of the BusyIndicator we could not suggest you any proper approach how to resolve it.

We hope the provided information will be helpful for you.

Regards,
Nasko
Telerik by Progress
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
Tags
BusyIndicator
Asked by
Adnan
Top achievements
Rank 1
Answers by
Nasko
Telerik team
Share this question
or