Class ItemsControlSelector
Represents a control that allows a user to select items from among its child elements.
Inheritance
Namespace: Telerik.Windows.Controls.Primitives
Assembly: Telerik.Windows.Controls.dll
Syntax
public class ItemsControlSelector : ItemsControl, IMultiSelector, ISelector, ISelectorInteraction, IAutocomplete
Constructors
ItemsControlSelector()
Initializes a new instance of the ItemsControlSelector class.
Declaration
public ItemsControlSelector()
Fields
EnableSelectionCachingProperty
Identifies the EnableSelectionCaching dependency property.
Declaration
public static readonly DependencyProperty EnableSelectionCachingProperty
Field Value
System.Windows.DependencyProperty
|
IsSynchronizedWithCurrentItemProperty
Identifies the IsSynchronizedWithCurrentItem dependency property.
Declaration
public static readonly DependencyProperty IsSynchronizedWithCurrentItemProperty
Field Value
System.Windows.DependencyProperty
|
SelectedIndexProperty
Identifies the SelectedIndex dependency property.
Declaration
public static readonly DependencyProperty SelectedIndexProperty
Field Value
System.Windows.DependencyProperty
|
SelectedItemProperty
Identifies the SelectedItem dependency property.
Declaration
public static readonly DependencyProperty SelectedItemProperty
Field Value
System.Windows.DependencyProperty
|
SelectedValuePathProperty
Identifies the SelectedValuePath dependency property.
Declaration
public static readonly DependencyProperty SelectedValuePathProperty
Field Value
System.Windows.DependencyProperty
|
SelectedValueProperty
Identifies the SelectedValue dependency property.
Declaration
public static readonly DependencyProperty SelectedValueProperty
Field Value
System.Windows.DependencyProperty
|
SelectionChangedEvent
Identifies the SelectionChanged routed event.
Declaration
public static readonly RoutedEvent SelectionChangedEvent
Field Value
System.Windows.RoutedEvent
|
SelectionModeProperty
Identifies the SelectionMode dependency property.
Declaration
public static readonly DependencyProperty SelectionModeProperty
Field Value
System.Windows.DependencyProperty
|
TextPathProperty
Identifies the TextPath dependency property.
Declaration
public static readonly DependencyProperty TextPathProperty
Field Value
System.Windows.DependencyProperty
|
TextProperty
Identifies the Text dependency property.
Declaration
public static readonly DependencyProperty TextProperty
Field Value
System.Windows.DependencyProperty
|
Properties
EnableSelectionCaching
Gets or sets the EnableSelectionCaching. This is a dependency property.
Declaration
public bool EnableSelectionCaching { get; set; }
Property Value
System.Boolean
|
IsSynchronizedWithCurrentItem
Gets or sets the IsSynchronizedWithCurrentItem. This is a dependency property.
Declaration
public bool IsSynchronizedWithCurrentItem { get; set; }
Property Value
System.Boolean
|
ItemSearch
Gets the ItemSearch which defines the logic how the items are found via the retrievers.
Declaration
public IItemSearchControl ItemSearch { get; }
Property Value
IItemSearchControl
|
Implements
SelectedIndex
Gets or sets the SelectedIndex. This is a dependency property.
Declaration
public int SelectedIndex { get; set; }
Property Value
System.Int32
|
Implements
SelectedItem
Gets the item which is currently selected.
Declaration
public object SelectedItem { get; set; }
Property Value
System.Object
|
Implements
SelectedItems
Gets a collection of selected items.
Declaration
public IList SelectedItems { get; }
Property Value
System.Collections.IList
|
Implements
SelectedValue
Gets the value for the selected item.
Declaration
public object SelectedValue { get; set; }
Property Value
System.Object
|
Implements
SelectedValueBinding
Gets or sets the SelectedValueBinding.
Declaration
public Binding SelectedValueBinding { get; set; }
Property Value
System.Windows.Data.Binding
|
SelectedValuePath
Gets or sets the selected value path.
Declaration
public string SelectedValuePath { get; set; }
Property Value
System.String
The selected value path. |
SelectionHelper
The selection helper used in all ItemsControlSelectors. It coordinates the selection using the selection behaviors.
Declaration
public SelectionHelper SelectionHelper { get; }
Property Value
SelectionHelper
|
SelectionMode
Gets or sets the SelectionMode. This is a dependency property.
Declaration
public SelectionMode SelectionMode { get; set; }
Property Value
System.Windows.Controls.SelectionMode
|
Text
Gets or sets the Text. This is a dependency property.
Declaration
public string Text { get; set; }
Property Value
System.String
|
Implements
TextBinding
Gets or sets the TextBinding.
Declaration
public Binding TextBinding { get; set; }
Property Value
System.Windows.Data.Binding
|
TextPath
Gets or sets the TextPath. This is a dependency property.
Declaration
public string TextPath { get; set; }
Property Value
System.String
|
TextRetriever
Gets the text Retriever that is used for item search.
Declaration
public IValueRetriever TextRetriever { get; }
Property Value
IValueRetriever
|
Implements
ValueRetriever
Gets the value Retriever that is used for item search.
Declaration
public IValueRetriever ValueRetriever { get; }
Property Value
IValueRetriever
|
Implements
Methods
CanPerformSelection()
Indicates whether the selection helper can perform operation or not.
Declaration
protected virtual bool CanPerformSelection()
Returns
System.Boolean
Returns true if the panel is not null or Grid, otherwise returns false. |
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. |
EndInit()
Called when the control is Initialized.
Declaration
public override void EndInit()
GetDataItem(UIElement)
Gets the data item according to its container.
Declaration
public virtual object GetDataItem(UIElement container)
Parameters
System.Windows.UIElement
container
The container. |
Returns
System.Object
|
Implements
GetSelectionBehavior()
Gets the selection behavior.
Declaration
protected virtual ISelectionBehavior GetSelectionBehavior()
Returns
ISelectionBehavior
|
InitializeSelectionBehavior()
Initializes the selection behavior.
Declaration
protected void InitializeSelectionBehavior()
InitializeTextRetriever()
Initializes the text Retriever.
Declaration
protected virtual void InitializeTextRetriever()
InitializeValueRetriever()
Initializes the value Retriever.
Declaration
protected virtual void InitializeValueRetriever()
IsIndexSelectable(Int32)
Determines whether the index is selectable.
Declaration
protected virtual bool IsIndexSelectable(int index)
Parameters
System.Int32
index
The index. |
Returns
System.Boolean
|
IsItemSelectable(Object)
Determines whether an item is selectable or not.
Declaration
protected virtual bool IsItemSelectable(object item)
Parameters
System.Object
item
The item. |
Returns
System.Boolean
|
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()
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. |
OnItemsChanged(NotifyCollectionChangedEventArgs)
Raises the ItemsChanged event.
Declaration
protected override void OnItemsChanged(NotifyCollectionChangedEventArgs e)
Parameters
System.Collections.Specialized.NotifyCollectionChangedEventArgs
e
The System.Collections.Specialized.NotifyCollectionChangedEventArgs instance containing the event data. |
OnItemsSourceChanged(IEnumerable, IEnumerable)
Called when the SelectorControl.ItemsSource" property changes.
Declaration
protected override void OnItemsSourceChanged(IEnumerable oldValue, IEnumerable newValue)
Parameters
System.Collections.IEnumerable
oldValue
Old value of the SelectorControl.ItemsSource" property. |
System.Collections.IEnumerable
newValue
New value of the SelectorControl.ItemsSource" property. |
OnSelectionChanged(SelectionChangedEventArgs)
Called when the selection changes.
Declaration
protected virtual void OnSelectionChanged(SelectionChangedEventArgs e)
Parameters
System.Windows.Controls.SelectionChangedEventArgs
e
The event data. |
OnSelectionModeChanged()
Called when selection mode changed.
Declaration
protected virtual void OnSelectionModeChanged()
UpdateItems(NotifyCollectionChangedAction, IList, IList)
Updates the items when ItemsChanged occurs.
Declaration
protected virtual void UpdateItems(NotifyCollectionChangedAction action, IList newItems, IList oldItems)
Parameters
System.Collections.Specialized.NotifyCollectionChangedAction
action
The action. |
System.Collections.IList
newItems
The new items. |
System.Collections.IList
oldItems
The old items. |
Events
SelectionChanged
Occurs when the selection of a Selector changes.
Declaration
public event SelectionChangedEventHandler SelectionChanged
Event Type
System.Windows.Controls.SelectionChangedEventHandler
|
Implements
Explicit Interface Implementations
ISelectorInteraction.GetItems()
Declaration
IEnumerable ISelectorInteraction.GetItems()
Returns
System.Collections.IEnumerable
|
Implements
ISelectorInteraction.IsDefaultCollectionView
Declaration
bool ISelectorInteraction.IsDefaultCollectionView { get; }
Returns
System.Boolean
|
Implements
ISelectorInteraction.IsItemSelectable(Object)
Declaration
bool ISelectorInteraction.IsItemSelectable(object item)
Parameters
System.Object
item
|
Returns
System.Boolean
|
Implements
ISelectorInteraction.MoveCurrentItemInCollectionView(Object)
Declaration
void ISelectorInteraction.MoveCurrentItemInCollectionView(object item)
Parameters
System.Object
item
|