Click or drag to resize

MultiSelectorExtensions Class

Extensions for multi selectors like ListBox or DataGrid:
  • Support binding operations with SelectedItems property.
Inheritance Hierarchy
SystemObject
  TomsToolbox.WpfMultiSelectorExtensions

Namespace:  TomsToolbox.Wpf
Assembly:  TomsToolbox.Wpf (in TomsToolbox.Wpf.dll) Version: 1.0.64.0 (1.0.64.0)
Syntax
public static class MultiSelectorExtensions

The MultiSelectorExtensions type exposes the following members.

Methods
  NameDescription
Public methodStatic memberGetSelectionBinding
Gets the value of the SelectionBinding attached property.
Public methodStatic memberSetSelectionBinding
Sets the value of the SelectionBinding attached property.
Top
Fields
  NameDescription
Public fieldStatic memberSelectionBindingProperty
Identifies the SelectionBinding dependency property.
Top
Attached Properties
  NameDescription
Public attached propertyCode exampleSelectionBinding
Attach this property to a ListBox or DataGrid to bind the selectors SelectedItems property to the view models SelectedItems property.
Top
Remarks
SelectionBinding:

Since there is no common interface for ListBox and DataGrid, the SelectionBinding is implemented via reflection/dynamics, so it will work on any FrameworkElement that has the SelectedItems, SelectedItem and SelectedItemIndex properties and the SelectionChanged event.

See Also