diff --git a/components/HeaderedContentControl/OpenSolution.bat b/components/HeaderedContentControl/OpenSolution.bat
new file mode 100644
index 00000000..814a56d4
--- /dev/null
+++ b/components/HeaderedContentControl/OpenSolution.bat
@@ -0,0 +1,3 @@
+@ECHO OFF
+
+powershell ..\..\tooling\ProjectHeads\GenerateSingleSampleHeads.ps1 -componentPath %CD% %*
\ No newline at end of file
diff --git a/components/HeaderedContentControl/samples/Assets/BisonBadlandsChillin.jpg b/components/HeaderedContentControl/samples/Assets/BisonBadlandsChillin.jpg
new file mode 100644
index 00000000..8e5b8873
Binary files /dev/null and b/components/HeaderedContentControl/samples/Assets/BisonBadlandsChillin.jpg differ
diff --git a/components/HeaderedContentControl/samples/Assets/Sunny.png b/components/HeaderedContentControl/samples/Assets/Sunny.png
new file mode 100644
index 00000000..59cbe9fb
Binary files /dev/null and b/components/HeaderedContentControl/samples/Assets/Sunny.png differ
diff --git a/components/HeaderedContentControl/samples/Dependencies.props b/components/HeaderedContentControl/samples/Dependencies.props
new file mode 100644
index 00000000..e622e1df
--- /dev/null
+++ b/components/HeaderedContentControl/samples/Dependencies.props
@@ -0,0 +1,31 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/components/HeaderedContentControl/samples/HeaderedContentControl.Samples.csproj b/components/HeaderedContentControl/samples/HeaderedContentControl.Samples.csproj
new file mode 100644
index 00000000..26b98c67
--- /dev/null
+++ b/components/HeaderedContentControl/samples/HeaderedContentControl.Samples.csproj
@@ -0,0 +1,20 @@
+
+
+ HeaderedContentControl
+
+
+
+
+
+
+
+
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+
diff --git a/components/HeaderedContentControl/samples/HeaderedContentControl.md b/components/HeaderedContentControl/samples/HeaderedContentControl.md
new file mode 100644
index 00000000..f3df3593
--- /dev/null
+++ b/components/HeaderedContentControl/samples/HeaderedContentControl.md
@@ -0,0 +1,76 @@
+---
+title: HeaderedContentControl
+author: skendrot
+description: The HeaderedContentControl allows content to be displayed with a specified header.
+keywords: HeaderedContentControl, Control, headered
+dev_langs:
+ - csharp
+category: Controls
+subcategory: Layout
+discussion-id: 0
+issue-id: 0
+---
+
+# HeaderedContentControl
+
+The [HeaderedContentControl](/dotnet/api/microsoft.toolkit.uwp.ui.controls.headeredcontentcontrol) is a UI control that allows content to be displayed with a specified header. The `Header` property can be any object and you can use the `HeaderTemplate` to specify a custom look to the header. Content for the HeaderedContentControl will align to the top left. This is to maintain the same functionality as the ContentControl.
+
+> [!NOTE]
+> Setting the `Background`, `BorderBrush` and `BorderThickness` properties will not have any effect on the HeaderedContentControl. This is to maintain the same functionality as the ContentControl.
+
+> [!Sample HeaderedContentControlSample]
+
+> [!Sample HeaderedContentControlTextSample]
+
+> [!Sample HeaderedContentControlImageSample]
+
+> [!Sample HeaderedContentControlComplexSample]
+
+## Syntax
+
+```xaml
+
+
+
+
+
+```
+
+## Properties
+
+| Property | Type | Gets or sets the data used for the header of each control |
+| -- | -- | -- |
+| Header | object | Gets or sets the data used for the header of each control |
+| HeaderTemplate | DataTemplate | Gets or sets the template used to display the content of the control's header |
+| Orientation | Orientation | Gets or sets the Orientation to use for layout of the header. If set to Vertical the Header will be above the content. If set to Horizontal the Header will be to the left of the content. |
+
+### Examples
+
+- The `Header` property can be set to a string, or any xaml elements. If binding the `Header` to an object that is not a string, use the `HeaderTemplate` to control how the content is rendered.
+
+ *Sample Code*
+
+ ```xaml
+
+
+
+
+
+
+
+
+
+ ```
+
+- Used to control the look of the header. The default value for the `HeaderTemplate` will display the string representation of the `Header`. Set this property if you need to bind the `Header` to an object.
+
+ ```xaml
+
+
+
+
+
+
+
+ ```
diff --git a/components/HeaderedContentControl/samples/HeaderedContentControlComplexSample.xaml b/components/HeaderedContentControl/samples/HeaderedContentControlComplexSample.xaml
new file mode 100644
index 00000000..5b2ce71d
--- /dev/null
+++ b/components/HeaderedContentControl/samples/HeaderedContentControlComplexSample.xaml
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/components/HeaderedContentControl/samples/HeaderedContentControlComplexSample.xaml.cs b/components/HeaderedContentControl/samples/HeaderedContentControlComplexSample.xaml.cs
new file mode 100644
index 00000000..288c6424
--- /dev/null
+++ b/components/HeaderedContentControl/samples/HeaderedContentControlComplexSample.xaml.cs
@@ -0,0 +1,16 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+using CommunityToolkit.WinUI.Controls;
+
+namespace HeaderedContentControlExperiment.Samples;
+
+[ToolkitSample(id: nameof(HeaderedContentControlComplexSample), "HeaderedContentControl Complex Sample", description: $"A sample for showing how to create and use a {nameof(HeaderedContentControl)} control with complex content.")]
+public sealed partial class HeaderedContentControlComplexSample : Page
+{
+ public HeaderedContentControlComplexSample()
+ {
+ this.InitializeComponent();
+ }
+}
diff --git a/components/HeaderedContentControl/samples/HeaderedContentControlImageSample.xaml b/components/HeaderedContentControl/samples/HeaderedContentControlImageSample.xaml
new file mode 100644
index 00000000..9874c605
--- /dev/null
+++ b/components/HeaderedContentControl/samples/HeaderedContentControlImageSample.xaml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
diff --git a/components/HeaderedContentControl/samples/HeaderedContentControlImageSample.xaml.cs b/components/HeaderedContentControl/samples/HeaderedContentControlImageSample.xaml.cs
new file mode 100644
index 00000000..049c59cb
--- /dev/null
+++ b/components/HeaderedContentControl/samples/HeaderedContentControlImageSample.xaml.cs
@@ -0,0 +1,16 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+using CommunityToolkit.WinUI.Controls;
+
+namespace HeaderedContentControlExperiment.Samples;
+
+[ToolkitSample(id: nameof(HeaderedContentControlImageSample), "HeaderedContentControl Image Sample", description: $"A sample for showing how to create and use a {nameof(HeaderedContentControl)} control with image content.")]
+public sealed partial class HeaderedContentControlImageSample : Page
+{
+ public HeaderedContentControlImageSample()
+ {
+ this.InitializeComponent();
+ }
+}
diff --git a/components/HeaderedContentControl/samples/HeaderedContentControlSample.xaml b/components/HeaderedContentControl/samples/HeaderedContentControlSample.xaml
new file mode 100644
index 00000000..7c5dc54a
--- /dev/null
+++ b/components/HeaderedContentControl/samples/HeaderedContentControlSample.xaml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
diff --git a/components/HeaderedContentControl/samples/HeaderedContentControlSample.xaml.cs b/components/HeaderedContentControl/samples/HeaderedContentControlSample.xaml.cs
new file mode 100644
index 00000000..e38abd03
--- /dev/null
+++ b/components/HeaderedContentControl/samples/HeaderedContentControlSample.xaml.cs
@@ -0,0 +1,16 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+using CommunityToolkit.WinUI.Controls;
+
+namespace HeaderedContentControlExperiment.Samples;
+
+[ToolkitSample(id: nameof(HeaderedContentControlSample), "HeaderedContentControl", description: $"A sample for showing how to create and use a {nameof(HeaderedContentControl)} control.")]
+public sealed partial class HeaderedContentControlSample : Page
+{
+ public HeaderedContentControlSample()
+ {
+ this.InitializeComponent();
+ }
+}
diff --git a/components/HeaderedContentControl/samples/HeaderedContentControlTextSample.xaml b/components/HeaderedContentControl/samples/HeaderedContentControlTextSample.xaml
new file mode 100644
index 00000000..6cb5d85e
--- /dev/null
+++ b/components/HeaderedContentControl/samples/HeaderedContentControlTextSample.xaml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
diff --git a/components/HeaderedContentControl/samples/HeaderedContentControlTextSample.xaml.cs b/components/HeaderedContentControl/samples/HeaderedContentControlTextSample.xaml.cs
new file mode 100644
index 00000000..b5218250
--- /dev/null
+++ b/components/HeaderedContentControl/samples/HeaderedContentControlTextSample.xaml.cs
@@ -0,0 +1,16 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+using CommunityToolkit.WinUI.Controls;
+
+namespace HeaderedContentControlExperiment.Samples;
+
+[ToolkitSample(id: nameof(HeaderedContentControlTextSample), "HeaderedContentControl Text Sample", description: $"A sample for showing how to create and use a {nameof(HeaderedContentControl)} control with text content.")]
+public sealed partial class HeaderedContentControlTextSample : Page
+{
+ public HeaderedContentControlTextSample()
+ {
+ this.InitializeComponent();
+ }
+}
diff --git a/components/HeaderedContentControl/src/AdditionalAssemblyInfo.cs b/components/HeaderedContentControl/src/AdditionalAssemblyInfo.cs
new file mode 100644
index 00000000..ba8804d3
--- /dev/null
+++ b/components/HeaderedContentControl/src/AdditionalAssemblyInfo.cs
@@ -0,0 +1,13 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+using System.Runtime.CompilerServices;
+
+// These `InternalsVisibleTo` calls are intended to make it easier for
+// for any internal code to be testable in all the different test projects
+// used with the Labs infrastructure.
+[assembly: InternalsVisibleTo("HeaderedContentControl.Tests.Uwp")]
+[assembly: InternalsVisibleTo("HeaderedContentControl.Tests.WinAppSdk")]
+[assembly: InternalsVisibleTo("CommunityToolkit.Tests.Uwp")]
+[assembly: InternalsVisibleTo("CommunityToolkit.Tests.WinAppSdk")]
diff --git a/components/HeaderedContentControl/src/CommunityToolkit.WinUI.Controls.HeaderedContentControl.csproj b/components/HeaderedContentControl/src/CommunityToolkit.WinUI.Controls.HeaderedContentControl.csproj
new file mode 100644
index 00000000..15fba2fb
--- /dev/null
+++ b/components/HeaderedContentControl/src/CommunityToolkit.WinUI.Controls.HeaderedContentControl.csproj
@@ -0,0 +1,17 @@
+
+
+ HeaderedContentControl
+ This package contains HeaderedContentControl.
+ 8.0.0-beta.1
+
+
+ CommunityToolkit.WinUI.Controls.HeaderedContentControlRns
+
+
+
+
+
+
+ $(PackageIdPrefix).$(PackageIdVariant).Controls.$(ToolkitComponentName)
+
+
diff --git a/components/HeaderedContentControl/src/Dependencies.props b/components/HeaderedContentControl/src/Dependencies.props
new file mode 100644
index 00000000..e622e1df
--- /dev/null
+++ b/components/HeaderedContentControl/src/Dependencies.props
@@ -0,0 +1,31 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/components/HeaderedContentControl/src/HeaderedContentControl.cs b/components/HeaderedContentControl/src/HeaderedContentControl.cs
new file mode 100644
index 00000000..e1affb78
--- /dev/null
+++ b/components/HeaderedContentControl/src/HeaderedContentControl.cs
@@ -0,0 +1,138 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+namespace CommunityToolkit.WinUI.Controls;
+
+///
+/// Provides the base implementation for all controls that contain single content and have a header.
+///
+public partial class HeaderedContentControl : ContentControl
+{
+ private const string PartHeaderPresenter = "HeaderPresenter";
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public HeaderedContentControl()
+ {
+ DefaultStyleKey = typeof(HeaderedContentControl);
+ }
+
+ ///
+ /// Identifies the dependency property.
+ ///
+ public static readonly DependencyProperty HeaderProperty = DependencyProperty.Register(
+ "Header",
+ typeof(object),
+ typeof(HeaderedContentControl),
+ new PropertyMetadata(null, OnHeaderChanged));
+
+ ///
+ /// Identifies the dependency property.
+ ///
+ public static readonly DependencyProperty HeaderTemplateProperty = DependencyProperty.Register(
+ "HeaderTemplate",
+ typeof(DataTemplate),
+ typeof(HeaderedContentControl),
+ new PropertyMetadata(null));
+
+ ///
+ /// Identifies the dependency property.
+ ///
+ public static readonly DependencyProperty OrientationProperty = DependencyProperty.Register(
+ nameof(Orientation),
+ typeof(Orientation),
+ typeof(HeaderedContentControl),
+ new PropertyMetadata(Orientation.Vertical, OnOrientationChanged));
+
+ ///
+ /// Gets or sets the used for the header.
+ ///
+ ///
+ /// If set to the header will be above the content.
+ /// If set to the header will be to the left of the content.
+ ///
+ public Orientation Orientation
+ {
+ get { return (Orientation)GetValue(OrientationProperty); }
+ set { SetValue(OrientationProperty, value); }
+ }
+
+ ///
+ /// Gets or sets the data used for the header of each control.
+ ///
+ public object Header
+ {
+ get { return GetValue(HeaderProperty); }
+ set { SetValue(HeaderProperty, value); }
+ }
+
+ ///
+ /// Gets or sets the template used to display the content of the control's header.
+ ///
+ public DataTemplate HeaderTemplate
+ {
+ get { return (DataTemplate)GetValue(HeaderTemplateProperty); }
+ set { SetValue(HeaderTemplateProperty, value); }
+ }
+
+ ///
+ protected override void OnApplyTemplate()
+ {
+ base.OnApplyTemplate();
+
+ SetHeaderVisibility();
+ SetOrientation();
+ }
+
+ ///
+ /// Called when the property changes.
+ ///
+ /// The old value of the property.
+ /// The new value of the property.
+ protected virtual void OnHeaderChanged(object oldValue, object newValue)
+ {
+ }
+
+ private static void OnOrientationChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
+ {
+ var control = (HeaderedContentControl)d;
+ control.SetOrientation();
+ }
+
+ private static void OnHeaderChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
+ {
+ var control = (HeaderedContentControl)d;
+ control.SetHeaderVisibility();
+ control.OnHeaderChanged(e.OldValue, e.NewValue);
+ }
+
+ private void SetHeaderVisibility()
+ {
+ if (GetTemplateChild(PartHeaderPresenter) is FrameworkElement headerPresenter)
+ {
+ if (Header is string headerText)
+ {
+ headerPresenter.Visibility = string.IsNullOrEmpty(headerText)
+ ? Visibility.Collapsed
+ : Visibility.Visible;
+ }
+ else
+ {
+ headerPresenter.Visibility = Header != null
+ ? Visibility.Visible
+ : Visibility.Collapsed;
+ }
+ }
+ }
+
+ private void SetOrientation()
+ {
+ var orientation = this.Orientation == Orientation.Vertical
+ ? nameof(Orientation.Vertical)
+ : nameof(Orientation.Horizontal);
+
+ VisualStateManager.GoToState(this, orientation, true);
+ }
+}
diff --git a/components/HeaderedContentControl/src/HeaderedContentControl.xaml b/components/HeaderedContentControl/src/HeaderedContentControl.xaml
new file mode 100644
index 00000000..6f874519
--- /dev/null
+++ b/components/HeaderedContentControl/src/HeaderedContentControl.xaml
@@ -0,0 +1,55 @@
+
+
+
+
+
+
+
+
diff --git a/components/HeaderedContentControl/src/MultiTarget.props b/components/HeaderedContentControl/src/MultiTarget.props
new file mode 100644
index 00000000..b11c1942
--- /dev/null
+++ b/components/HeaderedContentControl/src/MultiTarget.props
@@ -0,0 +1,9 @@
+
+
+
+ uwp;wasdk;wpf;wasm;linuxgtk;macos;ios;android;
+
+
\ No newline at end of file
diff --git a/components/HeaderedContentControl/src/Themes/Generic.xaml b/components/HeaderedContentControl/src/Themes/Generic.xaml
new file mode 100644
index 00000000..99aa4b24
--- /dev/null
+++ b/components/HeaderedContentControl/src/Themes/Generic.xaml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
diff --git a/components/HeaderedContentControl/tests/HeaderedContentControl.Tests.projitems b/components/HeaderedContentControl/tests/HeaderedContentControl.Tests.projitems
new file mode 100644
index 00000000..aa263439
--- /dev/null
+++ b/components/HeaderedContentControl/tests/HeaderedContentControl.Tests.projitems
@@ -0,0 +1,11 @@
+
+
+
+ $(MSBuildAllProjects);$(MSBuildThisFileFullPath)
+ true
+ 863388CB-7C3F-4CD3-8ACE-79F0BB855EFD
+
+
+ HeaderedContentControlExperiment.Tests
+
+
\ No newline at end of file
diff --git a/components/HeaderedContentControl/tests/HeaderedContentControl.Tests.shproj b/components/HeaderedContentControl/tests/HeaderedContentControl.Tests.shproj
new file mode 100644
index 00000000..5a76a5e7
--- /dev/null
+++ b/components/HeaderedContentControl/tests/HeaderedContentControl.Tests.shproj
@@ -0,0 +1,13 @@
+
+
+
+ 863388CB-7C3F-4CD3-8ACE-79F0BB855EFD
+ 14.0
+
+
+
+
+
+
+
+