c# wpf row definition height * in code

C#
GridLengthConverter gridLengthConverter = new GridLengthConverter();
row.Height = (GridLength)gridLengthConverter.ConvertFrom("*");
Source

Also in C#: