I just started working with GroupBoxes and I was just wondering why I cant make my corners sharp, as if it was a rectangle. I've seen a few online and thier corners arent round. Why is that?
<GroupBox x:Name="howTOGroupBox" BorderBrush="White" Foreground="White" Header="How To" HorizontalAlignment="Left" Margin="88,86,0,0" VerticalAlignment="Top" Height="79" Width="221" BorderThickness="1"/>
you can style Your GroupBox ControlTemplate and round to 0 all of the corners:
<Window.Resources>
<Style TargetType="GroupBox">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="GroupBox">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Border Grid.Row="0"
BorderThickness="1" BorderBrush="White"
CornerRadius="0,0,0,0">
<ContentPresenter
ContentSource="Header"
RecognizesAccessKey="True" />
</Border>
<Border Grid.Row="1" BorderBrush="White"
BorderThickness="1"
CornerRadius="0,0,0,0">
<ContentPresenter Margin="4" />
</Border>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Window.Resources>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With