--- title: "How to: Define a GroupBox Template" ms.date: "03/30/2017" helpviewer_keywords: - "controls [WPF], GroupBox" - "GroupBox control [WPF], creating templates" ms.assetid: 85a4d1a7-4753-4f4a-b26d-14fa10c1ddb5 --- # How to: Define a GroupBox Template This example shows how to create a template for a control. ## Example The following example defines a control template by using a control for layout. The template uses a to define the border of the so that the border does not obscure the content. [!code-xaml[GroupBoxSnippet#GroupBoxTemplate](~/samples/snippets/csharp/VS_Snippets_Wpf/GroupBoxSnippet/CS/Window1.xaml#groupboxtemplate)] ## See also - - [How to: Create a GroupBox](https://docs.microsoft.com/previous-versions/dotnet/netframework-3.5/ms748321(v=vs.90))