Class HeaderedItemsControl
Represents a control that contains a collection of items and a header.
Inheritance
Inherited Members
Namespace: System.Windows.Controls
Assembly: OpenSilver.dll
Syntax
[StyleTypedProperty(Property = "ItemContainerStyle", StyleTargetType = typeof(ContentPresenter))]
public class HeaderedItemsControl : ItemsControl
Constructors
| Improve this Doc View SourceHeaderedItemsControl()
Initializes a new instance of the HeaderedItemsControl class.
Declaration
public HeaderedItemsControl()
Fields
| Improve this Doc View SourceHeaderProperty
Identifies the Header dependency property.
Declaration
public static readonly DependencyProperty HeaderProperty
Field Value
Type | Description |
---|---|
DependencyProperty | The identifier for the Header dependency property. |
Remarks
Note: WPF defines this property via a call to AddOwner of HeaderedContentControl's HeaderProperty.
HeaderTemplateProperty
Identifies the HeaderTemplate dependency property.
Declaration
public static readonly DependencyProperty HeaderTemplateProperty
Field Value
Type | Description |
---|---|
DependencyProperty | The identifier for the HeaderTemplate dependency property. |
Remarks
Note: WPF defines this property via a call to AddOwner of HeaderedContentControl's HeaderTemplateProperty.
ItemContainerStyleProperty
Identifies the ItemContainerStyle dependency property.
Declaration
public static readonly DependencyProperty ItemContainerStyleProperty
Field Value
Type | Description |
---|---|
DependencyProperty | The identifier for the ItemContainerStyle dependency property. |
Properties
| Improve this Doc View SourceHeader
Gets or sets the item that labels the control.
Declaration
public object Header { get; set; }
Property Value
Type | Description |
---|---|
System.Object | The item that labels the control. The default value is null. |
HeaderTemplate
Gets or sets a data template that is used to display the contents of the control's header.
Declaration
public DataTemplate HeaderTemplate { get; set; }
Property Value
Type | Description |
---|---|
DataTemplate | Gets or sets a data template that is used to display the contents of the control's header. The default is null. |
ItemContainerStyle
Gets or sets the Style that is applied to the container element generated for each item.
Declaration
public Style ItemContainerStyle { get; set; }
Property Value
Type | Description |
---|---|
Style | The Style that is applied to the container element generated for each item. The default is null. |
Methods
| Improve this Doc View SourceOnApplyTemplate()
Builds the visual tree for the HeaderedItemsControl when a new template is applied.
Declaration
public override void OnApplyTemplate()
Overrides
| Improve this Doc View SourceOnHeaderChanged(Object, Object)
Called when the value of the Header property changes.
Declaration
protected virtual void OnHeaderChanged(object oldHeader, object newHeader)
Parameters
Type | Name | Description |
---|---|---|
System.Object | oldHeader | The old value of the Header property. |
System.Object | newHeader | The new value of the Header property. |
OnHeaderTemplateChanged(DataTemplate, DataTemplate)
Called when the value of the HeaderTemplate property changes.
Declaration
protected virtual void OnHeaderTemplateChanged(DataTemplate oldHeaderTemplate, DataTemplate newHeaderTemplate)
Parameters
Type | Name | Description |
---|---|---|
DataTemplate | oldHeaderTemplate | The old value of the HeaderTemplate property. |
DataTemplate | newHeaderTemplate | The new value of the HeaderTemplate property. |
PrepareContainerForItemOverride(DependencyObject, Object)
Prepares the specified element to display the specified item.
Declaration
protected override void PrepareContainerForItemOverride(DependencyObject element, object item)
Parameters
Type | Name | Description |
---|---|---|
DependencyObject | element | The container element used to display the specified item. |
System.Object | item | The content to display. |