New to Telerik UI for WPFStart a free 30-day trial

The base class for items control bound to data.

Definition

Namespace:Telerik.Windows.Controls.GridView

Assembly:Telerik.Windows.Controls.GridView.dll

Syntax:

C#
public abstract class BaseItemsControl : DataControl, INotifyPropertyChanged

Inheritance: objectDataControlBaseItemsControl

Derived Classes: GridViewDataControlGridViewGroupRow

Implements: INotifyPropertyChanged

Inherited Members DataControl.ItemsSourcePropertyDataControl.CurrentItemPropertyDataControl.SelectedItemPropertyDataControl.CanUserSelectPropertyDataControl.IsSynchronizedWithCurrentItemPropertyDataControl.SelectionChangedEventDataControl.SelectionChangingEventDataControl.OnItemsPropertyChanged(object, PropertyChangedEventArgs)DataControl.Rebind()DataControl.CreateTableDefinition()DataControl.OnPropertyChanged(string)DataControl.OnCurrentItemChanged()DataControl.OnSelectedItemChanged(object, object)DataControl.OnCanUserSelectChanged(bool, bool)DataControl.RaiseSelectionChangedEvent(SelectionChangeEventArgs)DataControl.OnSelectionChanging(SelectionChangingEventArgs)DataControl.SetIsSelected(object, bool)DataControl.SetIsCurrent(object, bool)DataControl.InitializeSelection()DataControl.ItemsDataControl.ItemsSourceDataControl.TableDefinitionDataControl.CurrentItemDataControl.SelectedItemDataControl.CanUserSelectDataControl.IsSynchronizedWithCurrentItemDataControl.ShouldHandleSelectionDataControl.SelectedItemsDataControl.PropertyChangedDataControl.SelectionChangedDataControl.SelectionChanging...

Constructors

Initializes a new instance of the BaseItemsControl class.

C#
protected BaseItemsControl()

Fields

AlternationCountProperty

DependencyProperty

Identifies the AlternationCount dependency property.

C#
public static readonly DependencyProperty AlternationCountProperty

AlternationIndexProperty

DependencyProperty

Identifies the AlternationIndex dependency property.

C#
public static readonly DependencyProperty AlternationIndexProperty

GroupRenderModeProperty

DependencyProperty

Identifies the GroupRenderMode dependency property.

C#
public static readonly DependencyProperty GroupRenderModeProperty

HasItemsProperty

DependencyProperty

Identifies the HasItems dependency property.

C#
public static readonly DependencyProperty HasItemsProperty

IsGroupingProperty

DependencyProperty

Identifies the IsGrouping dependency property.

C#
public static readonly DependencyProperty IsGroupingProperty

ItemContainerStyleProperty

DependencyProperty

Identifies the ItemContainerStyle dependency property.

C#
public static readonly DependencyProperty ItemContainerStyleProperty

ItemTemplateProperty

DependencyProperty

Identifies the ItemTemplate dependency property.

C#
public static readonly DependencyProperty ItemTemplateProperty

Properties

Gets or sets the number of alternating item containers in the ItemsControl, which enables alternating containers to have a unique appearance.

C#
public int AlternationCount { get; set; }

Gets or sets a value indicating the group render mode of the control.

C#
public GroupRenderMode GroupRenderMode { get; set; }

Gets a value that indicates whether the BaseItemsControl contains items. This is a dependency property.

C#
[Bindable(false)]
public bool HasItems { get; }

Gets a value that indicates whether the control is using grouping. This is a dependency property.

C#
public bool IsGrouping { get; }

Gets the ItemContainerGenerator.

C#
public IContainerGenerator ItemContainerGenerator { get; }
Property Value:

The ItemContainerGenerator.

Gets or sets the Style that is applied to the container element generated for each item. This is a dependency property.

C#
public Style ItemContainerStyle { get; set; }
Property Value:

The Style that is applied to the container element generated for each item. The default value is null.

ItemTemplate

DataTemplate

Gets or set the DataTemplate used to display each item. This is a dependency property.

C#
public DataTemplate ItemTemplate { get; set; }
Property Value:

A DataTemplate that specifies the visualization of the data objects. The default value is null.

Methods

Brings the item with the given index into view. The method will not work before the item containers have been generated.

C#
public void BringIndexIntoView(int index)
Parameters:indexint

The index of the item to be brought into view.

When overridden in a derived class, undoes the effects of the PrepareContainerForGroupOverride method.

C#
protected virtual void ClearContainerForGroupOverride(DependencyObject element, object item)
Parameters:elementDependencyObject

The container element.

itemobject

The item.

When overridden in a derived class, undoes the effects of the PrepareContainerForItemOverride method.

C#
protected virtual void ClearContainerForItemOverride(DependencyObject element, object item)
Parameters:elementDependencyObject

The container element.

itemobject

The item.

Gets the AlternationIndex for the specified object.

C#
public static int GetAlternationIndex(DependencyObject element)
Parameters:elementDependencyObject

The object from which to get the AlternationIndex.

Returns:

int

The value of the AlternationIndex.

Creates or identifies the element that is used to display the given item.

C#
protected virtual DependencyObject GetContainerForItemOverride(object item)
Parameters:itemobjectReturns:

DependencyObject

The element that is used to display the given item.

Returns the BaseItemsControl that the specified element hosts items for.

C#
public static BaseItemsControl GetItemsOwner(DependencyObject element)
Parameters:elementDependencyObject

The host element.

Returns:

BaseItemsControl

The BaseItemsControl that the specified element hosts items for, or null reference (Nothing in Visual Basic).

Returns the BaseItemsControl that owns the specified container element.

C#
public static BaseItemsControl ItemsControlFromItemContainer(DependencyObject container)
Parameters:containerDependencyObject

The container element to return the BaseItemsControl for.

Returns:

BaseItemsControl

The BaseItemsControl that owns the specified container element.

Invoked when the AlternationCount property changes.

C#
protected virtual void OnAlternationCountChanged(int oldAlternationCount, int newAlternationCount)
Parameters:oldAlternationCountint

The old value of AlternationCount.

newAlternationCountint

The new value of AlternationCount.

Called when the virtualization mode changes.

C#
protected virtual void OnGroupRenderModeChanged()

Invoked when the ItemContainerStyle property changes.

C#
protected virtual void OnItemContainerStyleChanged(Style oldItemContainerStyle, Style newItemContainerStyle)
Parameters:oldItemContainerStyleStyle

Old value of the ItemContainerStyle property.

newItemContainerStyleStyle

New value of the ItemContainerStyle property.

Invoked when the Items property changes.

C#
protected virtual void OnItemsChanged(NotifyCollectionChangedEventArgs e)
Parameters:eNotifyCollectionChangedEventArgs

Information about the change.

Called when this.Items collection changes.

C#
protected override void OnItemsCollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
Parameters:senderobject

The sender.

eNotifyCollectionChangedEventArgs

The NotifyCollectionChangedEventArgs instance containing the event data.

Overrides: DataControl.OnItemsCollectionChanged(object, NotifyCollectionChangedEventArgs)

Called when ItemsSource property has changed.

C#
protected override void OnItemsSourceChanged(object oldValue, object newValue)
Parameters:oldValueobject

The old value.

newValueobject

The new value.

Overrides: DataControl.OnItemsSourceChanged(object, object)

Invoked when the ItemTemplate property changes.

C#
protected virtual void OnItemTemplateChanged(DataTemplate oldItemTemplate, DataTemplate newItemTemplate)
Parameters:oldItemTemplateDataTemplate

The old ItemTemplate property value.

newItemTemplateDataTemplate

The new ItemTemplate property value.

Prepares the specified element to display the specified item.

C#
protected virtual void PrepareContainerForGroupItemOverride(DependencyObject element, object item)
Parameters:elementDependencyObjectitemobject

Prepares the specified element to display the specified item.

C#
protected virtual void PrepareContainerForItemOverride(DependencyObject element, object item)
Parameters:elementDependencyObjectitemobject

Extension Methods