-
-
Notifications
You must be signed in to change notification settings - Fork 517
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ribbonwindow crashes #178
Comments
Could you create a small repro for your issue? |
I try to reproduce the error but it is difficult without luck. I make use of threads in my application, which makes it difficult to reproduce. I will keep trying to reproduce the error. I dont think there is something wrong with my application because it only happens with the RibbonWindow. Everything works fine if I use a normal window. |
By the way the messagebox is a window i made myself. And the error only occurs when i try to show the window with ShowDialog(). This is a workaround. However I would like to know why this happens only with the RibbonWindow. I still cant reproduce the error. However it is still there in my Application. |
I started looking for the problem myself in the FluentRibbon source code. And found that the code always blocks here:
#if NET45 Then specialy in this row: WindowChrome.SetWindowChrome(this, windowChrome); I cant debug the code from this line on. If I knew how than I would do it. Maybe someone have an idea? |
It seems like the above method is called twice. If I neglect the the SetWindowChrome method the first time than everything works fine. However I miss some pieces of the style. For example the close and open This is my new workaround:
#if NET45 However I would like to know more and resolve the real issue. Who has any ideas? |
So Do you reset that property somewhere? |
No. That is not the problem. |
I finaly could reproduce the error. Look in the link below for the WpfApplication2 zip. There is also a second bug. If you go to the code behind the main window and remove the line : w1.ShowDialog(); than it wil start ok. But than try to maximize the window. You will notice that the window does crazy things when maximizing. |
Will have a look at your repro next week. |
Can't download your repro, onedrive just tells me something went wrong. |
Strange, i just tried and it worked. |
Ok, pretty simple. Solution: I will remove the call to UpdateWindowChrome in OnApplyTemplate because the WindowChrome is updated as soon as OnSourceInitialized is called on the RibbonWindow. |
I use a ribbonwindow. After my window is loaded I generate an error (in the window Loaded method). In the catch statement i try to show a messagebox to show the error code. But everything crashes.
If i put the code just after the Initialize metbod of the window then everything is ok. I think this is a critical bug.
To avoid this problem I must use a normal window with the ribbon in it and avoid the RibbonWinow. However this is not as beautifull as the RibbonWindow.
The text was updated successfully, but these errors were encountered: