Beispiel #1
0
        private void BindToChangesetChanges()
        {
            var vm = DataContext as PrepareMergeViewModel;

            if (vm.ChangesetList != null)
            {
                foreach (var item in vm.ChangesetList)
                {
                    item.PropertyChanged +=
                        (o, a) =>
                    {
                        if (a.PropertyName == "TargetCheckinId")
                        {
                            Repository.Instance.BackgroundTaskManager.Post(
                                () =>
                            {
                                ChangesetsGrid.ScrollIntoView(o as PrepareMergeViewModel.ChangesetListElement, ChangesetsGrid.Columns.Where(col => col.SortMemberPath == "TargetCheckinId").FirstOrDefault());
                                return(true);
                            }
                                );
                        }
                    };
                }
            }
        }
Beispiel #2
0
 private void SelectNextRow()
 {
     if (ChangesetsGrid.SelectedIndex >= 0 &&
         ChangesetsGrid.SelectedIndex < (ChangesetsGrid.Items.Count - 1))
     {
         ChangesetsGrid.Focus();
         ++ChangesetsGrid.SelectedIndex;
     }
 }