John, here's a simpler way to do this. This will also handle strings like "3*" which are valid grid length values in Xaml.
private RowDefinition MakeRowDefinition(string height)
RowDefinition rowDef = new RowDefinition();
GridLengthConverter converter = new GridLengthConverter();
gridLength = (GridLength)converter.ConvertFromString(height);
gridLength = new GridLength();
rowDef.Height = gridLength;
You could also make the
an instance field so you don't have to instantiate it for each call.
is only available in WPF. It's not available for Silverlight.