/// <summary> /// ItemsSourceProperty property changed handler. /// </summary> /// <param name="d">GroupingItemsControl that changed its ItemsSource.</param> /// <param name="e">Event arguments.</param> private static void OnItemsSourcePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { GroupingItemsControl source = d as GroupingItemsControl; //IEnumerable value = e.NewValue as IEnumerable; source.UpdateItems(); }
public void RemoveGroup(GroupingItemsControl ic) { // Debug.WriteLine("Removing ItemGroup Name:" + Name + " Count:" + Items.Count); ic._groups.Remove(Name); int index = ic._stack.Children.IndexOf(this.Presenter); if (index >= 0) { // Header ic._stack.Children.RemoveAt(index); // Group panel ic._stack.Children.RemoveAt(index); } _items = new List <Mapping>(); }
public void RemoveGroup(GroupingItemsControl ic) { // Debug.WriteLine("Removing ItemGroup Name:" + Name + " Count:" + Items.Count); ic._groups.Remove(Name); int index = ic._stack.Children.IndexOf(this.Presenter); if (index >= 0) { // Header ic._stack.Children.RemoveAt(index); // Group panel ic._stack.Children.RemoveAt(index); } _items = new List<Mapping>(); }