anchor.diff:          window.NodeGrid.AddColumn("Modified", converter = ValueConverters.OptionValue(), format = FormatString.dateTime)
           window.NodeGrid.AddColumn("SizeFormatted", "Size", alignRight = true)
           window.NodeGrid.Columns |> Seq.iter (fun c -> c.CanUserSort <- false)
  +
  +        // bind Tab key to switch focus
  +        window.PathBox.PreviewKeyDown.Add (onKey Key.Tab window.NodeGrid.Focus)
  +        window.PathBox.PreviewKeyDown.Add (onKey Key.Escape window.NodeGrid.Focus)
  +        window.NodeGrid.PreviewKeyDown.Add (onKey Key.Tab (fun () ->
  +            window.PathBox.SelectAll()
  +            window.PathBox.Focus()
  +        ))
  +
  +        // on selection change, keep selected node in view, make sure node list is focused
  +        window.NodeGrid.SelectedCellsChanged.Add (fun _ ->
  +            keepSelectedInView ()
  +            window.NodeGrid.Focus() |> ignore
  +        )
  +
  +        // on resize, keep selected node in view, update the page size
  +        window.NodeGrid.SizeChanged.Add <| fun _ ->
  +            keepSelectedInView()
  +            let grid = window.NodeGrid
  +            grid.Dispatcher.Invoke(fun () ->
  +                if grid.HasItems then
  +                    let index = grid.SelectedIndex |> max 0
  +                    let row = grid.ItemContainerGenerator.ContainerFromIndex(index) :?> DataGridRow |> Option.ofObj
  +                    let itemsPerPage = row |> Option.map (fun row -> grid.ActualHeight / row.ActualHeight |> int)
  +                    itemsPerPage |> Option.iter model.set_PageSize
  +            )
  +
  +        window.InputBox.PreviewKeyDown.Add (onKey Key.Escape window.NodeGrid.Focus)
   
           // simple bindings
           Binding.OfExpression
  
positive.code:         ]
          not <| List.contains keyEvt.Key modifierKeys
  
      override this.SetBindings (model: MainBindModel) =
          model.Invoke <- fun f -> window.Dispatcher.Invoke(fun () -> f())
  
          // setup grid
  
negative.code:             config.Save()
  
      override this.EventStreams = [
          window.Activated |> Observable.choose (fun _ ->
              if config.Window.RefreshOnActivate then
                  Some Refresh
              else None
          )
          window.PathBox.PreviewKeyDown |> Observable.choose (fun evt ->
              if evt.Key = Key.Enter then Some <| OpenPath window.PathBox.Text
              else None
  