Q&A #18 – NaN for a Windows Phone Textbox Height

Your 2020 Plan. Learn 20 minutes a day for 20 days. Online courses from €9.99.

NaN for a Windows Phone Textbox Height

Did you know that you can set the value of the height property to “NaN” for a Windows Phone textbox?

The Textbox height property accepts double value but can also accept “NaN”.

By specifying this, we can specify the auto size property for the textbox. Alternatively, you can also set this value to “Auto” too.

<TextBox Margin="14,15,0,0" Name="textBox1" Height="NaN" />
<TextBox Margin="14,15,0,0" Name="textBox1" Height="Auto" />

Leave a Reply

Your email address will not be published. Required fields are marked *