Grid Star-Size in code behind Grid Star-Size in code behind wpf wpf

Grid Star-Size in code behind


You can use:

rowDefinition.Height = new GridLength(0.5, GridUnitType.Star);


grid.RowDefinitions[0].Height = new GridLength(0.5, GridUnitType.Star);