Class ItemsControl
Base class for all the items controls.
Inheritance
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. |