Exemplo n.º 1
0
        private static void OnIsSelectedChanged(DependencyObject o, DependencyPropertyChangedEventArgs e)
        {
            SelectorItem selectorItem = o as SelectorItem;

            if (selectorItem != null)
            {
                selectorItem.OnIsSelectedChanged((bool?)e.OldValue, (bool?)e.NewValue);
            }
        }
Exemplo n.º 2
0
 private void UpdateFromSelectedItems()
 {
     foreach (object item in ItemsCollection)
     {
         bool value = SelectedItems.Contains(item);
         _ignoreSelectedMemberPathValuesChanged++;
         SetSelectedMemberPathValue(item, value);
         _ignoreSelectedMemberPathValuesChanged--;
         SelectorItem selectorItem = base.ItemContainerGenerator.ContainerFromItem(item) as SelectorItem;
         if (selectorItem != null)
         {
             selectorItem.IsSelected = value;
         }
     }
     UpdateSelectedItem();
     UpdateSelectedValue();
     _internalSelectedItems = new object[SelectedItems.Count];
     SelectedItems.CopyTo(_internalSelectedItems, 0);
 }