Let TextBox stretch to fill width in StackPanel

Unfortunately the alternative (DockPanel) isnt available for Metro. You could try a WrapGrid, but I dont know if it’ll solve your problem (Ive never used it).

The only real way of doing this is using a Grid as you described:

<Grid Width="400">
    <Grid.ColumnDefinitions>
        <ColumnDefinition Width="Auto" />
        <ColumnDefinition />
    </Grid.ColumnDefinitions>
    <TextBlock Text="Label" Width="150" />
    <TextBox Text="Value" Grid.Column="1" />
</Grid>

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)