Class ItemsControl
Implements base class for control with items
Inheritance
Inherited Members
Namespace: EmptyKeys.UserInterface.Controls
Assembly: EmptyKeys.UserInterface.dll
Syntax
public class ItemsControl : Control
Constructors
ItemsControl()
Initializes a new instance of the ItemsControl class.
Declaration
public ItemsControl()
Fields
ItemsPanelProperty
The items panel property
Declaration
public static readonly DependencyProperty ItemsPanelProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
ItemsSourceProperty
The items source property
Declaration
public static readonly DependencyProperty ItemsSourceProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
ItemTemplateProperty
The item template property
Declaration
public static readonly DependencyProperty ItemTemplateProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
Properties
Items
Gets the items.
Declaration
public List<object> Items { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<System.Object> | The items. |
ItemsPanel
Gets or sets the items panel.
Declaration
public ControlTemplate ItemsPanel { get; set; }
Property Value
Type | Description |
---|---|
ControlTemplate | The items panel. |
ItemsSource
Gets or sets the items source.
Declaration
public IEnumerable ItemsSource { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.IEnumerable | The items source. |
ItemTemplate
Gets or sets the item template.
Declaration
public DataTemplate ItemTemplate { get; set; }
Property Value
Type | Description |
---|---|
DataTemplate | The item template. |
Methods
GetContainerForItemOverride(Object)
Gets the container for item
Declaration
protected virtual UIElement GetContainerForItemOverride(object item)
Parameters
Type | Name | Description |
---|---|---|
System.Object | item | The item. |
Returns
Type | Description |
---|---|
UIElement |
IsItemItsOwnContainerOverride(Object)
Determines whether if [is item its own container override].
Declaration
protected virtual bool IsItemItsOwnContainerOverride(object item)
Parameters
Type | Name | Description |
---|---|---|
System.Object | item | The item. |
Returns
Type | Description |
---|---|
System.Boolean |
OnApplyTemplate()
Called when [apply template].
Declaration
public override void OnApplyTemplate()
Overrides
OnContainersChanged()
Called when [containers changed].
Declaration
protected virtual void OnContainersChanged()
OnItemInserted(Int32)
Called when [item inserted].
Declaration
protected virtual void OnItemInserted(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The index. |
OnItemRemoved()
Called when [item removed].
Declaration
protected virtual void OnItemRemoved()
OnItemsCleared()
Called when [items cleared].
Declaration
protected virtual void OnItemsCleared()
OnItemsSourceChanged(DependencyPropertyChangedEventArgs)
Raises the ItemsSourceChanged event.
Declaration
protected virtual void OnItemsSourceChanged(DependencyPropertyChangedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
DependencyPropertyChangedEventArgs | e | The DependencyPropertyChangedEventArgs instance containing the event data. |
OnPropertyChanged(DependencyProperty)
Called when [property changed].
Declaration
protected override void OnPropertyChanged(DependencyProperty property)
Parameters
Type | Name | Description |
---|---|---|
DependencyProperty | property | The property. |
Overrides
SetContainer(UIElement, UIElement)
Sets the container.
Declaration
protected virtual void SetContainer(UIElement itemContainer, UIElement contentVisual)
Parameters
Type | Name | Description |
---|---|---|
UIElement | itemContainer | The item container. |
UIElement | contentVisual | The content visual. |