Class
BaseItemsControl

The base class for items control bound to data.

Definition

Namespace:Telerik.Windows.Controls.GridView

Assembly:Telerik.Windows.Controls.GridView.dll

Syntax:

cs-api-definition
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

BaseItemsControl()

Initializes a new instance of the BaseItemsControl class.

Declaration

cs-api-definition
protected BaseItemsControl()

Fields

AlternationCountProperty

Identifies the AlternationCount dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty AlternationCountProperty

Field Value

DependencyProperty

AlternationIndexProperty

Identifies the AlternationIndex dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty AlternationIndexProperty

Field Value

DependencyProperty

GroupRenderModeProperty

Identifies the GroupRenderMode dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty GroupRenderModeProperty

Field Value

DependencyProperty

HasItemsProperty

Identifies the HasItems dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty HasItemsProperty

Field Value

DependencyProperty

IsGroupingProperty

Identifies the IsGrouping dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty IsGroupingProperty

Field Value

DependencyProperty

ItemContainerStyleProperty

Identifies the ItemContainerStyle dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty ItemContainerStyleProperty

Field Value

DependencyProperty

ItemTemplateProperty

Identifies the ItemTemplate dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty ItemTemplateProperty

Field Value

DependencyProperty

Properties

AlternationCount

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

Declaration

cs-api-definition
public int AlternationCount { get; set; }

Property Value

int

GroupRenderMode

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

Declaration

cs-api-definition
public GroupRenderMode GroupRenderMode { get; set; }

Property Value

GroupRenderMode

HasItems

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

Declaration

cs-api-definition
[Bindable(false)]
public bool HasItems { get; }

Property Value

bool

IsGrouping

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

Declaration

cs-api-definition
public bool IsGrouping { get; }

Property Value

bool

ItemContainerGenerator

Gets the ItemContainerGenerator.

Declaration

cs-api-definition
public IContainerGenerator ItemContainerGenerator { get; }

Property Value

IContainerGenerator

The ItemContainerGenerator.

ItemContainerStyle

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

Declaration

cs-api-definition
public Style ItemContainerStyle { get; set; }

Property Value

Style

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

ItemTemplate

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

Declaration

cs-api-definition
public DataTemplate ItemTemplate { get; set; }

Property Value

DataTemplate

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

Methods

BringIndexIntoView(int)

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

Declaration

cs-api-definition
public void BringIndexIntoView(int index)

Parameters

index

int

The index of the item to be brought into view.

ClearContainerForGroupOverride(DependencyObject, object)

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

Declaration

cs-api-definition
protected virtual void ClearContainerForGroupOverride(DependencyObject element, object item)

Parameters

element

DependencyObject

The container element.

item

object

The item.

ClearContainerForItemOverride(DependencyObject, object)

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

Declaration

cs-api-definition
protected virtual void ClearContainerForItemOverride(DependencyObject element, object item)

Parameters

element

DependencyObject

The container element.

item

object

The item.

GetAlternationIndex(DependencyObject)

Gets the AlternationIndex for the specified object.

Declaration

cs-api-definition
public static int GetAlternationIndex(DependencyObject element)

Parameters

element

DependencyObject

The object from which to get the AlternationIndex.

Returns

int

The value of the AlternationIndex.

GetContainerForItemOverride(object)

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

Declaration

cs-api-definition
protected virtual DependencyObject GetContainerForItemOverride(object item)

Parameters

item

object

Returns

DependencyObject

The element that is used to display the given item.

GetItemsOwner(DependencyObject)

Returns the BaseItemsControl that the specified element hosts items for.

Declaration

cs-api-definition
public static BaseItemsControl GetItemsOwner(DependencyObject element)

Parameters

element

DependencyObject

The host element.

Returns

BaseItemsControl

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

ItemsControlFromItemContainer(DependencyObject)

Returns the BaseItemsControl that owns the specified container element.

Declaration

cs-api-definition
public static BaseItemsControl ItemsControlFromItemContainer(DependencyObject container)

Parameters

container

DependencyObject

The container element to return the BaseItemsControl for.

Returns

BaseItemsControl

The BaseItemsControl that owns the specified container element.

OnAlternationCountChanged(int, int)

Invoked when the AlternationCount property changes.

Declaration

cs-api-definition
protected virtual void OnAlternationCountChanged(int oldAlternationCount, int newAlternationCount)

Parameters

oldAlternationCount

int

The old value of AlternationCount.

newAlternationCount

int

The new value of AlternationCount.

OnGroupRenderModeChanged()

Called when the virtualization mode changes.

Declaration

cs-api-definition
protected virtual void OnGroupRenderModeChanged()

OnItemContainerStyleChanged(Style, Style)

Invoked when the ItemContainerStyle property changes.

Declaration

cs-api-definition
protected virtual void OnItemContainerStyleChanged(Style oldItemContainerStyle, Style newItemContainerStyle)

Parameters

oldItemContainerStyle

Style

Old value of the ItemContainerStyle property.

newItemContainerStyle

Style

New value of the ItemContainerStyle property.

OnItemTemplateChanged(DataTemplate, DataTemplate)

Invoked when the ItemTemplate property changes.

Declaration

cs-api-definition
protected virtual void OnItemTemplateChanged(DataTemplate oldItemTemplate, DataTemplate newItemTemplate)

Parameters

oldItemTemplate

DataTemplate

The old ItemTemplate property value.

newItemTemplate

DataTemplate

The new ItemTemplate property value.

OnItemsChanged(NotifyCollectionChangedEventArgs)

Invoked when the Items property changes.

Declaration

cs-api-definition
protected virtual void OnItemsChanged(NotifyCollectionChangedEventArgs e)

Parameters

e

NotifyCollectionChangedEventArgs

Information about the change.

OnItemsCollectionChanged(object, NotifyCollectionChangedEventArgs)

Called when this.Items collection changes.

Declaration

cs-api-definition
protected override void OnItemsCollectionChanged(object sender, NotifyCollectionChangedEventArgs e)

Parameters

sender

object

The sender.

e

NotifyCollectionChangedEventArgs

The NotifyCollectionChangedEventArgs instance containing the event data.

Overrides DataControl.OnItemsCollectionChanged(object, NotifyCollectionChangedEventArgs)

OnItemsSourceChanged(object, object)

Called when ItemsSource property has changed.

Declaration

cs-api-definition
protected override void OnItemsSourceChanged(object oldValue, object newValue)

Parameters

oldValue

object

The old value.

newValue

object

The new value.

Overrides DataControl.OnItemsSourceChanged(object, object)

PrepareContainerForGroupItemOverride(DependencyObject, object)

Prepares the specified element to display the specified item.

Declaration

cs-api-definition
protected virtual void PrepareContainerForGroupItemOverride(DependencyObject element, object item)

Parameters

element

DependencyObject

item

object

PrepareContainerForItemOverride(DependencyObject, object)

Prepares the specified element to display the specified item.

Declaration

cs-api-definition
protected virtual void PrepareContainerForItemOverride(DependencyObject element, object item)

Parameters

element

DependencyObject

item

object

Extension Methods