ClassSelectionHelper
Represents a helper class which is used for selection.
Definition
Namespace:Telerik.Windows.Controls.Primitives
Assembly:Telerik.Windows.Controls.dll
Syntax:
public class SelectionHelper
Inheritance: objectSelectionHelper
Constructors
SelectionHelper(Func<bool>, ISelectorInteraction, ISelectionBehavior, Action<object, SelectionChangedEventArgs>)
Initializes a new instance of the SelectionHelper class.
Declaration
[SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId = "canExecute")]
[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
canExecute
selector
behavior
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
selector
behavior
selectionCallBack
Properties
IsActive
Gets a value indicating whether the selection is active.
SelectedIndex
Gets the index of the selected item.
SelectedItem
Gets the selected item.
Methods
AddToSelection(IEnumerable)
Adds items to selection.
Declaration
public void AddToSelection(IEnumerable items)
Parameters
items
DeselectItems(IEnumerable)
UnSelects the items.
Declaration
public void DeselectItems(IEnumerable items)
Parameters
items
GetSelectedItems()
Gets the selected items.
ResumeExecution()
Tries to execute all enqueued selection actions.
Declaration
[SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic")]
[Obsolete("Obsoleted in Q2 2014. Not used and it will be deleted in future versions.")]
public bool ResumeExecution()
Returns
Returns true if the actions can be executed, otherwise returns false.
SelectItems(IEnumerable)
Selects the items.
Declaration
public void SelectItems(IEnumerable items)
Parameters
items
UpdateSelection(UIElement, bool)
Updates the selection using the container and the current selected state.
Declaration
public void UpdateSelection(UIElement container, bool isSelected)
Parameters
container
UIElement
isSelected
UpdateSelectionBehavior(ISelectionBehavior)
Updates the selection behavior.
Declaration
public void UpdateSelectionBehavior(ISelectionBehavior behavior)
Parameters
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
item
The data item or the container that was affected by the UI selection operation.
mouseState
Indicates which mouse button was used to perform the operations.