Exception thrown with RadWindow after MouseDoubleClick

11 posts, 1 answers
  1. Pierre
    Pierre avatar
    23 posts
    Member since:
    Oct 2015

    Posted 07 Jan Link to this post

    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.

     

  2. Yoan
    Admin
    Yoan avatar
    1070 posts

    Posted 11 Jan Link to this post

    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
  3. UI for WPF is Visual Studio 2017 Ready
  4. Pierre
    Pierre avatar
    23 posts
    Member since:
    Oct 2015

    Posted 11 Jan in reply to Yoan Link to this post

    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)

     

  5. Pierre
    Pierre avatar
    23 posts
    Member since:
    Oct 2015

    Posted 11 Jan Link to this post

    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.

     

  6. Yoan
    Admin
    Yoan avatar
    1070 posts

    Posted 12 Jan Link to this post

    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
  7. Pierre
    Pierre avatar
    23 posts
    Member since:
    Oct 2015

    Posted 12 Jan in reply to Yoan Link to this post

    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.

     

  8. Yoan
    Admin
    Yoan avatar
    1070 posts

    Posted 14 Jan Link to this post

    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 dlls? 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
  9. Pierre
    Pierre avatar
    23 posts
    Member since:
    Oct 2015

    Posted 14 Jan in reply to Yoan Link to this post

    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?

     

  10. Yoan
    Admin
    Yoan avatar
    1070 posts

    Posted 15 Jan Link to this post

    Hello,

    We have template projects(like the one I sent to you) which are using a trial version of our dlls. I had tested the project using "dev" dlls 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
  11. Pierre
    Pierre avatar
    23 posts
    Member since:
    Oct 2015

    Posted 15 Jan in reply to Yoan Link to this post

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

     

  12. Answer
    Kalin
    Admin
    Kalin avatar
    1209 posts

    Posted 19 Jan Link to this post

    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
Back to Top
UI for WPF is Visual Studio 2017 Ready