/// <summary> /// Close the others pop up when the user click on a Multicombobox /// </summary> private void Mscbx_PreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e) { MultiSelectComboBox mscbx = (MultiSelectComboBox)sender; // Don't close the popup if the MultiSelectComboBox selected is open if ((bool)mscbx.MultiSelectCombox.Tag != true) { CloseAllPopup(); } }
/// <summary> /// Update the elements in the control when the ItemsSource property is modified /// </summary> private static void OnItemsSourceChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { MultiSelectComboBox control = (MultiSelectComboBox)d; control.LoadElementsToControl(); }