I need to stretch second element on the entire width horizontal-oriented stackpanel (textblock must be on the left, textBox should get all remaining space). I read a lot about this topic but still can not find an answer. Properties HorizontalAlignment HorizontalContentAlignment unsuitable of course. As I understand I must use something another than StackPanel cause it depend on content size. I tried to use Grid Row-Columns and other variants but still can't get what I need. Help me please :) samples of code and screenshot
<Grid>
<StackPanel>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Stretch">
<TextBlock Text="Login"></TextBlock>
<TextBox PlaceholderText="login" HorizontalAlignment="Stretch"/>
</StackPanel>
...
more StackPanels
...
</StackPanel>
</Grid>