Grid is good for this: -
<Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width="*" /> <ColumnDefinition Width="Auto" /> <ColumnDefinition Width="*" /> </Grid.ColumnDefinitions> <StackPanel HorizontalAlignment="Left" Grid.Column="0"> </StackPanel> <StackPanel HorizontalAlignment="Center" Grid.Column="1"> </StackPanel> <StackPanel HorizontalAlignment="Right" Grid.Column="2"> </StackPanel> </Grid>
This approach separates the main Grid of Left, Center, and Right content from the content itself. In your example, the Left StackPanel will have two elements. The contents of each panel should only be associated with its layout compared to other sister items in the panel.
source share