DataGridColumnStyle.GetMinimumHeight Method

Definition

When overridden in a derived class, gets the minimum height of a row.

C#
protected internal abstract int GetMinimumHeight();

Returns

The minimum height of a row.

Examples

The following code example gets the minimum height of the column.

C#
public class Form1: Form
{
 protected DataGrid dataGrid1;

private void GetHeight(){
    MyGridColumn myGridColumn = (MyGridColumn)dataGrid1.TableStyles[1].GridColumnStyles[0];
    Console.WriteLine(myGridColumn.GetMinHeight());
 }
}

public class MyGridColumn:DataGridBoolColumn{
   public int GetMinHeight(){
   return this.GetMinimumHeight();
   }
}

Applies to

Product Versions
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 10

See also