Table of Contents

Class HeaderedItemsControl

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

Represents an ItemsControl with a related header.

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

Constructors

HeaderedItemsControl()

public HeaderedItemsControl()

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 content of the control's header.

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

OnAttachedToLogicalTree(LogicalTreeAttachmentEventArgs)

Called when the styled element is added to a rooted logical tree.

protected override void OnAttachedToLogicalTree(LogicalTreeAttachmentEventArgs e)

Parameters

e LogicalTreeAttachmentEventArgs

The event args.

RegisterContentPresenter(ContentPresenter)

Called when an ContentPresenter is registered with the control.

protected virtual bool RegisterContentPresenter(ContentPresenter presenter)

Parameters

presenter ContentPresenter

The presenter.

Returns

bool