private void UpdateGrouping(GroupDescription groupDescription) { GroupDescriptions.Clear(); if (groupDescription != null) { GroupDescriptions.Add(groupDescription); } if (View != null) { View.Refresh(); } }
private void GroupPropertiesChanged() { GroupDescriptions.Clear(); if (GroupProperties == null) { return; } foreach (string property in GroupProperties.Split(',')) { GroupDescriptions.Add(new PropertyGroupDescription(property)); } }
/// <summary> /// Determines whether a view refresh is needed. /// </summary> /// <param name = "propertyName">The name of the changed property.</param> /// <returns> /// <c>True</c> if a view refresh needed; otherwise, <c>false</c>. /// </returns> private bool IsViewRefreshNeeded(string propertyName) { return(SortDescriptions.Any(sort => string.Equals(sort.PropertyName, propertyName)) || GroupDescriptions.OfType <PropertyGroupDescription>().Where(g => string.Equals(g.PropertyName, propertyName)).Any()); }