Exemplo n.º 1
0
        /// <summary>
        /// Removes the data object from the filtered items
        /// </summary>
        /// <param name="value">Data object to be removed</param>
        public void Remove(object value)
        {
            bool wasRemoved = false;

            foreach (FilterableContentListItem item in FilteredItems.ToArray())
            {
                if (item.DataObject.Equals(value))
                {
                    FilteredItems.Remove(item);
                    wasRemoved = true;
                    break;
                }
            }
            if (!wasRemoved)
            {
                Debug.WriteLine("BasecodeLib warning: Cannot remove item. Doesn't exist in the collection.");
            }
        }