I have a StatusBar
that I\'d like to house a TextBlock
docked to the left and a ProgressBar
filling the remaining width. In all my other e
You just need one extra attribute: HorizontalContentAlignment="Stretch"
on the StatusBarItem. Thus:
<StatusBar DockPanel.Dock="Bottom" Height="25">
<StatusBarItem DockPanel.Dock="Left">
<TextBlock x:Name="lblStatus" Margin="5,0,0,0"/>
</StatusBarItem>
<StatusBarItem HorizontalContentAlignment="Stretch"> <!-- Note extra attribute -->
<ProgressBar x:Name="pgbStatus" />
</StatusBarItem>
</StatusBar>