Place two GroupBox in the Grid by flipping one of them horizontally.
<Grid> <GroupBox Name="mainGroupBox"> </GroupBox> <GroupBox Focusable="False" Panel.ZIndex="-1" Width="{Binding ActualWidth, ElementName=mainGroupBox}" Height="{Binding ActualHeight, ElementName=mainGroupBox}" IsEnabled="{Binding IsEnabled, ElementName=mainGroupBox}" RenderTransformOrigin="0.5,0.5"> <GroupBox.RenderTransform> <ScaleTransform ScaleX="-1"/> </GroupBox.RenderTransform> </GroupBox> </Grid>
The idea is taken with enSO .
Or maybe there is another control for combining elements?
Use Border :
<Border BorderBrush="Gray" BorderThickness="1" CornerRadius="5" Padding="2" Margin="2"> <TextBlock Text="text"/> </Border>