top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

WindowsPhone: TextBox stretch to fill horizontal space in StackPanel?

+1 vote
405 views
WindowsPhone: TextBox stretch to fill horizontal space in StackPanel?
posted Mar 9, 2015 by Sathish Kumar

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+2 votes

Some times when you place TextBox inside stackpanel,it may not fill available horizontal space .In this case we need to set HorizontalAlignment="Stretch".So the following code will be work for you.

<StackPanel>  
<TextBox HorizontalAlignment="Stretch" />  
</StackPanel> 
answer Mar 10, 2015 by Jdk
...