Problems with Flickering

AlexB
2011-02-28
2013-04-24
  • AlexB
    AlexB
    2011-02-28

    Hi,

    A lot of flickering is present when using DockContent on W7 64 bits.
    Does the code sources provide a solution for reducing the flickering ?

    Thank you,
    Alex.

     
  • Lex Li
    Lex Li
    2011-02-28

    I used DockPanel Suite on Windows 7 x64 too, but never saw such flickering. So you may review your own application code to find out the culprit. It does not seem to be DPS's issue.

     
  • AlexB
    AlexB
    2011-02-28

    The flickering is visible within the Dock Sample. Just take a look at the Solution Explorer window, expand the nodes and random click on multiple nodes to obtain that annoying flickering effect.

     
  • No news about this problem?

     
  • bebizo
    bebizo
    2012-08-30

    I've tried to fix annoying flickering effect described in tracker issue ID: 2054344 .

    For me, flicker vanishes with following body of method void SetContentBounds() of class WeifenLuo.WinFormsUI.Docking.DockPane:

         

    internal void SetContentBounds()
            {
                Rectangle rectContent = ContentRectangle;
                if (DockState == DockState.Document && DockPanel.DocumentStyle == DocumentStyle.DockingMdi)
                    rectContent = DockPanel.RectangleToMdiClient(RectangleToScreen(rectContent));
                Rectangle rectInactive = new Rectangle(-rectContent.Width, rectContent.Y, rectContent.Width, rectContent.Height);
                foreach (IDockContent content in Contents)
                {
                    if (content.DockHandler.Pane == this)
                    {
                        if (content == ActiveContent)
                        {
                            content.DockHandler.Form.Bounds = rectContent;
                        }
                    }
                }
                foreach (IDockContent content in Contents)
                {
                    if (content.DockHandler.Pane == this)
                    {
                        if (content != ActiveContent)
                        {
                            content.DockHandler.Form.Bounds = rectInactive;
                        }
                    }
                }
            }