A Slider and some other controls won't stretch to fill available space when placed in a StackPanel; instead the width is always MinWidth (or about 10 pixels if MinWidth is not set). How do I make it stretch (the equivalent of Anchor.Left|Anchor.Right in WinForms)? Example:
<StackPanel DockPanel.Dock="Bottom" Orientation="Horizontal">
    <Slider Value="14" SmallChange="0.5" Maximum="100" Minimum="4" 
            x:Name="FontSize" MinWidth="30" LargeChange="2" 
            TickFrequency="10" TickPlacement="TopLeft" 
            HorizontalAlignment="Stretch"/>
    <TextBlock Margin="8" Text="{Binding ElementName=FontSize, Path=Value}" 
               VerticalAlignment="Center"/>
</StackPanel>
 
    