private void DeleteItem(object filenameitem) { FileNameItem fni = filenameitem as FileNameItem; Mementor.ElementRemove(FilePaths, fni); FilePaths.Remove(fni); }
void btnRemove_Click(object sender, RoutedEventArgs e) { if (FilePaths == null) { return; } FilePaths.Remove((string)lstFilePaths.SelectedValue); }
public void Dropped(IDropInfo dropInfo) { if (dropInfo.DragInfo != null) { if (dropInfo.DragInfo.VisualSource == dropInfo.VisualTarget && dropInfo.Data.GetType() == typeof(FileNameItem)) { FileNameItem filenameitem = dropInfo.Data as FileNameItem; FileNameItem newfilenameitem = filenameitem.Clone() as FileNameItem; FilePaths.Insert(dropInfo.InsertIndex, newfilenameitem); FilePaths.Remove(filenameitem); } } }
private void ClearUnselected() { Mementor.Batch(() => { for (int i = FilePaths.Count - 1; i >= 0; i--) { if (!FilePaths[i].FileIsSelected) { Mementor.ElementRemove(FilePaths, FilePaths[i]); FilePaths.Remove(FilePaths[i]); } } }); }