New to Telerik UI for WPFStart a free 30-day trial

Represents a control that allows a user to select items from among its child elements.

Definition

Namespace:Telerik.Windows.Controls.Primitives

Assembly:Telerik.Windows.Controls.dll

Syntax:

C#
public class ItemsControlSelector : ItemsControl, IMultiSelector, ISelector, ISelectorInteraction, IAutocomplete

Inheritance: objectItemsControlSelector

Derived Classes: ListControl

Implements: IAutocompleteIMultiSelectorISelectorISelectorInteraction

Constructors

Initializes a new instance of the ItemsControlSelector class.

C#
public ItemsControlSelector()

Fields

Identifies the EnableSelectionCaching dependency property.

C#
public static readonly DependencyProperty EnableSelectionCachingProperty

Identifies the IsSynchronizedWithCurrentItem dependency property.

C#
public static readonly DependencyProperty IsSynchronizedWithCurrentItemProperty

SelectedIndexProperty

DependencyProperty

Identifies the SelectedIndex dependency property.

C#
public static readonly DependencyProperty SelectedIndexProperty

SelectedItemProperty

DependencyProperty

Identifies the SelectedItem dependency property.

C#
public static readonly DependencyProperty SelectedItemProperty

SelectedValuePathProperty

DependencyProperty

Identifies the SelectedValuePath dependency property.

C#
public static readonly DependencyProperty SelectedValuePathProperty

SelectedValueProperty

DependencyProperty

Identifies the SelectedValue dependency property.

C#
public static readonly DependencyProperty SelectedValueProperty

Identifies the SelectionChanged routed event.

C#
public static readonly RoutedEvent SelectionChangedEvent

SelectionModeProperty

DependencyProperty

Identifies the SelectionMode dependency property.

C#
public static readonly DependencyProperty SelectionModeProperty

TextPathProperty

DependencyProperty

Identifies the TextPath dependency property.

C#
public static readonly DependencyProperty TextPathProperty

TextProperty

DependencyProperty

Identifies the Text dependency property.

C#
public static readonly DependencyProperty TextProperty

Properties

Gets or sets the EnableSelectionCaching. This is a dependency property.

C#
public bool EnableSelectionCaching { get; set; }

Gets or sets the IsSynchronizedWithCurrentItem. This is a dependency property.

C#
public bool IsSynchronizedWithCurrentItem { get; set; }

Gets the ItemSearch which defines the logic how the items are found via the retrievers.

C#
public IItemSearchControl ItemSearch { get; }

Implements: IAutocomplete.ItemSearch

Gets or sets the SelectedIndex. This is a dependency property.

C#
public int SelectedIndex { get; set; }

Implements: ISelector.SelectedIndex

Gets the item which is currently selected.

C#
public object SelectedItem { get; set; }

Implements: ISelector.SelectedItem

Gets a collection of selected items.

C#
public IList SelectedItems { get; }

Implements: IMultiSelector.SelectedItems

Gets the value for the selected item.

C#
public object SelectedValue { get; set; }

Implements: ISelector.SelectedValue

Gets or sets the SelectedValueBinding.

C#
public Binding SelectedValueBinding { get; set; }

Gets or sets the selected value path.

C#
public string SelectedValuePath { get; set; }
Property Value:

The selected value path.

The selection helper used in all ItemsControlSelectors. It coordinates the selection using the selection behaviors.

C#
public SelectionHelper SelectionHelper { get; }

SelectionMode

SelectionMode

Gets or sets the SelectionMode. This is a dependency property.

C#
public SelectionMode SelectionMode { get; set; }

Gets or sets the Text. This is a dependency property.

C#
public string Text { get; set; }

Implements: IAutocomplete.Text

Gets or sets the TextBinding.

C#
public Binding TextBinding { get; set; }

Gets or sets the TextPath. This is a dependency property.

C#
public string TextPath { get; set; }

Gets the text Retriever that is used for item search.

C#
public IValueRetriever TextRetriever { get; }

Implements: IAutocomplete.TextRetriever

Gets the value Retriever that is used for item search.

C#
public IValueRetriever ValueRetriever { get; }

Implements: IAutocomplete.ValueRetriever

Methods

Indicates whether the selection helper can perform operation or not.

C#
protected virtual bool CanPerformSelection()
Returns:

bool

Returns true if the panel is not null or Grid, otherwise returns false.

Updates the visual state of the control.

C#
protected virtual void ChangeVisualState(bool useTransitions)
Parameters:useTransitionsbool

Indicates whether transitions should be used.

Called when the control is Initialized.

C#
public override void EndInit()

Gets the data item according to its container.

C#
public virtual object GetDataItem(UIElement container)
Parameters:containerUIElement

The container.

Returns:

object

Implements: ISelectorInteraction.GetDataItem(UIElement)

Gets the selection behavior.

C#
protected virtual ISelectionBehavior GetSelectionBehavior()
Returns:

ISelectionBehavior

Initializes the selection behavior.

C#
protected void InitializeSelectionBehavior()

Initializes the text Retriever.

C#
protected virtual void InitializeTextRetriever()

Initializes the value Retriever.

C#
protected virtual void InitializeValueRetriever()

Determines whether the index is selectable.

C#
protected virtual bool IsIndexSelectable(int index)
Parameters:indexint

The index.

Returns:

bool

Determines whether an item is selectable or not.

C#
protected virtual bool IsItemSelectable(object item)
Parameters:itemobject

The item.

Returns:

bool

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

C#
public override void OnApplyTemplate()

Invoked when the IsEnabled property of the control changes.

C#
protected virtual void OnIsEnabledChanged(DependencyPropertyChangedEventArgs e)
Parameters:eDependencyPropertyChangedEventArgs

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

Raises the event.

C#
protected override void OnItemsChanged(NotifyCollectionChangedEventArgs e)
Parameters:eNotifyCollectionChangedEventArgs

The NotifyCollectionChangedEventArgs instance containing the event data.

Called when the SelectorControl.ItemsSource" property changes.

C#
protected override void OnItemsSourceChanged(IEnumerable oldValue, IEnumerable newValue)
Parameters:oldValueIEnumerable

Old value of the SelectorControl.ItemsSource" property.

newValueIEnumerable

New value of the SelectorControl.ItemsSource" property.

Called when the selection changes.

C#
protected virtual void OnSelectionChanged(SelectionChangedEventArgs e)
Parameters:eSelectionChangedEventArgs

The event data.

Called when selection mode changed.

C#
protected virtual void OnSelectionModeChanged()

Updates the items when ItemsChanged occurs.

C#
protected virtual void UpdateItems(NotifyCollectionChangedAction action, IList newItems, IList oldItems)
Parameters:actionNotifyCollectionChangedAction

The action.

newItemsIList

The new items.

oldItemsIList

The old items.

Events

SelectionChanged

SelectionChangedEventHandler

Occurs when the selection of a Selector changes.

C#
public event SelectionChangedEventHandler SelectionChanged

Implements: ISelector.SelectionChanged

Extension Methods