Closing a RadWindow crash my application

6 posts, 0 answers
  1. Christie Admin
    Christie Admin avatar
    239 posts
    Member since:
    Aug 2013

    Posted 29 Sep 2014 Link to this post

    Hi,

    I'm using Telerik V2012.2.912.35 on a Windows 7 OS and when I minimized my RadWindow to my taskbar, if I bring my mouse over the application on the taskbar I see a small window representing my RadWindow, If I click on the little red X in the upper right corner my application crash.

    Here is the code I use to create an instance and display my RadWindow:

    mSignatureFormOpened = new SignatureForm();
    mSignatureFormOpened.ShowDialog();

    When I close it, I have to following exception but when the WindowState is normal or maximized everything are fine:

    System.InvalidOperationException was unhandled by user code
      Message="Impossible de définir Visibility à Visible ou d'appeler Show, ShowDialog ou Close lorsque la fenêtre est en cours de fermeture."
      Source="PresentationFramework"
      StackTrace:
           à System.Windows.Window.VerifyNotClosing()
           à System.Windows.Window.InternalClose(Boolean shutdown, Boolean ignoreCancel)
           à System.Windows.Window.Close()
           à Telerik.Windows.Controls.InternalWindow.WindowWithNoChromeWindowHost.Close() dans c:\TB\135\WPF_Scrum\Release_WPF\Sources\Development\Controls\Navigation\Window\InternalWindow\WindowWithNoChromeWindowHost.cs:ligne 60
           à Telerik.Windows.Controls.WindowBase.CloseHostImidiately() dans c:\TB\135\WPF_Scrum\Release_WPF\Sources\Development\Controls\Navigation\Window\WindowBase.cs:ligne 1229
           à Telerik.Windows.Controls.WindowBase.OnCloseAnimationFinished() dans c:\TB\135\WPF_Scrum\Release_WPF\Sources\Development\Controls\Navigation\Window\WindowBase.cs:ligne 1071
           à Telerik.Windows.Controls.WindowBase.PlayCloseAnimation() dans c:\TB\135\WPF_Scrum\Release_WPF\Sources\Development\Controls\Navigation\Window\WindowBase.cs:ligne 1017
           à Telerik.Windows.Controls.WindowBase.TryClose(Boolean shouldCloseHost) dans c:\TB\135\WPF_Scrum\Release_WPF\Sources\Development\Controls\Navigation\Window\WindowBase.cs:ligne 652
           à Telerik.Windows.Controls.WindowBase.Telerik.Windows.Controls.InternalWindow.IWindowDragAware.TryClose(Boolean shouldCloseHost) dans c:\TB\135\WPF_Scrum\Release_WPF\Sources\Development\Controls\Navigation\Window\WindowBase.cs:ligne 1257
           à Telerik.Windows.Controls.InternalWindow.WindowWithNoChromeWindowHost.OnWindowClosing(Object sender, CancelEventArgs e) dans c:\TB\135\WPF_Scrum\Release_WPF\Sources\Development\Controls\Navigation\Window\InternalWindow\WindowWithNoChromeWindowHost.cs:ligne 251
           à System.Windows.Window.OnClosing(CancelEventArgs e)
           à System.Windows.Window.WmClose()
      InnerException:



    Thank's
    Alain
  2. Vladi
    Admin
    Vladi avatar
    744 posts

    Posted 01 Oct 2014 Link to this post

    Hi Alain,

    Thank you for contacting us.

    We are not aware of such issue in the latest and the mentioned 2012.2.912.35 versions of RadWindow. The described scenario runs as expected with our current latest version and the older version on both Windows 8 and Windows 7 OS environments.

    I attached the sample project which was used in our tests to my response. Could you try to reproduce the issue in that project and send it back to us in a support thread. This would help us observe the issue on our side and see what could be the cause of it.

    Regards,
    Vladi
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
  3. UI for WPF is Visual Studio 2017 Ready
  4. Christie Admin
    Christie Admin avatar
    239 posts
    Member since:
    Aug 2013

    Posted 20 Oct 2014 in reply to Vladi Link to this post

    Hi Vladi,

    would it be possible the issue can occur only when using the save/load persistance???

    Thank's
    Alain
  5. Vladi
    Admin
    Vladi avatar
    744 posts

    Posted 21 Oct 2014 Link to this post

    Hello Alain,

    We are not sure we understand what exactly you are referring as a save/load persistence of RadWindow. By design that control does not have such built-in  feature.

    Looking forward to your response.

    Regards,
    Vladi
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  6. Christie Admin
    Christie Admin avatar
    239 posts
    Member since:
    Aug 2013

    Posted 21 Oct 2014 Link to this post

    Hi Vladi,

    actually in our main application, we have a WinForm from where we call the RadWindow and I don't know why but the only solution I found the solved our issue is to added in the PreviewClosed of each RadWindow the following piece of code:

    var mainWindow = this.ParentOfType<Window>();
    if (mainWindows != null)
      mainWindow.Hide();

    With this piece of code, I solved the issue!!!

    I thought the issue came from the fact we use the Persistence to save the window and the fact the window was on the taskbar in a Windows 7 environment can caused this behavior.

    Thank's
    Alain
  7. Kalin
    Admin
    Kalin avatar
    1207 posts

    Posted 22 Oct 2014 Link to this post

    Hi Alain,

    I'm glad you have managed to resolve the issue you were facing. If you have any other questions let us know.

    Regards,
    Kalin
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top
UI for WPF is Visual Studio 2017 Ready