You cannot do that with a StackPanel
, however you don't "have" to use a Grid
.
You can use a DockPanel
as a compromise
<DockPanel LastChildFill="False">
<Button Content="Help" DockPanel.Dock="Left" />
<Button Content="Close" DockPanel.Dock="Right" />
<Button Content="Open" DockPanel.Dock="Right" />
</DockPanel>
LastChildFill="False"
will make sure your last added control does not end up "filling" up all the remaining space thereby giving you the look you want.