コード例 #1
0
        private void OnDatabasesCollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
        {
            Commands.ShowNavigationPanel.ExecuteOnMain(true);

            if (e.Action == NotifyCollectionChangedAction.Add)
            {
                var firstItem = e.NewItems.OfType <object>().FirstOrDefault();
                _view?.FocusItem(firstItem, true);
            }
        }
コード例 #2
0
        private void OnDatabasesCollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
        {
            Commands.ShowNavigationPanel.ExecuteOnMainWindow(true);

            NotifyOfPropertyChange(nameof(IsEmpty));
            NotifyOfPropertyChange(nameof(HasAnyDatabaseOpen));

            if (e.Action == NotifyCollectionChangedAction.Add)
            {
                var firstItem = e.NewItems.OfType <object>().FirstOrDefault();
                _view?.FocusItem(firstItem, true);
            }
        }