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

Exception thrown with RadWindow after MouseDoubleClick

10 Answers 85 Views
TileList
This is a migrated thread and some comments may be shown as answers.
Pierre
Top achievements
Rank 1
Pierre asked on 07 Jan 2016, 03:22 PM

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="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                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

Sort by
0
Yoan
Telerik team
answered on 11 Jan 2016, 09:36 AM
Hi Pierre,

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
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Pierre
Top achievements
Rank 1
answered on 11 Jan 2016, 12:39 PM

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)

 

0
Pierre
Top achievements
Rank 1
answered on 11 Jan 2016, 12:41 PM

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.

 

0
Yoan
Telerik team
answered on 12 Jan 2016, 07:57 AM
Hello Pierre,

I was not able to reproduce the problem. Please check this screencast and let me know if I am missing something.

Regards,
Yoan
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Pierre
Top achievements
Rank 1
answered on 12 Jan 2016, 01:08 PM

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.

 

0
Yoan
Telerik team
answered on 14 Jan 2016, 09:49 AM
Hi Pierre,

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
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Pierre
Top achievements
Rank 1
answered on 14 Jan 2016, 07:42 PM

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?

 

0
Yoan
Telerik team
answered on 15 Jan 2016, 03:24 PM
Hello,

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
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Pierre
Top achievements
Rank 1
answered on 15 Jan 2016, 04:12 PM

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).

 

0
Accepted
Kalin
Telerik team
answered on 19 Jan 2016, 01:21 PM
Hello Pierre,

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
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
TileList
Asked by
Pierre
Top achievements
Rank 1
Answers by
Yoan
Telerik team
Pierre
Top achievements
Rank 1
Kalin
Telerik team
Share this question
or