A window with WindowChrome flickers during the resize operation if the content is WindowsFromsHost #5897
Replies: 5 comments
-
Windows Forms uses software rendering and it's going to flicker on resize in this context or if OnPaint() is slow enough, Please use WPF instead. WPF uses hardware rendering and has therefore smooth rendering. A very similar issue has been already labeled as "WON'T FIX' in the past : Quote :
If you don"t want flickering, you have to use WPF. It has been made precisely to fix that problem (among others). WindowsFormsHost is there so you can use existing 3rd paty WinForms controls or in-house WinForms controls that you'd like to use with WPF. It's meant to aid the transition to WPF. But if you can, only using WPF is the better choice. This way, you'll also avoid the AirSpace problem : |
Beta Was this translation helpful? Give feedback.
-
@AndreyMarten I hope the answer provided by @maximilien-noal helped. |
Beta Was this translation helpful? Give feedback.
-
The "answer" provided is not an answer at all. @AndreyMarten was explicitly stating that this happens when using
That highly depends on double buffering etc.
That's quite far away from reality as WPF does NOT always use hardware rendering.
Try to use @AndreyMarten Feel free to use the @maximilien-noal My statements might sound a bit harsh, but to me it looks/sounds like you didn't even have a look at the provided sample application. It sounds like you read "WinForms" and made your judgement about what should and shouldn't be done. I don't think that's a good approach to reported issues. @gurpreet-wpf May i ask why you converted this to a discussion without even waiting for a response from the reporter? |
Beta Was this translation helpful? Give feedback.
-
Of course. I still remember how I had to fix flickering in the ListView by enabling DoubleBuffering, which is sadly a protected property and not enabled by default.
That's far from surprising, the WebBrowser content is not rendered by WPF.
That's true. However, hardware rendering is the norm in WPF land.
Interesting. Thank you ! |
Beta Was this translation helpful? Give feedback.
-
Thank you @batzen for providing such detailed information. I didn't intend to close this issue without resolution. I will closely monitor the discussion to convert it back to issue, if there is a fix that can get into WPF. I am happy to take your suggestion to wait for issue creator to respond. |
Beta Was this translation helpful? Give feedback.
-
A window defined with WindowChrome flickers during the resize operation if the content is the WindowsFromsHost element. The screencast and project illustrate the problematic behavior.
Screencast
sample.zip
The
WpfApp1
project is a .NET project that hosts aUserControl1
from WinFormsLibary1 (also .NET). Please run this project to replicate the issue.The
DXSample
project is a .NET Framework project that hosts aUserControl1
from WindowsFormsControlLibrary1 (also .NET Framework). In this project, you can see that the issue occurs in .NET Framework as well.Beta Was this translation helpful? Give feedback.
All reactions