Reputation: 1585
I have these items inside a status bar and I can't align the progress bar to the right. All items are inside a grid. Please Help.
<Grid>
<StatusBar HorizontalAlignment="Stretch" VerticalAlignment="Bottom" Height="30"
x:Name="StatusBarBase">
<TextBlock Text="{DynamicResource loading}" x:Name="progressBarTextBlock"/>
<Separator/>
<ProgressBar Width="100" Height="20" x:Name="progressBar"/>
</StatusBar>
</Grid>
Upvotes: 1
Views: 767
Reputation: 20843
StatusBar
is an ItemsControl
. Items in a StatusBar
are defined as StatusBarItem
objects.
Place your items in StatusBarItem
and set the horizontal alignment for StatusBarItem
with ProgressBar
.
<!-- Edited indentation to make code more readable. -->
<StatusBar HorizontalAlignment="Stretch" VerticalAlignment="Bottom" Height="30" x:Name="StatusBarBase">
<StatusBarItem>
<TextBlock Text="Text" x:Name="progressBarTextBlock"/>
</StatusBarItem>
<Separator />
<StatusBarItem HorizontalAlignment="Right">
<ProgressBar Width="100" Height="20" x:Name="progressBar"/>
</StatusBarItem>
</StatusBar>
Upvotes: 3