Control for a ComboBox that allows multiple selection via CheckBoxes.
More...
|
| static readonly DependencyProperty | ItemsSourceProperty = DependencyProperty.Register(nameof(ItemsSource), typeof(IEnumerable), typeof(MultiSelectComboBox), new PropertyMetadata(null)) |
| |
| static readonly DependencyProperty | SelectedItemsProperty = DependencyProperty.Register(nameof(SelectedItems), typeof(IList), typeof(MultiSelectComboBox), new FrameworkPropertyMetadata(null, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault)) |
| |
| static readonly DependencyProperty | ItemTemplateProperty = DependencyProperty.Register(nameof(ItemTemplate), typeof(DataTemplate), typeof(MultiSelectComboBox), new PropertyMetadata(null)) |
| |
| static readonly DependencyProperty | IsPopupOpenProperty = DependencyProperty.Register(nameof(IsPopupOpen), typeof(bool), typeof(MultiSelectComboBox), new PropertyMetadata(false, OnIsPopupOpenChanged)) |
| |
|
| IEnumerable | ItemsSource [get, set] |
| | List with all available items.
|
| |
| IList | SelectedItems [get, set] |
| | List with all selected items.
|
| |
| DataTemplate | ItemTemplate [get, set] |
| | Template used to display the Checkbox contents and the selected items.
|
| |
| bool | IsPopupOpen [get, set] |
| | True, when the popup with the selection options is open.
|
| |
|
| void | OnTogglePopup (object sender, System.Windows.Input.MouseButtonEventArgs e) |
| | Toggle the popup open/closed when clicking on the control, but not when clicking the remove button of an item.
|
| |
| void | PART_ComboBoxContent_MouseEnter (object sender, MouseEventArgs e) |
| |
| void | PART_ComboBoxContent_MouseLeave (object sender, MouseEventArgs e) |
| |
| void | refreshPopupCheckBoxes () |
| | Refresh the state of all CheckBoxes in the popup.
|
| |
| void | PART_PopupCheckbox_Checked (object sender, RoutedEventArgs e) |
| | Checkbox checked event handler to add the item to the SelectedItems collection.
|
| |
| void | PART_PopupCheckbox_Unchecked (object sender, RoutedEventArgs e) |
| | Checkbox unchecked event handler to remove the item from the SelectedItems collection.
|
| |
| void | RemoveItem (object item) |
| | Command to remove an item from the SelectedItems collection.
|
| |
| T | findParentOfType< T > (DependencyObject child) |
| | Find the next parent with the requested type from the child.
|
| |
Control for a ComboBox that allows multiple selection via CheckBoxes.
Definition at line 15 of file MultiSelectComboBox.xaml.cs.
◆ MultiSelectComboBox()
| Vereinsmeisterschaften.Controls.MultiSelectComboBox.MultiSelectComboBox |
( |
| ) |
|
◆ findParentOfType< T >()
| T Vereinsmeisterschaften.Controls.MultiSelectComboBox.findParentOfType< T > |
( |
DependencyObject | child | ) |
|
|
private |
Find the next parent with the requested type from the child.
- Template Parameters
-
- Parameters
-
| child | Child to start the search from |
- Returns
- Next parent with requested type of
null if not found
Definition at line 204 of file MultiSelectComboBox.xaml.cs.
◆ findVisualChildren< T >()
| static IEnumerable< T > Vereinsmeisterschaften.Controls.MultiSelectComboBox.findVisualChildren< T > |
( |
DependencyObject | depObj | ) |
|
|
staticprivate |
Find all visual children of a given type.
- Template Parameters
-
- Parameters
-
| depObj | Parent object to start the search from |
- Returns
- List of children with the requested type
Definition at line 224 of file MultiSelectComboBox.xaml.cs.
◆ OnIsPopupOpenChanged()
| static void Vereinsmeisterschaften.Controls.MultiSelectComboBox.OnIsPopupOpenChanged |
( |
DependencyObject | d, |
|
|
DependencyPropertyChangedEventArgs | e ) |
|
staticprivate |
◆ OnTogglePopup()
| void Vereinsmeisterschaften.Controls.MultiSelectComboBox.OnTogglePopup |
( |
object | sender, |
|
|
System.Windows.Input.MouseButtonEventArgs | e ) |
|
private |
Toggle the popup open/closed when clicking on the control, but not when clicking the remove button of an item.
- Parameters
-
Definition at line 90 of file MultiSelectComboBox.xaml.cs.
◆ PART_ComboBoxContent_MouseEnter()
| void Vereinsmeisterschaften.Controls.MultiSelectComboBox.PART_ComboBoxContent_MouseEnter |
( |
object | sender, |
|
|
MouseEventArgs | e ) |
|
private |
◆ PART_ComboBoxContent_MouseLeave()
| void Vereinsmeisterschaften.Controls.MultiSelectComboBox.PART_ComboBoxContent_MouseLeave |
( |
object | sender, |
|
|
MouseEventArgs | e ) |
|
private |
◆ PART_PopupCheckbox_Checked()
| void Vereinsmeisterschaften.Controls.MultiSelectComboBox.PART_PopupCheckbox_Checked |
( |
object | sender, |
|
|
RoutedEventArgs | e ) |
|
private |
Checkbox checked event handler to add the item to the SelectedItems collection.
- Parameters
-
| sender | Sending CheckBox |
| e | RoutedEventArgs |
Definition at line 147 of file MultiSelectComboBox.xaml.cs.
◆ PART_PopupCheckbox_Unchecked()
| void Vereinsmeisterschaften.Controls.MultiSelectComboBox.PART_PopupCheckbox_Unchecked |
( |
object | sender, |
|
|
RoutedEventArgs | e ) |
|
private |
Checkbox unchecked event handler to remove the item from the SelectedItems collection.
- Parameters
-
| sender | Sending CheckBox |
| e | RoutedEventArgs |
Definition at line 163 of file MultiSelectComboBox.xaml.cs.
◆ refreshPopupCheckBoxes()
| void Vereinsmeisterschaften.Controls.MultiSelectComboBox.refreshPopupCheckBoxes |
( |
| ) |
|
|
private |
◆ RemoveItem()
| void Vereinsmeisterschaften.Controls.MultiSelectComboBox.RemoveItem |
( |
object | item | ) |
|
|
private |
◆ IsPopupOpenProperty
| readonly DependencyProperty Vereinsmeisterschaften.Controls.MultiSelectComboBox.IsPopupOpenProperty = DependencyProperty.Register(nameof(IsPopupOpen), typeof(bool), typeof(MultiSelectComboBox), new PropertyMetadata(false, OnIsPopupOpenChanged)) |
|
static |
◆ ItemsSourceProperty
| readonly DependencyProperty Vereinsmeisterschaften.Controls.MultiSelectComboBox.ItemsSourceProperty = DependencyProperty.Register(nameof(ItemsSource), typeof(IEnumerable), typeof(MultiSelectComboBox), new PropertyMetadata(null)) |
|
static |
◆ ItemTemplateProperty
| readonly DependencyProperty Vereinsmeisterschaften.Controls.MultiSelectComboBox.ItemTemplateProperty = DependencyProperty.Register(nameof(ItemTemplate), typeof(DataTemplate), typeof(MultiSelectComboBox), new PropertyMetadata(null)) |
|
static |
◆ SelectedItemsProperty
| readonly DependencyProperty Vereinsmeisterschaften.Controls.MultiSelectComboBox.SelectedItemsProperty = DependencyProperty.Register(nameof(SelectedItems), typeof(IList), typeof(MultiSelectComboBox), new FrameworkPropertyMetadata(null, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault)) |
|
static |
◆ IsPopupOpen
| bool Vereinsmeisterschaften.Controls.MultiSelectComboBox.IsPopupOpen |
|
getset |
◆ ItemsSource
| IEnumerable Vereinsmeisterschaften.Controls.MultiSelectComboBox.ItemsSource |
|
getset |
◆ ItemTemplate
| DataTemplate Vereinsmeisterschaften.Controls.MultiSelectComboBox.ItemTemplate |
|
getset |
◆ SelectedItems
| IList Vereinsmeisterschaften.Controls.MultiSelectComboBox.SelectedItems |
|
getset |
The documentation for this class was generated from the following file: