Double buffer grid
This commit is contained in:
parent
204e77008b
commit
9e44a95ba2
@ -13,7 +13,7 @@
|
|||||||
<!-- <PublishSingleFile>true</PublishSingleFile> -->
|
<!-- <PublishSingleFile>true</PublishSingleFile> -->
|
||||||
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
|
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
|
||||||
|
|
||||||
<Version>5.4.5.1</Version>
|
<Version>5.4.6.1</Version>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@ -39,15 +39,26 @@ namespace LibationWinForms
|
|||||||
public ProductsGrid()
|
public ProductsGrid()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
formatDataGridView();
|
formatDataGridView();
|
||||||
addLiberateButtons();
|
addLiberateButtons();
|
||||||
addEditTagsButtons();
|
addEditTagsButtons();
|
||||||
formatColumns();
|
formatColumns();
|
||||||
|
|
||||||
manageLiveImageUpdateSubscriptions();
|
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.Dock = DockStyle.Fill;
|
||||||
dataGridView.AllowUserToAddRows = false;
|
dataGridView.AllowUserToAddRows = false;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user