Exemplo n.º 1
0
        public override void RemoveChild(int childId)
        {
            //Remove View
            var timeEntryViewToRemove = Children.SingleOrDefault(task => ((ListTimeEntryViewModel)task).TimeEntry.Id == childId);

            if (timeEntryViewToRemove != null)
            {
                Children.Remove(timeEntryViewToRemove);
                if (VisibleChildren.Contains(timeEntryViewToRemove))
                {
                    VisibleChildren.Remove(timeEntryViewToRemove);
                }
            }

            Reload();
        }
Exemplo n.º 2
0
 /// <summary>
 /// Checks if an item is visible in the scrolled view.
 /// </summary>
 /// <param name="item">The item.</param>
 /// <returns>True if visible; Otherwise, false.</returns>
 public virtual bool IsItemVisible(object item)
 {
     return(VisibleChildren.Contains(item));
 }