System.Windows.Data.StandardCollectionViewGroup.AddInSubtree C# (CSharp) Méthode

AddInSubtree() private méthode

private AddInSubtree ( object item, CultureInfo culture, IList descriptions ) : void
item object
culture System.Globalization.CultureInfo
descriptions IList
Résultat void
		internal void AddInSubtree (object item, CultureInfo culture, IList<GroupDescription> descriptions)
		{
			AddInSubtree (item, culture, descriptions, true);
		}

Same methods

StandardCollectionViewGroup::AddInSubtree ( object item, CultureInfo culture, IList descriptions, bool allowSorting ) : void
StandardCollectionViewGroup::AddInSubtree ( object item, CultureInfo culture, IList descriptions, bool allowSorting, object name ) : void

Usage Example

		internal void AddInSubtree (object item, CultureInfo culture, IList<GroupDescription> descriptions, bool allowSorting, object name)
		{
			bool added = false;
			foreach (StandardCollectionViewGroup group in Items) {
				var desc = descriptions [Depth];
				if (desc.NamesMatch (group.Name, name)) {
					group.AddInSubtree (item, culture, descriptions, allowSorting);
					added = true;
				}
			}

			if (!added) {
				int depth = Depth + 1;
				var group = new StandardCollectionViewGroup (this, name, depth, depth == descriptions.Count, Sorters);
				AddItem (group, allowSorting);
				group.AddInSubtree (item, culture, descriptions, allowSorting);
			}
		}