Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        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);
        }