Class
ItemsControlSelector

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:

cs-api-definition
[SuppressMessage("Design", "CA1001:Types that own disposable fields should be disposable", Justification = "<Pending>")]
public class ItemsControlSelector : ItemsControl, IMultiSelector, ISelector, ISelectorInteraction, IAutocomplete

Inheritance: objectItemsControlSelector

Derived Classes: ListControl

Implements: IAutocompleteIMultiSelectorISelectorISelectorInteraction

Constructors

ItemsControlSelector()

Initializes a new instance of the ItemsControlSelector class.

Declaration

cs-api-definition
[SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
public ItemsControlSelector()

Fields

EnableSelectionCachingProperty

Identifies the EnableSelectionCaching dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty EnableSelectionCachingProperty

Field Value

DependencyProperty

IsSynchronizedWithCurrentItemProperty

Identifies the IsSynchronizedWithCurrentItem dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty IsSynchronizedWithCurrentItemProperty

Field Value

DependencyProperty

SelectedIndexProperty

Identifies the SelectedIndex dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty SelectedIndexProperty

Field Value

DependencyProperty

SelectedItemProperty

Identifies the SelectedItem dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty SelectedItemProperty

Field Value

DependencyProperty

SelectedValuePathProperty

Identifies the SelectedValuePath dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty SelectedValuePathProperty

Field Value

DependencyProperty

SelectedValueProperty

Identifies the SelectedValue dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty SelectedValueProperty

Field Value

DependencyProperty

SelectionChangedEvent

Identifies the SelectionChanged routed event.

Declaration

cs-api-definition
public static readonly RoutedEvent SelectionChangedEvent

Field Value

RoutedEvent

SelectionModeProperty

Identifies the SelectionMode dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty SelectionModeProperty

Field Value

DependencyProperty

TextPathProperty

Identifies the TextPath dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty TextPathProperty

Field Value

DependencyProperty

TextProperty

Identifies the Text dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty TextProperty

Field Value

DependencyProperty

Properties

EnableSelectionCaching

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

Declaration

cs-api-definition
public bool EnableSelectionCaching { get; set; }

Property Value

bool

IsSynchronizedWithCurrentItem

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

Declaration

cs-api-definition
public bool IsSynchronizedWithCurrentItem { get; set; }

Property Value

bool

ItemSearch

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

Declaration

cs-api-definition
public IItemSearchControl ItemSearch { get; }

Property Value

IItemSearchControl

Implements IAutocomplete.ItemSearch

SelectedIndex

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

Declaration

cs-api-definition
public int SelectedIndex { get; set; }

Property Value

int

Implements ISelector.SelectedIndex

SelectedItem

Gets the item which is currently selected.

Declaration

cs-api-definition
public object SelectedItem { get; set; }

Property Value

object

Implements ISelector.SelectedItem

SelectedItems

Gets a collection of selected items.

Declaration

cs-api-definition
public IList SelectedItems { get; }

Property Value

IList

Implements IMultiSelector.SelectedItems

SelectedValue

Gets the value for the selected item.

Declaration

cs-api-definition
public object SelectedValue { get; set; }

Property Value

object

Implements ISelector.SelectedValue

SelectedValueBinding

Gets or sets the SelectedValueBinding.

Declaration

cs-api-definition
public Binding SelectedValueBinding { get; set; }

Property Value

Binding

SelectedValuePath

Gets or sets the selected value path.

Declaration

cs-api-definition
public string SelectedValuePath { get; set; }

Property Value

string

The selected value path.

SelectionHelper

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

Declaration

cs-api-definition
public SelectionHelper SelectionHelper { get; }

Property Value

SelectionHelper

SelectionMode

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

Declaration

cs-api-definition
public SelectionMode SelectionMode { get; set; }

Property Value

SelectionMode

Text

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

Declaration

cs-api-definition
public string Text { get; set; }

Property Value

string

Implements IAutocomplete.Text

TextBinding

Gets or sets the TextBinding.

Declaration

cs-api-definition
public Binding TextBinding { get; set; }

Property Value

Binding

TextPath

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

Declaration

cs-api-definition
public string TextPath { get; set; }

Property Value

string

TextRetriever

Gets the text Retriever that is used for item search.

Declaration

cs-api-definition
public IValueRetriever TextRetriever { get; }

Property Value

IValueRetriever

Implements IAutocomplete.TextRetriever

ValueRetriever

Gets the value Retriever that is used for item search.

Declaration

cs-api-definition
public IValueRetriever ValueRetriever { get; }

Property Value

IValueRetriever

Implements IAutocomplete.ValueRetriever

Methods

CanPerformSelection()

Indicates whether the selection helper can perform operation or not.

Declaration

cs-api-definition
protected virtual bool CanPerformSelection()

Returns

bool

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

ChangeVisualState(bool)

Updates the visual state of the control.

Declaration

cs-api-definition
protected virtual void ChangeVisualState(bool useTransitions)

Parameters

useTransitions

bool

Indicates whether transitions should be used.

EndInit()

Called when the control is Initialized.

Declaration

cs-api-definition
public override void EndInit()

GetDataItem(UIElement)

Gets the data item according to its container.

Declaration

cs-api-definition
public virtual object GetDataItem(UIElement container)

Parameters

container

UIElement

The container.

Returns

object

Implements ISelectorInteraction.GetDataItem(UIElement)

GetSelectionBehavior()

Gets the selection behavior.

Declaration

cs-api-definition
protected virtual ISelectionBehavior GetSelectionBehavior()

Returns

ISelectionBehavior

InitializeSelectionBehavior()

Initializes the selection behavior.

Declaration

cs-api-definition
protected void InitializeSelectionBehavior()

InitializeTextRetriever()

Initializes the text Retriever.

Declaration

cs-api-definition
protected virtual void InitializeTextRetriever()

InitializeValueRetriever()

Initializes the value Retriever.

Declaration

cs-api-definition
protected virtual void InitializeValueRetriever()

IsIndexSelectable(int)

Determines whether the index is selectable.

Declaration

cs-api-definition
protected virtual bool IsIndexSelectable(int index)

Parameters

index

int

The index.

Returns

bool

IsItemSelectable(object)

Determines whether an item is selectable or not.

Declaration

cs-api-definition
protected virtual bool IsItemSelectable(object item)

Parameters

item

object

The item.

Returns

bool

OnApplyTemplate()

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

Declaration

cs-api-definition
public override void OnApplyTemplate()

OnIsEnabledChanged(DependencyPropertyChangedEventArgs)

Invoked when the IsEnabled property of the control changes.

Declaration

cs-api-definition
protected virtual void OnIsEnabledChanged(DependencyPropertyChangedEventArgs e)

Parameters

e

DependencyPropertyChangedEventArgs

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

OnItemsChanged(NotifyCollectionChangedEventArgs)

Raises the event.

Declaration

cs-api-definition
protected override void OnItemsChanged(NotifyCollectionChangedEventArgs e)

Parameters

e

NotifyCollectionChangedEventArgs

The NotifyCollectionChangedEventArgs instance containing the event data.

OnItemsSourceChanged(IEnumerable, IEnumerable)

Called when the SelectorControl.ItemsSource" property changes.

Declaration

cs-api-definition
protected override void OnItemsSourceChanged(IEnumerable oldValue, IEnumerable newValue)

Parameters

oldValue

IEnumerable

Old value of the SelectorControl.ItemsSource" property.

newValue

IEnumerable

New value of the SelectorControl.ItemsSource" property.

OnSelectionChanged(SelectionChangedEventArgs)

Called when the selection changes.

Declaration

cs-api-definition
protected virtual void OnSelectionChanged(SelectionChangedEventArgs e)

Parameters

e

SelectionChangedEventArgs

The event data.

OnSelectionModeChanged()

Called when selection mode changed.

Declaration

cs-api-definition
protected virtual void OnSelectionModeChanged()

UpdateItems(NotifyCollectionChangedAction, IList, IList)

Updates the items when ItemsChanged occurs.

Declaration

cs-api-definition
protected virtual void UpdateItems(NotifyCollectionChangedAction action, IList newItems, IList oldItems)

Parameters

action

NotifyCollectionChangedAction

The action.

newItems

IList

The new items.

oldItems

IList

The old items.

Events

SelectionChanged

Occurs when the selection of a Selector changes.

Declaration

cs-api-definition
public event SelectionChangedEventHandler SelectionChanged

Event Value

SelectionChangedEventHandler

Implements ISelector.SelectionChanged

Extension Methods