private void KeyOffAllPreviousItems(IKeyFolderViewModel currentVm) { var idx = KeyFolders.IndexOf(currentVm); if (idx > 0 && idx - 1 >= 0) { var prevVm = KeyFolders[idx - 1]; foreach (var item in prevVm.KeyPaths) { item.Value.Add(currentVm.SelectedItem); } } }
public KeyFolderPanel(IKeyFolderViewModel viewModel) { DataContext = viewModel; XamlReader.Load(this); var g = Directory.GetCurrentDirectory(); //var keyBm = new Bitmap(@"C:\Users\Blunt\Desktop\Spin Me Projects\SpinMe TestApp\SpinMe.TestApp\Resources\key.png"); //var lockBm = new Bitmap(@"C:\Users\Blunt\Desktop\Spin Me Projects\SpinMe TestApp\SpinMe.TestApp\Resources\lock.png"); //var settingsBm = new Bitmap(@"C:\Users\Blunt\Desktop\Spin Me Projects\SpinMe TestApp\SpinMe.TestApp\Resources\settings.png"); //KeyButton.Image = keyBm; //LockButton.Image = lockBm; //CloseButton.Image = settingsBm; MainGrid.ContextMenu = new KeyFolderPanelContextMenu(ViewModel); SetupGrid(); }