public PanelTCViewModel() { UpdateAvailableDrives(); CurrentPathContent = new ObservableCollection <string>(); SelectedDrive = AvailableDrives.Any(x => x.Contains("C")) ? AvailableDrives.Where(x => x.Contains("C")).First() : AvailableDrives.First(); DropDownOpen = new RelayCommand(DropDownOpenExecute, arg => true); ItemDoubleClick = new RelayCommand(ItemDoubleClickExecute, arg => true); ItemEnterKey = new RelayCommand(ItemEnterKeyExecute, ItemEnterKeyCanExecute); }
public SideViewModel() { UpdateAvailableDrives(); CurrentPathContent = new ObservableCollection <string>(); //any func + lambda //x.Contains("C")).First() always disk containt C at first SelectedDrive = AvailableDrives.Any(x => x.Contains("C")) ? AvailableDrives.Where(x => x.Contains("C")).First() : AvailableDrives.First(); DropDownOpen = new RelayCommand(DropDownOpenExecute, argument => true); ItemDoubleClick = new RelayCommand(ItemDoubleClickExecute, argument => true); ItemEnterKey = new RelayCommand(ItemEnterKeyExecute, ItemEnterKeyCanExecute); }