Table of Contents

Class HeaderedContentControl

Namespace
Avalonia.Controls.Primitives
Assembly
Avalonia.Controls.dll

A ContentControl with a header.

[TemplatePart("PART_HeaderPresenter", typeof(ContentPresenter))]
public class HeaderedContentControl : ContentControl, INotifyPropertyChanged, IDataContextProvider, ILogical, IThemeVariantHost, IResourceHost, IResourceNode, IStyleHost, ISetLogicalParent, ISetInheritanceParent, ISupportInitialize, IStyleable, INamed, IInputElement, IDataTemplateHost, ISetterValue
Inheritance
HeaderedContentControl
Implements
Derived
Inherited Members
Extension Methods

Constructors

HeaderedContentControl()

public HeaderedContentControl()

Fields

HeaderProperty

Defines the Header property.

public static readonly StyledProperty<object?> HeaderProperty

Field Value

StyledProperty<object>

HeaderTemplateProperty

Defines the HeaderTemplate property.

public static readonly StyledProperty<IDataTemplate?> HeaderTemplateProperty

Field Value

StyledProperty<IDataTemplate>

Properties

Header

Gets or sets the header content.

public object? Header { get; set; }

Property Value

object

HeaderPresenter

Gets the header presenter from the control's template.

public ContentPresenter? HeaderPresenter { get; }

Property Value

ContentPresenter

HeaderTemplate

Gets or sets the data template used to display the header content of the control.

public IDataTemplate? HeaderTemplate { get; set; }

Property Value

IDataTemplate

Methods

RegisterContentPresenter(ContentPresenter)

Called when an ContentPresenter is registered with the control.

protected override bool RegisterContentPresenter(ContentPresenter presenter)

Parameters

presenter ContentPresenter

The presenter.

Returns

bool