Reputation: 6102
How can the children of the Stack panel be aligned independently? I have an image which is to be aligned to right and a Label which is to be aligned to left. The orientation property of StackPanel is set to "Horizontal".
<StackPanel Orientation="Horizontal" VerticalAlignment="Top">
<Label x:Name="titleLb" Content="Label 1" />
<Image Height="37" Name="image1" Width="129" Source="/GUITest;component/Images/logo.png"/>
</StackPanel>
Upvotes: 1
Views: 1187
Reputation: 19895
EDITED:
<DockPanel HorizontalAlignment="Stretch">
<TextBlock Text="123" HorizontalAlignment="Left" DockPanel.Dock="Left"/>
<TextBlock Text="345" HorizontalAlignment="Right" DockPanel.Dock="Right"/>
</DockPanel>
Upvotes: 1