How to create a GroupBox in WPF?

The GroupBox element in XAML represents a GroupBox control. The following code snippet creates a GroupBox control, sets its background and font. The code also sets the header by using GroupBox.Header.

<Window x:Class="GroupBoxSample.Window1"



    Title="Window1" Height="300" Width="300">


        <GroupBox Margin="10,10,10,10" FontSize="16" FontWeight="Bold"



               Mindcracker Network



            <TextBlock FontSize="12" FontWeight="Regular">

                This is a group box control content.               








Build smarter apps with Machine Learning, Bots, Cognitive Services - Start free.

Start Learning Now