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

Closing a RadWindow crash my application

5 Answers 98 Views
Window
This is a migrated thread and some comments may be shown as answers.
Christie Admin
Top achievements
Rank 1
Christie Admin asked on 29 Sep 2014, 02:48 PM
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

5 Answers, 1 is accepted

Sort by
0
Vladi
Telerik team
answered on 01 Oct 2014, 02:49 PM
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.
 
0
Christie Admin
Top achievements
Rank 1
answered on 20 Oct 2014, 02:37 PM
Hi Vladi,

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

Thank's
Alain
0
Vladi
Telerik team
answered on 21 Oct 2014, 07:57 AM
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.

 
0
Christie Admin
Top achievements
Rank 1
answered on 21 Oct 2014, 01:34 PM
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
0
Kalin
Telerik team
answered on 22 Oct 2014, 10:06 AM
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.

 
Tags
Window
Asked by
Christie Admin
Top achievements
Rank 1
Answers by
Vladi
Telerik team
Christie Admin
Top achievements
Rank 1
Kalin
Telerik team
Share this question
or