How could I set the value of the Height property of a WPF control in C# code to \"Auto\"?
Height
Auto
You can use
RowDefinition rd = new RowDefinition(); rd.Height = GridLength.Auto; ContentGrid.RowDefinitions.Add(rd);