Grid Star-Size in code behind May 26, 2023 by Tarik You can use: rowDefinition.Height = new GridLength(0.5, GridUnitType.Star);