ListControl
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
Initializes a new instance of the ListControl class.
public ListControl()
Fields
CanAutocompleteSelectItemsProperty
DependencyProperty
Identifies the CanAutocompleteSelectItems dependency property.
public static readonly DependencyProperty CanAutocompleteSelectItemsProperty
CanAutocompleteSelectPartialMatchesProperty
DependencyProperty
Identifies the CanAutocompleteSelectPartialMatches dependency property.
public static readonly DependencyProperty CanAutocompleteSelectPartialMatchesProperty
CanKeyboardNavigationSelectItemsProperty
DependencyProperty
Identifies the CanListControlKeyboardNavigationSelectItems dependency property.
public static readonly DependencyProperty CanKeyboardNavigationSelectItemsProperty
CommandParameterProperty
DependencyProperty
Identifies the CommandParameter dependency property.
public static readonly DependencyProperty CommandParameterProperty
CommandProperty
DependencyProperty
Identifies the Command dependency property.
public static readonly DependencyProperty CommandProperty
CommandTargetProperty
DependencyProperty
Identifies the CommandTarget dependency property.
public static readonly DependencyProperty CommandTargetProperty
IsScrollIntoViewEnabledProperty
DependencyProperty
Identifies the IsScrollIntoViewOnSelectionEnabled dependency property. This property determines of the selected item will be automatically scrolled into the view.
public static readonly DependencyProperty IsScrollIntoViewEnabledProperty
TextSearchModeProperty
DependencyProperty
Identifies the TextSearchMode dependency property.
public static readonly DependencyProperty TextSearchModeProperty
TypedTextProperty
DependencyProperty
Identifies the TypedText dependency property.
public static readonly DependencyProperty TypedTextProperty
Properties
Gets or sets the autocomplete behavior.
protected AutocompleteBehavior AutocompleteBehavior { get; set; }
Gets or sets a value that specifies whether the autocomplete should select items, or not. This is a dependency property.
public bool? CanAutocompleteSelectItems { get; set; }
Gets or sets a value that specifies whether the autocomplete should select partially matching items, or not. This is a dependency property.
public bool CanAutocompleteSelectPartialMatches { get; set; }
Gets or sets the CanKeyboardNavigationSelectItems. This is a dependency property.
public bool? CanKeyboardNavigationSelectItems { get; set; }
Gets or sets the Command. This is a dependency property.
[TypeConverter(typeof(CommandConverter))]
public ICommand Command { get; set; }
Gets or sets the CommandParameter. This is a dependency property.
public object CommandParameter { get; set; }
CommandTarget
IInputElement
Gets or sets the CommandTarget. This is a dependency property.
public IInputElement CommandTarget { get; set; }
Gets the index of the highlighted item.
public int HighlightedIndex { get; }
The index of the highlighted.
Implements:
Gets or sets the highlighted item.
protected object HighlightedItem { get; set; }
Gets a value indicating whether the items host is visible. Override if a custom logic is required. Default value is true.
protected virtual bool IsItemsHostVisible { get; }
Gets or sets the IsScrollIntoViewEnabled. This is a dependency property.
public bool IsScrollIntoViewEnabled { get; set; }
Gets the keyboard navigation.
protected KeyboardNavigation KeyboardNavigation { get; }
SelectAllCommand
RoutedUICommand
Gets the command that will be executed when select all. This is a RoutedUICommand.
public static RoutedUICommand SelectAllCommand { get; }
Gets or sets the text search mode. Specifies how TextSearch will match items. This is a dependency property.
public TextSearchMode TextSearchMode { get; set; }
The text search mode.
Methods
Indicates whether the selection helper can perform operation or not.
protected override bool CanPerformSelection()
Returns true if the panel is not null, is not Grid and ItemContainerGenerator.Status is GeneratingContainers; otherwise false.
Overrides:
Clears the values for SelectionHelper, ParentSelector and IsSelected properties.
protected override void ClearContainerForItemOverride(DependencyObject element, object item)
The ListItem container element.
itemobjectThe item.
Clears the properties that effect the visual states for the given container. This method is called in ClearContainerForItemOverride(DependencyObject, object)
protected virtual void ClearContainerStates(FrameworkElement container)
The container which is cleared for item override.
GetContainerForItemOverride()
DependencyObject
Creates or identifies the element that is used to display the given item.
protected override DependencyObject GetContainerForItemOverride()
DependencyObject
The element that is used to display the given item.
GetScrollViewerPart()
ScrollViewer
Called on initializing the ScrollViewer on template applied. It's mandatory to get the ScrollViewer in order to perform selection.
protected virtual ScrollViewer GetScrollViewerPart()
ScrollViewer
The ScrollViewer instance in the control template.
If there is no ScrollViewer in the control template, override the logic in CanPerformSelection() method.
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.
Highlights the changed index.
When overridden in a derived class, is invoked whenever application code or internal processes call .
public override void OnApplyTemplate()
Overrides:
Called when a text is typed.
protected virtual void OnAutocompleteBehaviorTypedTextChanged()
Invoked when the property changes.
protected override void OnItemsPanelChanged(ItemsPanelTemplate oldItemsPanel, ItemsPanelTemplate newItemsPanel)
Old value of the property.
newItemsPanelItemsPanelTemplateNew value of the property.
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.
protected virtual void OnMatchingItemChanged()
protected override void OnPropertyChanged(DependencyPropertyChangedEventArgs e)
Called when the selection changes.
protected override void OnSelectionChanged(SelectionChangedEventArgs e)
The event data.
Overrides:
Called when selection mode changed. Update CanAutocompleteSelectItems property.
protected override void OnSelectionModeChanged()
Overrides:
Prepares the specified element to display the specified item.
protected override void PrepareContainerForItemOverride(DependencyObject element, object item)
Element used to display the specified item.
itemobjectSpecified item.
Scrolls the into view.
Scrolls the into view.