Double buffer grid
This commit is contained in:
parent
204e77008b
commit
9e44a95ba2
@ -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>
|
||||
|
||||
@ -39,15 +39,26 @@ namespace LibationWinForms
|
||||
public ProductsGrid()
|
||||
{
|
||||
InitializeComponent();
|
||||
formatDataGridView();
|
||||
addLiberateButtons();
|
||||
addEditTagsButtons();
|
||||
formatColumns();
|
||||
formatDataGridView();
|
||||
addLiberateButtons();
|
||||
addEditTagsButtons();
|
||||
formatColumns();
|
||||
|
||||
manageLiveImageUpdateSubscriptions();
|
||||
|
||||
enableDoubleBuffering();
|
||||
}
|
||||
|
||||
private void formatDataGridView()
|
||||
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()
|
||||
{
|
||||
dataGridView.Dock = DockStyle.Fill;
|
||||
dataGridView.AllowUserToAddRows = false;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user