/// <summary>
        /// Set the <see cref="SortProperty"/> and <see cref="SortDirection"/>
        /// which the list will be sorted by.
        /// </summary>
        public void SortBy(string propName, bool ignoreCase = false, bool ascending = true)
        {
            Check.NotEmpty(propName, "propName");

            var pd = ItemProperties.Find(propName, ignoreCase);

            Debug.Assert(pd != null);

            ApplySort(pd, ascending ? ListSortDirection.Ascending : ListSortDirection.Descending);
        }
        private void Item_PropertyChanged(object item, PropertyChangedEventArgs args)
        {
            var notifier = item as NestedPropertyChangedNotifier <T>;

            Debug.Assert(notifier != null);

            int pos = base.IndexOf(notifier.Object);

            if (pos == -1)
            {
                Debug.Fail("Item not in list.");
                RemovePropertyChangedNotifier(notifier.Object);
                return;
            }

            var pd = ItemProperties.Find(args.PropertyName, true);

            OnListChanged(new ListChangedEventArgs(ListChangedType.ItemChanged, pos, pd));
        }