How do you set the width of a textbox to fill the container programmatically? For example in xaml if I have the following declaration for the textbox:
<TextBox Height="23" Name="TextBox1" VerticalAlignment="Top" Width="50" />
how can I set the width so that it fills the container in a button click handler?
You should be able to use
HorizontalAlignment="Stretch"(make sure you don’t set an explicitWidthorMaxWidthto allow dynamic sizing). I haven’t done any Sliverlight development, but in WPF, that does the trick!