Double buffer grid

This commit is contained in:
Robert McRackan 2021-07-29 10:57:55 -04:00
parent 204e77008b
commit 9e44a95ba2
2 changed files with 17 additions and 6 deletions

View File

@ -13,7 +13,7 @@
<!-- <PublishSingleFile>true</PublishSingleFile> -->
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<Version>5.4.5.1</Version>
<Version>5.4.6.1</Version>
</PropertyGroup>
<ItemGroup>

View File

@ -45,6 +45,17 @@ namespace LibationWinForms
formatColumns();
manageLiveImageUpdateSubscriptions();
enableDoubleBuffering();
}
private void enableDoubleBuffering()
{
var propertyInfo = dataGridView.GetType().GetProperty("DoubleBuffered", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic);
//var before = (bool)propertyInfo.GetValue(dataGridView);
propertyInfo.SetValue(dataGridView, true, null);
//var after = (bool)propertyInfo.GetValue(dataGridView);
}
private void formatDataGridView()