What causes Windows to hang in this WPF Ribbon application What causes Windows to hang in this WPF Ribbon application wpf wpf

What causes Windows to hang in this WPF Ribbon application


Try checking that the graphics drivers on the affected computers are up-to-date. WPF works very differently from traditional GDI code, so sometimes unreliable drivers can cause the kind of problem that you describe.


As you have found the problem comes with composite Windows. I have analyzed the issue further and it seems to be an OS related issue:

See The Case of Slow WPF Rendering in a WinForms Application

Two threads try to render and invalidate each other window in a loop where on one thread the composite Winforms Window renders and on the other thread the WPF render thread does the same thing. This happens on Win 7 - Win 10 machines as long as software rendering is active.

It looks like a DWM (Desktop Window Manager) issue where only the MS experts can tell us if WPF or WinForms is violating an implicit contract or if it is a plain DWM bug.