tags:

views:

117

answers:

2

Hi, Does anyone know how to set the TextBox.Width property to fill up the remainder of the parent container in code? In Xaml, I would simply set the Width property to *, but I can't figure out how to do this in code.

Thanks, Roy

+2  A: 

Try the following

textBox.Width = Double.NaN;

Double.NaN (not a number) is the equivalent of any size.

JaredPar