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);
You can use:
rowDefinition.Height = new GridLength(0.5, GridUnitType.Star);
grid.RowDefinitions[0].Height = new GridLength(0.5, GridUnitType.Star);