Hello again! I recently found an issue we're having with the XamDialogWindow where a window doesn't open or doesn't open correctly under certain circumstances. We have a dialog window defined in our XAML the user can close and open again and they can minimize it. We have a stack panel at the bottom that is bound to the dialog window's minimize panel so they minimize at the bottom of the screen instead of the top.
Recently I found out that if the user minimized a dialog window, closes it (which sets the state of the window to hidden), then opens it again (changing the state to normal) one of two things will happen:
- It doesn't appear at all. The control is lost to the user until they restart the program.
- It appears but all the user can see is the header and a sliver of the window content. Resizing the window seems to have no effect. If the user minimizes the window again then restores it the window appears fine although any resizing the user tried is still calculated to the window.
I created a demo project that showcases what I could recreate of these bugs. Here are the steps to recreating the bugs, all from a fresh start:
To recreate the second bug:
1) Minimize window
2) Close window
3) Push "Open Dialog Window" button
Window will appear on the minimize panel with a sliver of the content visible. It can't be resized. You can push the minimize button on the header to make it minimized again, then push the minimize button on that header to restore it to it's normal value.
The first bug is due to an issue where moving the dialog window will affect where it appears once it is opened after taking the above steps. If the user moves the window then does the above steps to create the first bug the window will be offset from the minimize panel by the same amount they panned. You can see this if before doing step 1 above you move the dialog window slightly down and to the right then doing the above steps. The window will appear in its bugged state the same amount below and to the right of the origin of the minimize panel as you moved the window before minimizing it.
So far I haven't been able to find any workaround for this issue besides minimizing and restoring a window that is in the invalid state. It has to be initiated by the user. I have a second button "Attempt Window Fix" that I tried to do that would change the window state to minimized then normal. This throws an Argument Exception "Value does not fall within the expected range" if executed when the window is in its invalid state.
I appreciate any help I can get with this problem.
I forgot to mention that if the MinimizePanel property isn't set on the XamDialogWindow the above errors do not occur.
Hello Curtis,
Thank you for your post. I have been looking into it, I tested your sample and I was able to reproduce your behavior with version 12.2. I also tested it with or latest version (14.2) and the issue no longer occurs there. Since version 12.2 is retired one and we no longer provide fixes for it I can suggest you download our supported one and use it – 14.2. Please let me know if you have further questions on this matter.
Looking forward for your reply.
Hello Stefan.
I hadn't realized that we fell behind on our Infragistics version! I had been checking for updates through the Infragistics check for updates function in Visual Studios but it must've been checking for v12 updates but never for a version update to v14. I'll get on that and keep you posted on my results.
I updated our project to 2014.2 to test that this was fixed beyond the test project and the error no longer occurs. Thanks again Stefan.
Thank you for your feedback. I am glad that you resolved your issue and I believe that other community members may benefit from this as well.
Thanks again.