Nevron Forum

NuiPanel flicker when resize

https://www.nevron.com/Forum/Topic3262.aspx

By JSW W. - Monday, March 22, 2010

I use NuiPanel fill in UserControl to get skin for standard control e.g. scroll/background etc.
But it flicker when resize/maximize/show/hide.

Should it be done as so.
By Angel Chorbadzhiev - Monday, March 22, 2010

Hi JSW W.,

Try to set the following styles in the constructor of the user control.

SetStyle(ControlStyles.AllPaintingInWmPaint, true);

SetStyle(ControlStyles.OptimizedDoubleBuffer, true);

Regards,

Angel.

 

By Miles Thornton - Wednesday, October 6, 2010

Using Nevron.Presentation version 2.0.50727 in a WinForms application (using NForm); how do I eliminate NUIPanel background image flicker? I have an image loaded at design time into the npanel's Background Image; when the application starts and draws the panel, there is a disorienting flicker as the panel image draws…

I tried the advice in this post - I set the two lines up in the form's constructor - But there's no change in the flickering...

What else would you suggest I try?

 

By Miles Thornton - Wednesday, October 6, 2010

I also discovered that the issue is exacerbated when the BackgroundImageLayout property is set to "stretch". The flicker isn't nearly as noticable in "tile" mode for example.
By Miles Thornton - Wednesday, October 13, 2010

Btw, why does this control redraw itself 3 times? When the winforms app is running in a slower environment, such as on a server accessed via Remote Desktop; the redraw (which used to be flicker) is very perceptable...
By Nevron Support - Thursday, October 14, 2010

Hello Miles,

Could you tell what is the date of this Nevron.Presentation assembly, because the version number that you say you are using it seems to be very old.

Also, it would be great if you provide us with a small example application that demonstrates the problem.

Thanks.

By Miles Thornton - Friday, October 15, 2010

I'm sorry, I may have mistaken the version. On closer inspection, the Presentation DLL's version/date is: 9.11.3.12 dated: Nov. 03, 2009.

Please find a VS2010 Winforms shell project of my UI zipped and and attached.

Thank you in advance for all the help!

By Nevron Support - Friday, October 15, 2010

Hello Miles,

In the project that you have attached you are using System.Windows.Forms.Panel not NUIPanel.

Anyway, one suggestion that you can try is to create class that inherits from Panel and in the constructor set DoubleBuffered to true.

Than use this class for your panel. This should reduce flickering.

public class MyPanel : Panel
{
    public MyPanel()
    {
        DoubleBuffered = true;
    }
}

Please, let us know if the problem persist.