Class SelectionHelper
Represents a helper class which is used for selection.
Inheritance
Inherited Members
Namespace: Telerik.Windows.Controls.Primitives
Assembly: Telerik.Windows.Controls.dll
Syntax
public class SelectionHelper
Constructors
SelectionHelper(Func<Boolean>, ISelectorInteraction, ISelectionBehavior, Action<Object, SelectionChangedEventArgs>)
Initializes a new instance of the SelectionHelper class.
Declaration
[Obsolete("Obsoleted in Q2 2014. Not used and it will be deleted in future versions.")]
public SelectionHelper(Func<bool> canExecute, ISelectorInteraction selector, ISelectionBehavior behavior, Action<object, SelectionChangedEventArgs> selectionCallBack)
Parameters
System.Func<System.Boolean>
canExecute
|
ISelectorInteraction
selector
|
ISelectionBehavior
behavior
|
System.Action<System.Object, System.Windows.Controls.SelectionChangedEventArgs>
selectionCallBack
|
SelectionHelper(ISelectorInteraction, ISelectionBehavior, Action<Object, SelectionChangedEventArgs>)
Initializes a new instance of the SelectionHelper class.
Declaration
public SelectionHelper(ISelectorInteraction selector, ISelectionBehavior behavior, Action<object, SelectionChangedEventArgs> selectionCallBack)
Parameters
ISelectorInteraction
selector
|
ISelectionBehavior
behavior
|
System.Action<System.Object, System.Windows.Controls.SelectionChangedEventArgs>
selectionCallBack
|
Properties
IsActive
Gets a value indicating whether the selection is active.
Declaration
public bool IsActive { get; }
Property Value
System.Boolean
|
SelectedIndex
Gets the index of the selected item.
Declaration
public int SelectedIndex { get; }
Property Value
System.Int32
|
SelectedItem
Gets the selected item.
Declaration
public object SelectedItem { get; }
Property Value
System.Object
|
Methods
AddToSelection(IEnumerable)
Adds items to selection.
Declaration
public void AddToSelection(IEnumerable items)
Parameters
System.Collections.IEnumerable
items
|
ClearSelection()
Clears the selection.
Declaration
public void ClearSelection()
DeselectItems(IEnumerable)
UnSelects the items.
Declaration
public void DeselectItems(IEnumerable items)
Parameters
System.Collections.IEnumerable
items
|
GetSelectedItems()
Gets the selected items.
Declaration
public IList GetSelectedItems()
Returns
System.Collections.IList
|
ResumeExecution()
Tries to execute all enqueued selection actions.
Declaration
[Obsolete("Obsoleted in Q2 2014. Not used and it will be deleted in future versions.")]
public bool ResumeExecution()
Returns
System.Boolean
Returns true if the actions can be executed, otherwise returns false. |
SelectItems(IEnumerable)
Selects the items.
Declaration
public void SelectItems(IEnumerable items)
Parameters
System.Collections.IEnumerable
items
|
UpdateSelection(UIElement, Boolean)
Updates the selection using the container and the current selected state.
Declaration
public void UpdateSelection(UIElement container, bool isSelected)
Parameters
System.Windows.UIElement
container
|
System.Boolean
isSelected
|
UpdateSelectionBehavior(ISelectionBehavior)
Updates the selection behavior.
Declaration
public void UpdateSelectionBehavior(ISelectionBehavior behavior)
Parameters
ISelectionBehavior
behavior
|
UpdateSelectionOnUserInteraction(Object, SelectionMouseState)
Updates the selection on user interaction. The second SelectionMouseState parameter is optional. By default is SelectionMouseState.Left.
Declaration
public void UpdateSelectionOnUserInteraction(object item, SelectionMouseState mouseState = SelectionMouseState.Left)
Parameters
System.Object
item
The data item or the container that was affected by the UI selection operation. |
SelectionMouseState
mouseState
Indicates which mouse button was used to perform the operations. |