You can use the Grid instead of the DockPanel either use alignments or create columns and edit ColumnSpan , an example of the latter:
<Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width="Auto"/> <ColumnDefinition /> <ColumnDefinition Width="Auto"/> </Grid.ColumnDefinitions> <ScrollViewer Grid.Column="0" Grid.ColumnSpan="3"/> <Button Grid.Column="0" Content="Left"/> <Button Grid.Column="2" Content="Right"/> </Grid>
(DockPanel is a pretty poor control that can be easily replaced with a grid in just about every case)
source share