• 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 ASP.NET AJAX UI for ASP.NET MVC UI for ASP.NET Core UI for Blazor 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 Design
    Unite UX
    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 ItemsControl

Base class for all the items controls.

Inheritance
System.Object
ItemsControl
ApplicationMenu
AutoCompleteBoxesItemsControl
BulletGraphContainerBase
AdditionalAxes2DContainer
AdditionalPlotAreaAxes2DContainer
AnnotationLayer
Axis2DBase<TItemType>
ChartArea
Series
ConnectorsControl
GroupsAdorner
FieldBox
GaugeBase
ScaleBase
GridViewGroupPanel
HeaderedItemsControl
MapLayer
MenuBase
ItemsControlOnItemsSourceChanged
RadBook
RadButtonGroup
RadCube
RadDocking
RadMap
RadRating
RadSplitContainer
RadTickBar
RadTileList
RadToolBar
RadToolBarTray
RadTreeView
Selector
TimeIntervalContainerBase
TimeSpecialSlotContainer
ExpandableHeaderedItemsContainer
TimelineStripLineContainer
TreeListViewDragCue
TreeViewDragCue
Namespace: Telerik.Windows.Controls
Assembly: Telerik.Windows.Controls.dll

Syntax

public class ItemsControl : ItemsControl

Constructors

ItemsControl()

Initializes a new instance of the ItemsControl class.

Declaration
public ItemsControl()

Fields

HasItemsProperty

Identifies the HasItems dependency property.

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

IsFocusedProperty

Identifies the IsFocused dependency property.

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

IsTextSearchEnabledProperty

Identifies the IsTextSearchEnabled dependency property.

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

ItemContainerStyleProperty

Identifies the ItemContainerStyle dependency property.

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

ItemContainerStyleSelectorProperty

Identifies the ItemContainerStyleSelector dependency property.

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

ItemTemplateSelectorProperty

Identifies the ItemTemplateSelector dependency property.

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

Properties

HasItems

Gets whether the ItemsControl has any children.

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

IsFocused

Gets a value indicating whether the control is focused.

Declaration
public bool IsFocused { get; protected set; }
Property Value
System.Boolean

Remarks

Please note that IsFocused is a read only property. To focus the Control, use the System.Windows.Controls.Control.Focus method.

IsTextSearchEnabled

Gets or sets a value indicating whether TextSearch is enabled on the ItemsControl instance. This is a dependency property.

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

ItemContainerGenerator

Gets the ItemContainerGenerator that is associated with the control.

Declaration
public ItemContainerGenerator ItemContainerGenerator { get; }
Property Value
ItemContainerGenerator

ItemContainerStyle

Gets or sets the style for the item containers of the control. This is a dependency property.

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

ItemContainerStyleSelector

Gets or sets the style selector for the items of the control. This is a dependency property.

Declaration
public StyleSelector ItemContainerStyleSelector { get; set; }
Property Value
StyleSelector

ItemTemplateSelector

Gets or sets the template selector for the items of the control. This is a dependency property.

Declaration
public DataTemplateSelector ItemTemplateSelector { get; set; }
Property Value
DataTemplateSelector

OverrideStyles

Gets whether Style should be applied on container even if Style property is already set.

Declaration
protected virtual bool OverrideStyles { get; }
Property Value
System.Boolean

Methods

ChangeVisualState()

Changes the visual state of the control using transitions.

Declaration
protected virtual void ChangeVisualState()

ChangeVisualState(Boolean)

Updates the visual state of the control.

Declaration
protected virtual void ChangeVisualState(bool useTransitions)
Parameters
System.Boolean useTransitions

Indicates whether transitions should be used.

ItemsControlFromItemContainer(DependencyObject)

Returns the ItemsControl of the given container.

Declaration
public static ItemsControl ItemsControlFromItemContainer(DependencyObject container)
Parameters
System.Windows.DependencyObject container

The container for which to retrieve the ItemsControl.

Returns
ItemsControl

The ItemsControl of the container.

OnApplyTemplate()

When overridden in a derived class, is invoked whenever application code or internal processes (such as a rebuilding layout pass) call System.Windows.Controls.Control.ApplyTemplate.

Declaration
public override void OnApplyTemplate()

OnGotFocus(RoutedEventArgs)

Called before the System.Windows.UIElement.GotFocus event occurs.

Declaration
protected override void OnGotFocus(RoutedEventArgs e)
Parameters
System.Windows.RoutedEventArgs e

The data for the event.

OnIsEnabledChanged(DependencyPropertyChangedEventArgs)

Invoked when the IsEnabled property of the control changes.

Declaration
protected virtual void OnIsEnabledChanged(DependencyPropertyChangedEventArgs e)
Parameters
System.Windows.DependencyPropertyChangedEventArgs e

The information about the new and old value of the property.

OnIsFocusedChanged(DependencyPropertyChangedEventArgs)

Called when the IsFocused property changes.

Declaration
protected virtual void OnIsFocusedChanged(DependencyPropertyChangedEventArgs e)
Parameters
System.Windows.DependencyPropertyChangedEventArgs e

Event args with the old and the new value of the property.

OnItemsChanged(NotifyCollectionChangedEventArgs)

Called when the value of the System.Windows.Controls.ItemsControl.Items property changes.

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

A System.Collections.Specialized.NotifyCollectionChangedEventArgs that contains the event data.

OnItemTemplateSelectorChanged(DataTemplateSelector, DataTemplateSelector)

When overridden OnRadItemTemplateSelectorChanged is called when the TemplateSelector for the contained items changes.

Declaration
protected virtual void OnItemTemplateSelectorChanged(DataTemplateSelector oldItemTemplateSelector, DataTemplateSelector newItemTemplateSelector)
Parameters
DataTemplateSelector oldItemTemplateSelector

The old TemplateSelector.

DataTemplateSelector newItemTemplateSelector

The new TemplateSelector.

OnLostFocus(RoutedEventArgs)

Called before the System.Windows.UIElement.LostFocus event occurs.

Declaration
protected override void OnLostFocus(RoutedEventArgs e)
Parameters
System.Windows.RoutedEventArgs e

The data for the event.

PrepareContainerForItemOverride(DependencyObject, Object)

Prepares the specified element to display the specified item.

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

Element used to display the specified item.

System.Object item

Specified item.

Extension Methods

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
  • Themes Generator
Support Resources
  • Code Library
  • Knowledge Base
  • MVVM Support
  • Videos
  • GitHub SDK Repository
  • System Requirements
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.