Convert GridLength to Double

c#, windows-8, windows-runtime, xaml

Solution

GridLength.Value Property

   addTextBox.Height = addTextBoxRow.Height.Value

Also check out the `ActualHeight` property which changes as you resize the `Grid`:

   addTextBox.Height = addTextBoxRow.ActualHeight

Problem

I have a TextBox called `addTextBox` which is inside a row called `addTextBoxRow` whose height is `500*` I want to assign the height of the `addTextBoxRow` to `addTextBox` whenever the layout changes. But when I tried with `addTextBox.Height = addTextBoxRow.Height`, it gives me an error that it cannot implicitly convert type 'Windows.UI.Xaml.GridLength' to 'double'.

Original source