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