Skip to content

Commit

Permalink
Allow the double buffering to be disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
0xC0000054 committed Jul 19, 2022
1 parent 0de6fb0 commit 052d21a
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions src/System.Windows.Forms/src/System/Windows/Forms/TreeView.cs
Expand Up @@ -2082,17 +2082,7 @@ private void UpdateTreeViewExtendedStyles()
return;
}

TVS_EX extendedStyles = 0;

if (DoubleBuffered)
{
extendedStyles |= TVS_EX.DOUBLEBUFFER;
}

if (extendedStyles != 0)
{
User32.SendMessageW(this, (User32.WM)TVM.SETEXTENDEDSTYLE, (int)extendedStyles, (int)extendedStyles);
}
User32.SendMessageW(this, (User32.WM)TVM.SETEXTENDEDSTYLE, (nint)TVS_EX.DOUBLEBUFFER, (nint)(DoubleBuffered ? TVS_EX.DOUBLEBUFFER : 0));
}

// Replace the native control's ImageList with our current stateImageList
Expand Down

0 comments on commit 052d21a

Please sign in to comment.