Class ListControl
Represents the list control that has multi-selection.
Inherited Members
Namespace: Telerik.Windows.Controls.Primitives
Assembly: Telerik.Windows.Controls.dll
Syntax
public class ListControl : ItemsControlSelector, IMultiSelector, ISelector, ISelectorInteraction, IAutocomplete, IListControl, ICommandSource, IScrollingServiceCore, IScrollingInfo
Constructors
ListControl()
Fields
CanAutocompleteSelectItemsProperty
Identifies the CanAutocompleteSelectItems dependency property.
Declaration
public static readonly DependencyProperty CanAutocompleteSelectItemsProperty
Field Value
System.Windows.DependencyProperty
|
CanAutocompleteSelectPartialMatchesProperty
Identifies the CanAutocompleteSelectPartialMatches dependency property.
Declaration
public static readonly DependencyProperty CanAutocompleteSelectPartialMatchesProperty
Field Value
System.Windows.DependencyProperty
|
CanKeyboardNavigationSelectItemsProperty
CommandParameterProperty
Identifies the CommandParameter dependency property.
Declaration
public static readonly DependencyProperty CommandParameterProperty
Field Value
System.Windows.DependencyProperty
|
CommandProperty
Identifies the Command dependency property.
Declaration
public static readonly DependencyProperty CommandProperty
Field Value
System.Windows.DependencyProperty
|
CommandTargetProperty
Identifies the CommandTarget dependency property.
Declaration
public static readonly DependencyProperty CommandTargetProperty
Field Value
System.Windows.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
System.Windows.DependencyProperty
|
TextSearchModeProperty
Identifies the TextSearchMode dependency property.
Declaration
public static readonly DependencyProperty TextSearchModeProperty
Field Value
System.Windows.DependencyProperty
|
TypedTextProperty
Identifies the TypedText dependency property.
Declaration
public static readonly DependencyProperty TypedTextProperty
Field Value
System.Windows.DependencyProperty
|
Properties
AutocompleteBehavior
Gets or sets the autocomplete behavior.
Declaration
protected AutocompleteBehavior AutocompleteBehavior { get; set; }
Property Value
AutocompleteBehavior
|
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
System.Nullable<System.Boolean>
|
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
System.Boolean
|
CanKeyboardNavigationSelectItems
Command
Gets or sets the Command. This is a dependency property.
Declaration
public ICommand Command { get; set; }
Property Value
System.Windows.Input.ICommand
|
CommandParameter
Gets or sets the CommandParameter. This is a dependency property.
Declaration
public object CommandParameter { get; set; }
Property Value
System.Object
|
CommandTarget
Gets or sets the CommandTarget. This is a dependency property.
Declaration
public IInputElement CommandTarget { get; set; }
Property Value
System.Windows.IInputElement
|
HighlightedIndex
Gets the index of the highlighted item.
Declaration
public int HighlightedIndex { get; }
Property Value
System.Int32
The index of the highlighted. |
Implements
HighlightedItem
Gets or sets the highlighted item.
Declaration
protected object HighlightedItem { get; set; }
Property Value
System.Object
|
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
System.Boolean
|
IsScrollIntoViewEnabled
Gets or sets the IsScrollIntoViewEnabled. This is a dependency property.
Declaration
public bool IsScrollIntoViewEnabled { get; set; }
Property Value
System.Boolean
|
KeyboardNavigation
SelectAllCommand
Gets the command that will be executed when select all. This is a RoutedUICommand.
Declaration
public static RoutedUICommand SelectAllCommand { get; }
Property Value
System.Windows.Input.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
TextSearchMode
The text search mode. |
TypedText
Gets or sets the current typed text. This is a dependency property.
Declaration
public string TypedText { get; set; }
Property Value
System.String
|
Methods
CanPerformSelection()
Indicates whether the selection helper can perform operation or not.
Declaration
protected override bool CanPerformSelection()
Returns
System.Boolean
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
System.Windows.DependencyObject
element
The ListItem container element. |
System.Object
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
System.Windows.FrameworkElement
container
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
System.Windows.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
System.Windows.Controls.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
System.Windows.Input.Key
key
The key. |
Returns
System.Boolean
|
HighlightedIndexChanged(Int32, Key)
Highlights the changed index.
Declaration
protected virtual void HighlightedIndexChanged(int index, Key key)
Parameters
System.Int32
index
|
System.Windows.Input.Key
key
|
IsIndexSelectable(Int32)
Determines whether the index is selectable.
Declaration
protected override bool IsIndexSelectable(int index)
Parameters
System.Int32
index
The index. |
Returns
System.Boolean
|
Overrides
IsItemItsOwnContainerOverride(Object)
Determines if the specified item is (or is eligible to be) its own container.
Declaration
protected override bool IsItemItsOwnContainerOverride(object item)
Parameters
System.Object
item
The item to check. |
Returns
System.Boolean
True if the item is (or is eligible to be) its own container; otherwise, false. |
OnApplyTemplate()
When overridden in a derived class, is invoked whenever application code or internal processes call System.Windows.FrameworkElement.ApplyTemplate.
Declaration
public override void OnApplyTemplate()
Overrides
OnAutocompleteBehaviorTypedTextChanged()
Called when a text is typed.
Declaration
protected virtual void OnAutocompleteBehaviorTypedTextChanged()
OnItemsPanelChanged(ItemsPanelTemplate, ItemsPanelTemplate)
Invoked when the System.Windows.Controls.ItemsControl.ItemsPanel property changes.
Declaration
protected override void OnItemsPanelChanged(ItemsPanelTemplate oldItemsPanel, ItemsPanelTemplate newItemsPanel)
Parameters
System.Windows.Controls.ItemsPanelTemplate
oldItemsPanel
Old value of the System.Windows.Controls.ItemsControl.ItemsPanel property. |
System.Windows.Controls.ItemsPanelTemplate
newItemsPanel
New value of the System.Windows.Controls.ItemsControl.ItemsPanel 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
System.Windows.DependencyPropertyChangedEventArgs
e
|
OnSelectionChanged(SelectionChangedEventArgs)
Called when the selection changes.
Declaration
protected override void OnSelectionChanged(SelectionChangedEventArgs e)
Parameters
System.Windows.Controls.SelectionChangedEventArgs
e
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
System.Windows.DependencyObject
element
Element used to display the specified item. |
System.Object
item
Specified item. |
ScrollIntoView(Int32)
Scrolls the into view.
Declaration
public void ScrollIntoView(int index)
Parameters
System.Int32
index
The index. |
Implements
ScrollIntoView(Object)
Scrolls the into view.
Declaration
public void ScrollIntoView(object item)
Parameters
System.Object
item
|
Explicit Interface Implementations
IScrollingInfo.ExtentHeight
Declaration
double IScrollingInfo.ExtentHeight { get; }
Returns
System.Double
|
Implements
IScrollingInfo.ExtentWidth
Declaration
double IScrollingInfo.ExtentWidth { get; }
Returns
System.Double
|
Implements
IScrollingInfo.HorizontalOffset
Declaration
double IScrollingInfo.HorizontalOffset { get; }
Returns
System.Double
|
Implements
IScrollingInfo.TransformFromDropTargetToViewPort(Point)
Declaration
Point IScrollingInfo.TransformFromDropTargetToViewPort(Point positionInDropTarget)
Parameters
System.Windows.Point
positionInDropTarget
|
Returns
System.Windows.Point
|
Implements
IScrollingInfo.VerticalOffset
Declaration
double IScrollingInfo.VerticalOffset { get; }
Returns
System.Double
|
Implements
IScrollingInfo.ViewportHeight
Declaration
double IScrollingInfo.ViewportHeight { get; }
Returns
System.Double
|
Implements
IScrollingInfo.ViewportWidth
Declaration
double IScrollingInfo.ViewportWidth { get; }
Returns
System.Double
|
Implements
IScrollingServiceCore.ScrollHorizontal(Double)
Declaration
void IScrollingServiceCore.ScrollHorizontal(double offsetX)
Parameters
System.Double
offsetX
|
Implements
IScrollingServiceCore.ScrollVertical(Double)
Declaration
void IScrollingServiceCore.ScrollVertical(double offsetY)
Parameters
System.Double
offsetY
|
Implements
IListControl.Items
Declaration
IList IListControl.Items { get; }
Returns
System.Collections.IList
|