MaterialDesignInXamlToolkit
MaterialDesignInXamlToolkit copied to clipboard
The program freezes
Bug explanation
Hello. I decided to write a program using your styles. I connected them to resources and started using them. As a result, I noticed when the computer is blocked and we log in. The program freezes completely and the buttons and elements do not work. Interestingly, the double-click action is hung on the DataGrid. Which brings up the edit button. And this action works. But it opens a completely empty form.
Version
1.2.7 and 3.2.0
I solved this problem, but I don't know how much is correct. I didn't use hide() on the first form, but Close()
@YourName2024 are you able to provide an example that reproduces the problem. There is not enough information here to provide a fix or solution.
@YourName2024 are you able to provide an example that reproduces the problem. There is not enough information here to provide a fix or solution.
I'm having the same issue. After opening a new window and hiding the main window, if the user locks/unlocks the screen, then the application locks up.
My current work around is to disable hardware acceleration (RenderOptions.ProcessRenderMode = RenderMode.SoftwareOnly;)
-WPF, .net 8, windows application
Code calling new new window:
CheckListForm cLWin = new()
{
Owner = Application.Current.MainWindow,
WindowStartupLocation = WindowStartupLocation.CenterOwner,
MainWindowReference = this
};
cLWin.Show();
Hide();
This issue is marked stale because it has been open 30 days with no activity. Remove stale label or update the issue, otherwise it will be closed in 14 days.
@jf1187gh are you able to provide a sample repo that reproduces the issue?
@jf1187gh are you able to provide a sample repo that reproduces the issue?
I uploaded a stripped down sample. Issue happens when the second window is maximized, and then the computer is locked. Upon unlock, the window freezes.
https://github.com/jf1187gh/MD_XAML
This issue is marked stale because it has been open 30 days with no activity. Remove stale label or update the issue, otherwise it will be closed in 14 days.
Were you able to reproduce the issue with my sample code?
This issue is marked stale because it has been open 30 days with no activity. Remove stale label or update the issue, otherwise it will be closed in 14 days.
This issue is marked stale because it has been open 30 days with no activity. Remove stale label or update the issue, otherwise it will be closed in 14 days.
This will be fixed with #3616 .
@jf1187gh the solution to your problem is adding following inside your Window
tag:
<Window
xmlns:md="http://materialdesigninxaml.net/winfx/xaml/themes"
md:ShadowAssist.CacheMode="{x:Null}"
The culprit is the Menu
. It uses a by default enabled CacheMode
through the Material Design style and it seems it has trouble when coming back from the Windows lock screen. Removing the CacheMode
effectively removes any caching and the problem disappears. Why the freezing happens when using this CacheMode
, I don't know.