private void GroupItemsByPath(GroupDescriptorPath path) { foreach (var classViewModel in this.ClassDiagramGraphSource.Items.OfType<ClassViewModel>()) { classViewModel.GroupDescriptorPath = path; } }
/// <summary> /// The change grouping. /// </summary> /// <param name="groupDescriptorMemberPath"> /// The group descriptor member path. /// </param> private void ChangeGrouping(GroupDescriptorPath groupDescriptorMemberPath) { if (!this.isSorting) this.SortDirection = null; this.isSorting = false; this.GroupedItems.GroupDescriptors.Clear(); string memberString = groupDescriptorMemberPath.ToString(); this.GroupedItems.GroupDescriptors.Add(new GroupDescriptor { Member = memberString }); if (groupDescriptorMemberPath == GroupDescriptorPath.Access) { SortDescriptor desc = new SortDescriptor() { Member = "Access" }; this.GroupedItems.SortDescriptors.Add(desc); } }