Reputation: 2831
I'm using the WPF Grid Control, for the layout.. and inside row 2, col 2 I want to put two buttons inside that cell, but without using positioning attributes..
<Button Content="Confirm" MinWidth="80" Margin="3" Grid.Row="2" Grid.Column="2" HorizontalAlignment="Right" />
<Button Content="Cancel" MinWidth="80" Margin="3" HorizontalAlignment="Right" Grid.Row="2" Grid.Column="2" />
In this example, both buttons are positioned one over the other.
Upvotes: 1
Views: 912
Reputation: 11228
Place them inside StackPanel
:
<StackPanel Grid.Row="2" Grid.Column="2" Orientation="Horizontal">
<Button Content="Confirm" MinWidth="80" Margin="3" />
<Button Content="Cancel" MinWidth="80" Margin="3" />
</StackPanel>
Upvotes: 3