If we display a RadWindow ON TOP OF(very important!) a RadTileList upon a MouseDoubleClick event, an exception is thrown.
<
Window
x:Class
=
"TileViewCrash.MainWindow"
xmlns:telerik
=
"http://schemas.telerik.com/2008/xaml/presentation"
Title
=
"MainWindow"
Height
=
"350"
Width
=
"525"
>
<
Grid
>
<
telerik:RadTileList
>
<
telerik:Tile
MouseDoubleClick
=
"OnMouseDoubleClick"
/>
<
telerik:Tile
/>
</
telerik:RadTileList
>
</
Grid
>
</
Window
>
using System.Windows;
using System.Windows.Input;
using Telerik.Windows.Controls;
namespace TileViewCrash
{
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
}
private void OnMouseDoubleClick(object sender, MouseButtonEventArgs e)
{
RadWindow.Alert("Hello");
}
}
}
If we close the RadWindow while it is not on top of the RadTileList, no exception is thrown.
10 Answers, 1 is accepted
I've tried to reproduce the problem you report, but to no avail. You can check the attached sample project which illustrates my attempt. May I ask you to modify it in order to reproduce the issue and resend it back to me?
Regards,
Yoan
Telerik
The exception is thrown from your project too. Please make sure that your "Hello" RadWindow is on top of the main window when you close it.
Also, the exception will only appear in your Output window if you don't break from it in your Exception list (Ctrl+Alt+E -> CLR Exceptions -> System.ComponentModel.Win32Exception)
I had to change the .net framework since your project was using 4.5 and I have 4.5.2 installed. It's the only thing I changed.
I was not able to reproduce the problem. Please check this screencast and let me know if I am missing something.
Regards,
Yoan
Telerik
Yes, you are doing it right.
I noticed that your "Exception settings" window is not like mine. This made me realize that we are not using the same compiler. I've tried with different compilers and it seems the issue arises with VS2012 and VS2015 but does NOT happen with VS2013. Are you using VS2013? If so, please try with VS2012 or VS2015.
I had used VS2012 to create the screencast. Moreover, I've tested the same sample project using VS2015 and I was not able to reproduce the exception. Are you sure about the version of the ? Could you try our latest official version - Q1 2016?
Regards,
Yoan
Telerik
I tried with 2016.1.112.45 and got the same result.
I asked other developers here to compile and run the solution. Except for 1 developer, all were able to reproduce the issue. The developer not being able to reproduce the issue was running the trial version of Telerik. From your screencast, it seems you are too. Please try using a full version.
Ps. why are you using the trial version of your own product?
We have template projects(like the one I sent to you) which are using a trial version of our . I had tested the project using "dev" and the result was the same - no exception was thrown. Are you able to reproduce the problem without RadTileList? May I ask you to provide a screencast with the steps needed to reproduce the exception?
Regards,
Yoan
Telerik
My first screencast. Hope it goes well :) http://www.screencast.com/t/FUdSibQz7H2 If it doesn't work, I've also uploaded it on YouTube: https://www.youtube.com/watch?v=rtoXca2DTgQ
I have tried with other Telerik controls in the background (RadListBox, RadOutlookBar, RadPanelBar, RadTileView, RadToolBar and RadTreeView) and they all work fine. In fact, even RadTileList works if the MouseDoubleClick is made at the RadTileList level instead of the Tile level.
I've just tried with the 'Escape' key to close the RadWindow and that works well too. Another odd way of making it crash is to hit the 'Escape' key after clicking anywhere in the RadWindow (not necessarily clicking the "OK" button).
After testing the scenario on many different machines - we managed to reproduce it on one of them. Basically the reason for it is that one of clicks is triggering the drag drop functionality of the clicked Tile while the Alert window is closing. So what I can suggest you would be simply implement the following handler and everything should work as expected:
private
void
OnMouseDoubleClick(
object
sender, MouseButtonEventArgs e)
{
DragDropManager.SetAllowDrag((sender
as
Tile),
false
);
RadWindow.Alert(
"Hello"
);
DragDropManager.SetAllowDrag((sender
as
Tile),
true
);
}
Hope this solution would be suitable for you. I have also updated your Telerik points for your involvement.
Regards,
Kalin
Telerik