I am trying to use the RadWindow.Alert() dialog however when I am trying to call it I get an "infinite loop". It seems the code never returns from the Win32 call. It can be seen clearly when the Alert() is executed and "debugger pause" is pressed in Visual Studio. The problem is quiet strange. I checked the demo on two additional computers. It was working with none. All three are using Windows 10. The issue also occurs for Confirm(). Please see the attached project (disguised as a .gif) as a very trivial example.
System information:
Visual Studio 2019, Project build with .NET v4.6
Windows 10
Telerik WPF v2019.3 (.NET v4.5) and Telerik WPF v2019.2 (.NET v4.5)
5 Answers, 1 is accepted
Hello Andy,
Thank you for the provided image and project.
I tried running the project in order to replicate the infinite loop at my end, however, the alert displays without any issues on my machine. I've attached a short recording for your reference.
Can you please have a look and let me know if I'm missing something of importance?
Regards,
Dilyan Traykov
Progress Telerik
No you are doing the same as myself. I attached a gif to show you that the button is clicked, nothing is shown and when the debugger is paused it is located on the Telerik Alert() method.
Might this be a problem with not available layout or translation files (based on the callstack I don't think this is the case)?
Hello Andy,
I managed to replicate the issue at my end by referencing the NoXaml binaries, which I believe is also the case in your project.
To resolve the issue in this case, you need to also merge the Telerik.Windows.Controls.Navigation.xaml dictionary:
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/Telerik.Windows.Themes.Office2016;component/Themes/System.Windows.xaml"/>
<ResourceDictionary Source="/Telerik.Windows.Themes.Office2016;component/Themes/Telerik.Windows.Controls.xaml"/>
<ResourceDictionary Source="/Telerik.Windows.Themes.Office2016;component/Themes/Telerik.Windows.Controls.Navigation.xaml"/>
</ResourceDictionary.MergedDictionaries>
Regards,
Dilyan Traykov
Progress Telerik
Hey Dilyan,
yes I am referencing NoXaml binaries. Thanks for the solution. I did not really believed that the Xaml theming is the case because the component stops working in the Win32 area. I would have expected an "empty window" to be displayed.
Hi Andy,
Actually, the call stack you provided earlier is expected.
The Alert method opens a new modal window, but since it is never closed (as it is not actually displayed) it seems as if the application has stopped responding.
Nonetheless, I hope everything now works as expected. Do let me know if any further issues or concerns arise.
Regards,
Dilyan Traykov
Progress Telerik