OK this is stupid! I'm confused. I have this `xaml`:

```
    <StackPanel Style="{DynamicResource FormPanel}">
        <StackPanel>
            <Label Content="{DynamicResource Label_FirstName}"
                   Target="{Binding ElementName=FirstName}"/>
            <TextBox x:Name="FirstName" />
        </StackPanel>
        <StackPanel>
            <Label Content="{DynamicResource Label_LastName}"
                   Target="{Binding ElementName=LastName}"/>
            <TextBox x:Name="LastName" />
        </StackPanel>
        <!-- and so one... for each row, I have a StackPanel and a Label and Textbox in it -->
    </StackPanel>

```

and this style:

```
<Style x:Key="FormPanel" TargetType="{x:Type StackPanel}">
    <Setter Property="Orientation" Value="Vertical"/>
    <Setter Property="HorizontalAlignment" Value="Stretch" />
    <Style.Resources>
        <Style TargetType="{x:Type StackPanel}">
            <Setter Property="Orientation" Value="Horizontal" />
            <Setter Property="HorizontalAlignment" Value="Stretch" />
            <Setter Property="Margin" Value="10"/>
            <Style.Resources>
                <Style TargetType="{x:Type Label}">
                    <Setter Property="Width" Value="140"/>
                </Style>
                <Style TargetType="{x:Type TextBox}">
                    <!-- this line doesn't affect -->
                    <Setter Property="HorizontalAlignment" Value="Stretch"/>
                </Style>
            </Style.Resources>
        </Style>
    </Style.Resources>
</Style>

```

I want to set the `TextBox.Width` to the rest of container's (`StackPanel`) width. It seems in this case, `HorizontalAlignment = Stretch` not works. Have you any idea?