[DevExpress Support Team: CLONED FROM T590737: How to enable DirectX in PictureEdit]
I'm seeing some flickering of the PictureEdit background picture (shown as some null value) on mousehover/tooltip. Unfortunately Camtasia is unable to capture the flicker. I'm still trying to isolate the problem…
PictureEdit - An image is flickering when DirectX is enabled
Answers approved by DevExpress Support
We have fixed the issue described in this ticket and will include the fix in our next maintenance update. To apply this solution before the official update, request a hotfix by clicking the corresponding link for product versions you require.
Note: Hotfixes may be unavailable for beta versions and updates that are about to be released.
I am happy to hear that everything works fine now! Thank you for letting us know about that. Yes, we will definitely consider improving the current behavior. Our developers are already researching the possibility of enabling DirectX Hardware Acceleration even after the handle is created. Do not hesitate to contact me if you have any other ideas that may help us improve our product.
Hello,
I'm having this issue with the AccordionControl created by the FluentDesignForm. The control flickers when moving the mouse above it when UserDirectXPaint is set to DefaultBoolean.True.
Even though I specified to use DirectX in the DevExpress Project Settings page, the DefaultBoolean.Default value does not make it flicker. I conclude from that that it must be using GDI+ but I'm not sure of it.
I'm testing on Windows 10 with version 18.1.3 and dxdiag tells me that dx11 is supported.
Should I make a separate ticket for this ?
Redards,
Grégory
That's right, Grégory, it is better to discuss this issue in a separate ticket. I've gone ahead and created it on your behalf - FluentDesignForm - AccordionControl flickers on mouse hovering when DirectX Hardware Acceleration is enabled. I will address it shortly.
Trying to find the cause of the flickering I found something else. When the BackColor of the PictureEdit is set to transparent, in DirectX mode it shows a black background. See in action:
https://www.screencast.com/t/1OJiTtbonWa
Also in DirectX the background is not cleared when 'delete' action is done. See in action:
https://www.screencast.com/t/Vrq12c35a
DirectX with BorderStyle set to NoBorder always seem to show a border.
I still was unable to create a small project showing the flickering. I've made this little video with my phone to show what I am seeing. Sorry for the shaky handheld footage… Camtasia capture doesn't show the problem. I'll resume testing later.
https://www.screencast.com/t/hekLnJMf
Hello Alex,
Thank you for your input. We greatly appreciate this. The first three issues have the same cause - at the moment, PictureEdit is incorrectly drawn if the BackColor property is set to the Transparent color. Our developers are already working on this issue in the context of the PictureEdit - The image background is black when DirectX is enabled ticket. As for your initial inquiry, as I see, in this case you did not use the transparent background and it seems that I am unable to reproduce this behavior on our side. If it is not possible to replicate the issue in a small project, would you please provide us with your actual application? I look forward to your response.
Hi Aleks,
Thanks for the information. I will try again later to create a small project showing the problem. I was almost there this morning, but I need to work! :)
Stay tuned.
Alex
OK, Alex, looking forward to hearing from you :)
I've had a productive lunch! I've found repeatable steps. See in action: https://www.screencast.com/t/Btt9K32I
And the demo project used is attached. Basically when you have a background picture or color and you change the UseDirectXPaint property to true at runtime you can see the refresh 'behind'.
Thank you for the project and video, Alex. I reproduced this behavior and passed the issue to our R&D team for further research. We will update this ticket once we make any progress.
While our developers are working on this issue, I suggest you enable PictureEdit.UseDirectXPaint before a control's handle is created, i.e. in a form's constructor. This approach allows the control to correctly enable DirectX Hardware Acceleration. We will get back to you as soon as we have any news.
Good to know. In my derived XtraEditors I generally put the properties customization in the OnCreateControl override.
I will wait for the next hotfix/release before I do more testing on this component.
Hello Alex,
We have fixed the issue, so now PictureEdit does not flicker in this scenario. However, I would like to mention that if you set this property in OnCreateControl, a regular GDI-mode will be used. If you want to enable DirectX Hardware Acceleration at the descendant level, I suggest you set the UseDirectXPaint property in the editor's constructor (before its handle is created). Let me know if anything remains unclear. I will elaborate on these points.
Hi Aleks,
Thanks all is clear. I will test it in the next release and report back any problem. Thanks for the quickfix.
Alex
You are always welcome, Alex. Do not hesitate to contact me if you have any other questions or concerns.