skip navigation
  • Product Bundles

    DevCraft

    All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:

    • NEW: Design Kits for Figma
    • Online Training
    • Document Processing Library
    • Embedded Reporting for web and desktop
    Web
    Kendo UI UI for jQuery UI for Angular UI for React UI for Vue UI for Blazor UI for ASP.NET Core UI for ASP.NET MVC UI for ASP.NET AJAX UI for Silverlight UI for PHP UI for JSP
    Mobile
    UI for .NET MAUI UI for Xamarin
    Document Management
    Telerik Document Processing
    Desktop
    UI for .NET MAUI UI for WinUI UI for WinForms UI for WPF UI for UWP
    Reporting & Mocking
    Telerik Reporting Telerik Report Server Telerik JustMock
    Automated Testing
    Test Studio Test Studio Dev Edition
    CMS
    Sitefinity
    UI/UX Tools
    ThemeBuilder Design System Kit
    Debugging
    Fiddler Fiddler Everywhere Fiddler Classic Fiddler Jam FiddlerCap FiddlerCore
    Extended Reality
    UI for Unity XR
    Free Tools
    JustAssembly JustDecompile VB.NET to C# Converter Testing Framework
    View all products
  • Overview
  • Demos
    • What's New
    • Release History
  • Docs & Support
  • Pricing
  • Search
  • Shopping cart
    • Account Overview
    • Your Licenses
    • Support Center
    • Forum Profile
    • Payment Methods
    • Edit Profile
    • Log out
  • Login
  • Contact Us
  • Try now

Class BaseItemsControl

The base class for items control bound to data.

Inheritance
System.Object
DataControl
BaseItemsControl
GridViewDataControl
GridViewGroupRow
Inherited Members
DataControl.CurrentItemProperty
DataControl.SelectedItemProperty
DataControl.CanUserSelectProperty
DataControl.IsSynchronizedWithCurrentItemProperty
DataControl.SelectionChangedEvent
DataControl.SelectionChangingEvent
DataControl.ItemsSourceProperty
DataControl.OnCurrentItemChanged()
DataControl.OnSelectedItemChanged(Object, Object)
DataControl.OnCanUserSelectChanged(Boolean, Boolean)
DataControl.RaiseSelectionChangedEvent(SelectionChangeEventArgs)
DataControl.OnSelectionChanging(SelectionChangingEventArgs)
DataControl.SetIsSelected(Object, Boolean)
DataControl.SetIsCurrent(Object, Boolean)
DataControl.InitializeSelection()
DataControl.OnItemsPropertyChanged(Object, PropertyChangedEventArgs)
DataControl.Rebind()
DataControl.CreateTableDefinition()
DataControl.OnPropertyChanged(String)
DataControl.CurrentItem
DataControl.SelectedItem
DataControl.CanUserSelect
DataControl.IsSynchronizedWithCurrentItem
DataControl.ShouldHandleSelection
DataControl.SelectedItems
DataControl.Items
DataControl.ItemsSource
DataControl.TableDefinition
DataControl.SelectionChanged
DataControl.SelectionChanging
DataControl.PropertyChanged
Namespace: Telerik.Windows.Controls.GridView
Assembly: Telerik.Windows.Controls.GridView.dll

Syntax

public abstract class BaseItemsControl : DataControl, ISelectorInternal, INotifyPropertyChanged, IGeneratorHost, IGroupsProvider

Constructors

BaseItemsControl()

Initializes a new instance of the BaseItemsControl class.

Declaration
protected BaseItemsControl()

Fields

AlternationCountProperty

Identifies the AlternationCount dependency property.

Declaration
public static readonly DependencyProperty AlternationCountProperty
Field Value
System.Windows.DependencyProperty

AlternationIndexProperty

Identifies the AlternationIndex dependency property.

Declaration
public static readonly DependencyProperty AlternationIndexProperty
Field Value
System.Windows.DependencyProperty

GroupRenderModeProperty

Identifies the GroupRenderMode dependency property.

Declaration
public static readonly DependencyProperty GroupRenderModeProperty
Field Value
System.Windows.DependencyProperty

HasItemsProperty

Identifies the HasItems dependency property.

Declaration
public static readonly DependencyProperty HasItemsProperty
Field Value
System.Windows.DependencyProperty

IsGroupingProperty

Identifies the IsGrouping dependency property.

Declaration
public static readonly DependencyProperty IsGroupingProperty
Field Value
System.Windows.DependencyProperty

ItemContainerStyleProperty

Identifies the ItemContainerStyle dependency property.

Declaration
public static readonly DependencyProperty ItemContainerStyleProperty
Field Value
System.Windows.DependencyProperty

ItemTemplateProperty

Identifies the ItemTemplate dependency property.

Declaration
public static readonly DependencyProperty ItemTemplateProperty
Field Value
System.Windows.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
public int AlternationCount { get; set; }
Property Value
System.Int32

GroupRenderMode

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

Declaration
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
public bool HasItems { get; }
Property Value
System.Boolean

IsGrouping

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

Declaration
public bool IsGrouping { get; }
Property Value
System.Boolean

ItemContainerGenerator

Gets the ItemContainerGenerator.

Declaration
public IContainerGenerator ItemContainerGenerator { get; }
Property Value
IContainerGenerator

The ItemContainerGenerator.

ItemContainerStyle

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

Declaration
public Style ItemContainerStyle { get; set; }
Property Value
System.Windows.Style

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

ItemTemplate

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

Declaration
public DataTemplate ItemTemplate { get; set; }
Property Value
System.Windows.DataTemplate

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

Methods

BringIndexIntoView(Int32)

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

Declaration
public void BringIndexIntoView(int index)
Parameters
System.Int32 index

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
protected virtual void ClearContainerForGroupOverride(DependencyObject element, object item)
Parameters
System.Windows.DependencyObject element

The container element.

System.Object item

The item.

ClearContainerForItemOverride(DependencyObject, Object)

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

Declaration
protected virtual void ClearContainerForItemOverride(DependencyObject element, object item)
Parameters
System.Windows.DependencyObject element

The container element.

System.Object item

The item.

GetAlternationIndex(DependencyObject)

Gets the AlternationIndex for the specified object.

Declaration
public static int GetAlternationIndex(DependencyObject element)
Parameters
System.Windows.DependencyObject element

The object from which to get the AlternationIndex.

Returns
System.Int32

The value of the AlternationIndex.

GetContainerForItemOverride(Object)

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

Declaration
protected virtual DependencyObject GetContainerForItemOverride(object item)
Parameters
System.Object item

Returns
System.Windows.DependencyObject

The element that is used to display the given item.

GetItemsOwner(DependencyObject)

Returns the BaseItemsControl that the specified element hosts items for.

Declaration
public static BaseItemsControl GetItemsOwner(DependencyObject element)
Parameters
System.Windows.DependencyObject element

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
public static BaseItemsControl ItemsControlFromItemContainer(DependencyObject container)
Parameters
System.Windows.DependencyObject container

The container element to return the BaseItemsControl for.

Returns
BaseItemsControl

The BaseItemsControl that owns the specified container element.

OnAlternationCountChanged(Int32, Int32)

Invoked when the AlternationCount property changes.

Declaration
protected virtual void OnAlternationCountChanged(int oldAlternationCount, int newAlternationCount)
Parameters
System.Int32 oldAlternationCount

The old value of AlternationCount.

System.Int32 newAlternationCount

The new value of AlternationCount.

OnGroupRenderModeChanged()

Called when the virtualization mode changes.

Declaration
protected virtual void OnGroupRenderModeChanged()

OnItemContainerStyleChanged(Style, Style)

Invoked when the ItemContainerStyle property changes.

Declaration
protected virtual void OnItemContainerStyleChanged(Style oldItemContainerStyle, Style newItemContainerStyle)
Parameters
System.Windows.Style oldItemContainerStyle

Old value of the ItemContainerStyle property.

System.Windows.Style newItemContainerStyle

New value of the ItemContainerStyle property.

OnItemsChanged(NotifyCollectionChangedEventArgs)

Invoked when the Items property changes.

Declaration
protected virtual void OnItemsChanged(NotifyCollectionChangedEventArgs e)
Parameters
System.Collections.Specialized.NotifyCollectionChangedEventArgs e

Information about the change.

OnItemsCollectionChanged(Object, NotifyCollectionChangedEventArgs)

Called when this.Items collection changes.

Declaration
protected override void OnItemsCollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
Parameters
System.Object sender

The sender.

System.Collections.Specialized.NotifyCollectionChangedEventArgs e

The System.Collections.Specialized.NotifyCollectionChangedEventArgs instance containing the event data.

Overrides
DataControl.OnItemsCollectionChanged(Object, NotifyCollectionChangedEventArgs)

OnItemsSourceChanged(Object, Object)

Called when ItemsSource property has changed.

Declaration
protected override void OnItemsSourceChanged(object oldValue, object newValue)
Parameters
System.Object oldValue

The old value.

System.Object newValue

The new value.

Overrides
DataControl.OnItemsSourceChanged(Object, Object)

OnItemTemplateChanged(DataTemplate, DataTemplate)

Invoked when the ItemTemplate property changes.

Declaration
protected virtual void OnItemTemplateChanged(DataTemplate oldItemTemplate, DataTemplate newItemTemplate)
Parameters
System.Windows.DataTemplate oldItemTemplate

The old ItemTemplate property value.

System.Windows.DataTemplate newItemTemplate

The new ItemTemplate property value.

PrepareContainerForGroupItemOverride(DependencyObject, Object)

Prepares the specified element to display the specified item.

Declaration
protected virtual void PrepareContainerForGroupItemOverride(DependencyObject element, object item)
Parameters
System.Windows.DependencyObject element

System.Object item

PrepareContainerForItemOverride(DependencyObject, Object)

Prepares the specified element to display the specified item.

Declaration
protected virtual void PrepareContainerForItemOverride(DependencyObject element, object item)
Parameters
System.Windows.DependencyObject element

System.Object item

Extension Methods

GridViewDataControlExtensions.FindGroupByItem(BaseItemsControl, Object)
CollectionExtensions.ToEnumerable<T>(T)
EnumerableExtensions.ToEnumerable<T>(T)

Was this article helpful?

Tell us how we can improve this article

Skip
Getting Started
  • Install Now
  • Demos
  • SDK Samples Browser
  • Sample Applications
Support Resources
  • Code Library
  • Knowledge Base
  • MVVM Support
  • Videos
  • GitHub SDK Repository
Community
  • Forums
  • Blogs
  • XAML Feedback Portal
  • Document Processing Feedback Portal

Copyright © 2018 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.