ClassListControl
Represents the list control that has multi-selection.
Definition
Namespace:Telerik.Windows.Controls.Primitives
Assembly:Telerik.Windows.Controls.dll
Syntax:
public class ListControl : ItemsControlSelector, IMultiSelector, ISelector, ISelectorInteraction, IAutocomplete, IListControl, ICommandSource, IScrollingServiceCore, IScrollingInfo
Inheritance: objectItemsControlSelectorListControl
Derived Classes:
Implements:
Inherited Members
Constructors
ListControl()
Initializes a new instance of the ListControl class.
Declaration
public ListControl()
Fields
CanAutocompleteSelectItemsProperty
Identifies the CanAutocompleteSelectItems dependency property.
Declaration
public static readonly DependencyProperty CanAutocompleteSelectItemsProperty
Field Value
DependencyProperty
CanAutocompleteSelectPartialMatchesProperty
Identifies the CanAutocompleteSelectPartialMatches dependency property.
Declaration
public static readonly DependencyProperty CanAutocompleteSelectPartialMatchesProperty
Field Value
DependencyProperty
CanKeyboardNavigationSelectItemsProperty
Identifies the CanListControlKeyboardNavigationSelectItems dependency property.
Declaration
public static readonly DependencyProperty CanKeyboardNavigationSelectItemsProperty
Field Value
DependencyProperty
CommandParameterProperty
Identifies the CommandParameter dependency property.
Declaration
public static readonly DependencyProperty CommandParameterProperty
Field Value
DependencyProperty
CommandProperty
Identifies the Command dependency property.
Declaration
public static readonly DependencyProperty CommandProperty
Field Value
DependencyProperty
CommandTargetProperty
Identifies the CommandTarget dependency property.
Declaration
public static readonly DependencyProperty CommandTargetProperty
Field Value
DependencyProperty
IsScrollIntoViewEnabledProperty
Identifies the IsScrollIntoViewOnSelectionEnabled dependency property. This property determines of the selected item will be automatically scrolled into the view.
Declaration
public static readonly DependencyProperty IsScrollIntoViewEnabledProperty
Field Value
DependencyProperty
TextSearchModeProperty
Identifies the TextSearchMode dependency property.
Declaration
public static readonly DependencyProperty TextSearchModeProperty
Field Value
DependencyProperty
TypedTextProperty
Identifies the TypedText dependency property.
Declaration
public static readonly DependencyProperty TypedTextProperty
Field Value
DependencyProperty
Properties
AutocompleteBehavior
Gets or sets the autocomplete behavior.
Declaration
protected AutocompleteBehavior AutocompleteBehavior { get; set; }
Property Value
CanAutocompleteSelectItems
Gets or sets a value that specifies whether the autocomplete should select items, or not. This is a dependency property.
Declaration
public bool? CanAutocompleteSelectItems { get; set; }
Property Value
bool?
CanAutocompleteSelectPartialMatches
Gets or sets a value that specifies whether the autocomplete should select partially matching items, or not. This is a dependency property.
Declaration
public bool CanAutocompleteSelectPartialMatches { get; set; }
Property Value
CanKeyboardNavigationSelectItems
Gets or sets the CanKeyboardNavigationSelectItems. This is a dependency property.
Declaration
public bool? CanKeyboardNavigationSelectItems { get; set; }
Property Value
bool?
Command
Gets or sets the Command. This is a dependency property.
Declaration
[TypeConverter(typeof(CommandConverter))]
public ICommand Command { get; set; }
Property Value
CommandParameter
Gets or sets the CommandParameter. This is a dependency property.
CommandTarget
Gets or sets the CommandTarget. This is a dependency property.
Declaration
public IInputElement CommandTarget { get; set; }
Property Value
IInputElement
HighlightedIndex
Gets the index of the highlighted item.
Declaration
public int HighlightedIndex { get; }
Property Value
The index of the highlighted.
Implements
HighlightedItem
Gets or sets the highlighted item.
IsItemsHostVisible
Gets a value indicating whether the items host is visible. Override if a custom logic is required. Default value is true.
Declaration
protected virtual bool IsItemsHostVisible { get; }
Property Value
IsScrollIntoViewEnabled
Gets or sets the IsScrollIntoViewEnabled. This is a dependency property.
KeyboardNavigation
Gets the keyboard navigation.
Declaration
protected KeyboardNavigation KeyboardNavigation { get; }
Property Value
SelectAllCommand
Gets the command that will be executed when select all. This is a RoutedUICommand.
Declaration
public static RoutedUICommand SelectAllCommand { get; }
Property Value
RoutedUICommand
TextSearchMode
Gets or sets the text search mode. Specifies how TextSearch will match items. This is a dependency property.
Declaration
public TextSearchMode TextSearchMode { get; set; }
Property Value
The text search mode.
Methods
CanPerformSelection()
Indicates whether the selection helper can perform operation or not.
Declaration
protected override bool CanPerformSelection()
Returns
Returns true if the panel is not null, is not Grid and ItemContainerGenerator.Status is GeneratingContainers; otherwise false.
Overrides
ClearContainerForItemOverride(DependencyObject, object)
Clears the values for SelectionHelper, ParentSelector and IsSelected properties.
Declaration
protected override void ClearContainerForItemOverride(DependencyObject element, object item)
Parameters
element
DependencyObject
The ListItem container element.
item
The item.
ClearContainerStates(FrameworkElement)
Clears the properties that effect the visual states for the given container. This method is called in ClearContainerForItemOverride(DependencyObject, object)
Declaration
protected virtual void ClearContainerStates(FrameworkElement container)
Parameters
container
FrameworkElement
The container which is cleared for item override.
GetContainerForItemOverride()
Creates or identifies the element that is used to display the given item.
Declaration
protected override DependencyObject GetContainerForItemOverride()
Returns
DependencyObject
The element that is used to display the given item.
GetScrollViewerPart()
Called on initializing the ScrollViewer on template applied. It's mandatory to get the ScrollViewer in order to perform selection.
Declaration
protected virtual ScrollViewer GetScrollViewerPart()
Returns
ScrollViewer
The ScrollViewer instance in the control template.
Remarks
If there is no ScrollViewer in the control template, override the logic in CanPerformSelection() method.
HandleKeyboardInput(Key)
When overridden in a derived class, is invoked whenever application code or internal processes call HandleKeyboardInput(Key). Override this method if a custom keyboard navigation is required.
Declaration
protected virtual bool HandleKeyboardInput(Key key)
Parameters
key
Key
The key.
Returns
HighlightedIndexChanged(int, Key)
Highlights the changed index.
Declaration
[SuppressMessage("Microsoft.Design", "CA1026:DefaultParametersShouldNotBeUsed")]
protected virtual void HighlightedIndexChanged(int index, Key key = 0)
Parameters
index
key
Key
IsIndexSelectable(int)
Determines whether the index is selectable.
IsItemItsOwnContainerOverride(object)
Determines if the specified item is (or is eligible to be) its own container.
OnApplyTemplate()
When overridden in a derived class, is invoked whenever application code or internal processes call .
Declaration
public override void OnApplyTemplate()
Overrides
OnAutocompleteBehaviorTypedTextChanged()
Called when a text is typed.
Declaration
protected virtual void OnAutocompleteBehaviorTypedTextChanged()
OnItemsPanelChanged(ItemsPanelTemplate, ItemsPanelTemplate)
Invoked when the property changes.
Declaration
protected override void OnItemsPanelChanged(ItemsPanelTemplate oldItemsPanel, ItemsPanelTemplate newItemsPanel)
Parameters
oldItemsPanel
ItemsPanelTemplate
Old value of the property.
newItemsPanel
ItemsPanelTemplate
New value of the property.
OnMatchingItemChanged()
When overridden in a derived class, is invoked whenever application code or internal processes call OnMatchingItemChanged(). Called when matching item is changed. Override this method if a custom logic is required when an item is changed.
Declaration
protected virtual void OnMatchingItemChanged()
OnPropertyChanged(DependencyPropertyChangedEventArgs)
Declaration
protected override void OnPropertyChanged(DependencyPropertyChangedEventArgs e)
Parameters
e
DependencyPropertyChangedEventArgs
OnSelectionChanged(SelectionChangedEventArgs)
Called when the selection changes.
Declaration
protected override void OnSelectionChanged(SelectionChangedEventArgs e)
Parameters
e
SelectionChangedEventArgs
The event data.
Overrides
OnSelectionModeChanged()
Called when selection mode changed. Update CanAutocompleteSelectItems property.
Declaration
protected override void OnSelectionModeChanged()
Overrides
PrepareContainerForItemOverride(DependencyObject, object)
Prepares the specified element to display the specified item.
Declaration
protected override void PrepareContainerForItemOverride(DependencyObject element, object item)
Parameters
element
DependencyObject
Element used to display the specified item.
item
Specified item.
ScrollIntoView(int)
Scrolls the into view.
Declaration
public void ScrollIntoView(int index)
Parameters
index
The index.
Implements
ScrollIntoView(object)
Scrolls the into view.